mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:58:12 +00:00
Everywhere: Rename FB prefix structure names => Graphics
This commit is contained in:
parent
d2e93ec50a
commit
10adc27eda
7 changed files with 40 additions and 40 deletions
|
@ -13,7 +13,7 @@
|
|||
|
||||
__BEGIN_DECLS
|
||||
|
||||
ALWAYS_INLINE int fb_get_properties(int fd, FBProperties* info)
|
||||
ALWAYS_INLINE int fb_get_properties(int fd, GraphicsConnectorProperties* info)
|
||||
{
|
||||
return ioctl(fd, GRAPHICS_IOCTL_GET_PROPERTIES, info);
|
||||
}
|
||||
|
@ -44,22 +44,22 @@ ALWAYS_INLINE int fb_set_resolution(int fd, FBHeadResolution* info)
|
|||
return ioctl(fd, GRAPHICS_IOCTL_SET_HEAD_RESOLUTION, info);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE int fb_get_head_edid(int fd, FBHeadEDID* info)
|
||||
ALWAYS_INLINE int fb_get_head_edid(int fd, GraphicsHeadEDID* info)
|
||||
{
|
||||
return ioctl(fd, GRAPHICS_IOCTL_GET_HEAD_EDID, info);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE int fb_get_head_vertical_offset_buffer(int fd, FBHeadVerticalOffset* vertical_offset)
|
||||
ALWAYS_INLINE int fb_get_head_vertical_offset_buffer(int fd, GraphicsHeadVerticalOffset* vertical_offset)
|
||||
{
|
||||
return ioctl(fd, GRAPHICS_IOCTL_GET_HEAD_VERTICAL_OFFSET_BUFFER, vertical_offset);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE int fb_set_head_vertical_offset_buffer(int fd, FBHeadVerticalOffset* vertical_offset)
|
||||
ALWAYS_INLINE int fb_set_head_vertical_offset_buffer(int fd, GraphicsHeadVerticalOffset* vertical_offset)
|
||||
{
|
||||
return ioctl(fd, GRAPHICS_IOCTL_SET_HEAD_VERTICAL_OFFSET_BUFFER, vertical_offset);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE int fb_set_head_mode_setting(int fd, FBHeadModeSetting* mode_setting)
|
||||
ALWAYS_INLINE int fb_set_head_mode_setting(int fd, GraphicsHeadModeSetting* mode_setting)
|
||||
{
|
||||
return ioctl(fd, GRAPHICS_IOCTL_SET_HEAD_MODE_SETTING, mode_setting);
|
||||
}
|
||||
|
@ -69,9 +69,9 @@ ALWAYS_INLINE int fb_set_safe_head_mode_setting(int fd)
|
|||
return ioctl(fd, GRAPHICS_IOCTL_SET_SAFE_HEAD_MODE_SETTING, nullptr);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE int fb_get_head_mode_setting(int fd, FBHeadModeSetting* mode_setting)
|
||||
ALWAYS_INLINE int fb_get_head_mode_setting(int fd, GraphicsHeadModeSetting* mode_setting)
|
||||
{
|
||||
FBHeadModeSetting head_mode_setting;
|
||||
GraphicsHeadModeSetting head_mode_setting;
|
||||
if (auto rc = ioctl(fd, GRAPHICS_IOCTL_GET_HEAD_MODE_SETTING, &head_mode_setting); rc < 0)
|
||||
return rc;
|
||||
mode_setting->horizontal_stride = head_mode_setting.horizontal_stride;
|
||||
|
|
|
@ -158,8 +158,8 @@ ErrorOr<void> DisplayConnector::ioctl(OpenFileDescription&, unsigned request, Us
|
|||
// TODO: We really should have ioctls for destroying resources as well
|
||||
switch (request) {
|
||||
case GRAPHICS_IOCTL_GET_PROPERTIES: {
|
||||
auto user_properties = static_ptr_cast<FBProperties*>(arg);
|
||||
FBProperties properties {};
|
||||
auto user_properties = static_ptr_cast<GraphicsConnectorProperties*>(arg);
|
||||
GraphicsConnectorProperties properties {};
|
||||
properties.flushing_support = flush_support();
|
||||
properties.doublebuffer_support = double_framebuffering_capable();
|
||||
properties.partial_flushing_support = partial_flush_support();
|
||||
|
@ -168,8 +168,8 @@ ErrorOr<void> DisplayConnector::ioctl(OpenFileDescription&, unsigned request, Us
|
|||
return copy_to_user(user_properties, &properties);
|
||||
}
|
||||
case GRAPHICS_IOCTL_GET_HEAD_MODE_SETTING: {
|
||||
auto user_head_mode_setting = static_ptr_cast<FBHeadModeSetting*>(arg);
|
||||
FBHeadModeSetting head_mode_setting {};
|
||||
auto user_head_mode_setting = static_ptr_cast<GraphicsHeadModeSetting*>(arg);
|
||||
GraphicsHeadModeSetting head_mode_setting {};
|
||||
TRY(copy_from_user(&head_mode_setting, user_head_mode_setting));
|
||||
{
|
||||
SpinlockLocker control_locker(m_control_lock);
|
||||
|
@ -189,8 +189,8 @@ ErrorOr<void> DisplayConnector::ioctl(OpenFileDescription&, unsigned request, Us
|
|||
return copy_to_user(user_head_mode_setting, &head_mode_setting);
|
||||
}
|
||||
case GRAPHICS_IOCTL_GET_HEAD_EDID: {
|
||||
auto user_head_edid = static_ptr_cast<FBHeadEDID*>(arg);
|
||||
FBHeadEDID head_edid {};
|
||||
auto user_head_edid = static_ptr_cast<GraphicsHeadEDID*>(arg);
|
||||
GraphicsHeadEDID head_edid {};
|
||||
TRY(copy_from_user(&head_edid, user_head_edid));
|
||||
|
||||
auto edid_bytes = TRY(get_edid());
|
||||
|
@ -208,7 +208,7 @@ ErrorOr<void> DisplayConnector::ioctl(OpenFileDescription&, unsigned request, Us
|
|||
return copy_to_user(user_head_edid, &head_edid);
|
||||
}
|
||||
case GRAPHICS_IOCTL_SET_HEAD_MODE_SETTING: {
|
||||
auto user_mode_setting = static_ptr_cast<FBHeadModeSetting const*>(arg);
|
||||
auto user_mode_setting = static_ptr_cast<GraphicsHeadModeSetting const*>(arg);
|
||||
auto head_mode_setting = TRY(copy_typed_from_user(user_mode_setting));
|
||||
|
||||
if (head_mode_setting.horizontal_stride < 0)
|
||||
|
@ -270,7 +270,7 @@ ErrorOr<void> DisplayConnector::ioctl(OpenFileDescription&, unsigned request, Us
|
|||
return {};
|
||||
}
|
||||
|
||||
auto user_head_vertical_buffer_offset = static_ptr_cast<FBHeadVerticalOffset const*>(arg);
|
||||
auto user_head_vertical_buffer_offset = static_ptr_cast<GraphicsHeadVerticalOffset const*>(arg);
|
||||
auto head_vertical_buffer_offset = TRY(copy_typed_from_user(user_head_vertical_buffer_offset));
|
||||
|
||||
SpinlockLocker locker(m_modeset_lock);
|
||||
|
@ -285,8 +285,8 @@ ErrorOr<void> DisplayConnector::ioctl(OpenFileDescription&, unsigned request, Us
|
|||
return {};
|
||||
}
|
||||
case GRAPHICS_IOCTL_GET_HEAD_VERTICAL_OFFSET_BUFFER: {
|
||||
auto user_head_vertical_buffer_offset = static_ptr_cast<FBHeadVerticalOffset*>(arg);
|
||||
FBHeadVerticalOffset head_vertical_buffer_offset {};
|
||||
auto user_head_vertical_buffer_offset = static_ptr_cast<GraphicsHeadVerticalOffset*>(arg);
|
||||
GraphicsHeadVerticalOffset head_vertical_buffer_offset {};
|
||||
TRY(copy_from_user(&head_vertical_buffer_offset, user_head_vertical_buffer_offset));
|
||||
|
||||
head_vertical_buffer_offset.offsetted = m_vertical_offsetted;
|
||||
|
|
|
@ -40,8 +40,8 @@ ErrorOr<void> GenericFramebufferDevice::ioctl(OpenFileDescription&, unsigned req
|
|||
}
|
||||
switch (request) {
|
||||
case GRAPHICS_IOCTL_GET_PROPERTIES: {
|
||||
auto user_properties = static_ptr_cast<FBProperties*>(arg);
|
||||
FBProperties properties {};
|
||||
auto user_properties = static_ptr_cast<GraphicsConnectorProperties*>(arg);
|
||||
GraphicsConnectorProperties properties {};
|
||||
auto adapter = m_graphics_adapter.strong_ref();
|
||||
if (!adapter)
|
||||
return Error::from_errno(EIO);
|
||||
|
@ -65,8 +65,8 @@ ErrorOr<void> GenericFramebufferDevice::ioctl(OpenFileDescription&, unsigned req
|
|||
return copy_to_user(user_head_properties, &head_properties);
|
||||
}
|
||||
case GRAPHICS_IOCTL_GET_HEAD_EDID: {
|
||||
auto user_head_edid = static_ptr_cast<FBHeadEDID*>(arg);
|
||||
FBHeadEDID head_edid {};
|
||||
auto user_head_edid = static_ptr_cast<GraphicsHeadEDID*>(arg);
|
||||
GraphicsHeadEDID head_edid {};
|
||||
TRY(copy_from_user(&head_edid, user_head_edid));
|
||||
TRY(verify_head_index(head_edid.head_index));
|
||||
|
||||
|
@ -99,7 +99,7 @@ ErrorOr<void> GenericFramebufferDevice::ioctl(OpenFileDescription&, unsigned req
|
|||
return {};
|
||||
}
|
||||
case GRAPHICS_IOCTL_SET_HEAD_VERTICAL_OFFSET_BUFFER: {
|
||||
auto user_head_vertical_buffer_offset = static_ptr_cast<FBHeadVerticalOffset const*>(arg);
|
||||
auto user_head_vertical_buffer_offset = static_ptr_cast<GraphicsHeadVerticalOffset const*>(arg);
|
||||
auto head_vertical_buffer_offset = TRY(copy_typed_from_user(user_head_vertical_buffer_offset));
|
||||
TRY(verify_head_index(head_vertical_buffer_offset.head_index));
|
||||
|
||||
|
@ -109,8 +109,8 @@ ErrorOr<void> GenericFramebufferDevice::ioctl(OpenFileDescription&, unsigned req
|
|||
return {};
|
||||
}
|
||||
case GRAPHICS_IOCTL_GET_HEAD_VERTICAL_OFFSET_BUFFER: {
|
||||
auto user_head_vertical_buffer_offset = static_ptr_cast<FBHeadVerticalOffset*>(arg);
|
||||
FBHeadVerticalOffset head_vertical_buffer_offset {};
|
||||
auto user_head_vertical_buffer_offset = static_ptr_cast<GraphicsHeadVerticalOffset*>(arg);
|
||||
GraphicsHeadVerticalOffset head_vertical_buffer_offset {};
|
||||
TRY(copy_from_user(&head_vertical_buffer_offset, user_head_vertical_buffer_offset));
|
||||
TRY(verify_head_index(head_vertical_buffer_offset.head_index));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue