Re: [PATCH] [rfc] drm: add some caps for userspace to discover more info for dumb KMS driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Dave Airlie <airlied@xxxxxxxxxx>
> 
> For the simple KMS driver case we need some more info about argb cursor
> limits and a preferred depth and if shadowed framebuffer access is preferred.
> 
> I've only added this for intel/radeon which support the dumb ioctls so far.
> 
> I really don't want to expose a truck load of info, just enough for X to
> start without configuration with a hw cursor.
> 
> If you need something really fancy you should be writing a real X.org driver.
> ---
>  drivers/gpu/drm/drm_ioctl.c             |   12 ++++++++++++
>  drivers/gpu/drm/i915/intel_display.c    |    5 +++++
>  drivers/gpu/drm/radeon/radeon_display.c |    5 +++++
>  include/drm/drm.h                       |    4 ++++
>  include/drm/drm_crtc.h                  |    4 ++++
>  5 files changed, 30 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index 904d7e9..37d2ce7 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -283,6 +283,18 @@ int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
>  	case DRM_CAP_VBLANK_HIGH_CRTC:
>  		req->value = 1;
>  		break;
> +	case DRM_CAP_DUMB_ARGB_CURSOR_WIDTH:
> +		req->value = dev->mode_config.max_cursor_width;
> +		break;
> +	case DRM_CAP_DUMB_ARGB_CURSOR_HEIGHT:
> +		req->value = dev->mode_config.max_cursor_height;
> +		break;
> +	case DRM_CAP_DUMB_PREFERRED_DEPTH:
> +		req->value = dev->mode_config.preferred_depth;
> +		break;
> +	case DRM_CAP_DUMB_PREFER_SHADOW:
> +		req->value = dev->mode_config.prefer_shadow;
> +		break;
>  	default:
>  		return -EINVAL;
>  	}

Could it be possible to make it a per drm_crtc. I have run into the 
issue of the case of a system with 2 CRTC but the hardware cursor is 
supported on only one CRTC. The other is that the cursor dimensions might 
actually vary on each CRTC.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux