drm/vmwgfx: Allow userspace to change default layout. Bump minor.
Subsystems (3)
PATCH 1/1 drm/vmwgfx: Allow userspace to change default layout. Bump minor.
From: Jakob Bornecrantz <[email protected]>
The host may change the layout and, since the change is communicated to the master, the master needs a way to communicate the change to the kernel driver.
The minor version number is bumped to advertize the availability of this feature.
Signed-off-by Jakob Bornecrantz <[email protected]>
Signed-off-by Thomas Hellstrom <[email protected]>
--- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 7 +++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 45 +++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 83 ++++++++++++++++++++++++++++++++--- include/drm/vmwgfx_drm.h | 26 +++++++++++ 6 files changed, 160 insertions(+), 9 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +6 -1
@@ -88,6 +88,9 @@#define DRM_IOCTL_VMW_FENCE_WAIT \ DRM_IOWR(DRM_COMMAND_BASE + DRM_VMW_FENCE_WAIT, \ struct drm_vmw_fence_wait_arg) +#define DRM_IOCTL_VMW_UPDATE_LAYOUT \ + DRM_IOWR(DRM_COMMAND_BASE + DRM_VMW_UPDATE_LAYOUT, \ + struct drm_vmw_update_layout_arg)/**
@@ -135,7 +138,9 @@ static struct drm_ioctl_desc vmw_ioctls[] = {VMW_IOCTL_DEF (DRM_IOCTL_VMW_FIFO_DEBUG , vmw_fifo_debug_ioctl,DRM_AUTH |DRM_ROOT_ONLY |DRM_MASTER |DRM_UNLOCKED ),VMW_IOCTL_DEF (DRM_IOCTL_VMW_FENCE_WAIT , vmw_fence_wait_ioctl, -DRM_AUTH |DRM_UNLOCKED ) +DRM_AUTH |DRM_UNLOCKED ), +VMW_IOCTL_DEF (DRM_IOCTL_VMW_UPDATE_LAYOUT , vmw_kms_update_layout_ioctl, +DRM_MASTER |DRM_CONTROL_ALLOW |DRM_UNLOCKED ) }; static struct pci_device_id vmw_pci_id_list[] = {
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +3 -1
@@ -41,7 +41,7 @@#define VMWGFX_DRIVER_DATE "20100209"#define VMWGFX_DRIVER_MAJOR 1 -#define VMWGFX_DRIVER_MINOR 1 +#define VMWGFX_DRIVER_MINOR 2#define VMWGFX_DRIVER_PATCHLEVEL 0#define VMWGFX_FILE_PAGE_OFFSET 0x00100000#define VMWGFX_FIFO_STATIC_SIZE (1024*1024)
@@ -509,6 +509,8 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf,void vmw_kms_write_svga (struct vmw_private *vmw_priv,unsigned width,unsigned height,unsigned pitch,unsigned bbp,unsigned depth); +int vmw_kms_update_layout_ioctl (struct drm_device *dev,void *data, +struct drm_file *file_priv);/** * Overlay control - vmwgfx_overlay.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +45 -0
48 lines not on this page · raw message
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h +3 -1
@@ -94,9 +94,11 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,int vmw_du_crtc_cursor_move (struct drm_crtc *crtc,int x,int y);/* -* Legacy display unit functions - vmwgfx_ldu.h +* Legacy display unit functions - vmwgfx_ldu.c */ int vmw_kms_init_legacy_display_system (struct vmw_private *dev_priv);int vmw_kms_close_legacy_display_system (struct vmw_private *dev_priv); +int vmw_kms_ldu_update_layout (struct vmw_private *dev_priv,unsigned num, +struct drm_vmw_rect *rects);#endif
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +77 -6
120 lines not on this page · raw message
include/drm/vmwgfx_drm.h +26 -0
@@ -50,6 +50,8 @@#define DRM_VMW_EXECBUF 12#define DRM_VMW_FIFO_DEBUG 13#define DRM_VMW_FENCE_WAIT 14 +/* guarded by minor version >= 2 */ +#define DRM_VMW_UPDATE_LAYOUT 15/*************************************************************************/
@@ -585,4 +587,28 @@ struct drm_vmw_stream_arg {* sure that the stream has been stopped. */ +/*************************************************************************/ +/** +* DRM_VMW_UPDATE_LAYOUT - Update layout +* +* Updates the prefered modes and connection status for connectors. The +* command conisits of one drm_vmw_update_layout_arg pointing out a array +* of num_outputs drm_vmw_rect's. +*/ + +/** +* struct drm_vmw_update_layout_arg +* +* @num_outputs: number of active +* @rects: pointer to array of drm_vmw_rect +* +* Input argument to the DRM_VMW_UPDATE_LAYOUT Ioctl. +*/ + +struct drm_vmw_update_layout_arg { +uint32_t num_outputs; +uint32_t pad64; +uint64_t rects; +}; +#endif
Signature · 1 line
1.6.2.5