DRM Client Capability for aspect ratio

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

 



Hi All,

 

I am working for adding the DRM Client cap for the aspect ratio support as part of the series:

https://patchwork.freedesktop.org/series/10850/ : Picture aspect ratio support in DRM layer by Shashank Sharma.

 

I have an open as to how to go about it.

 

I was going through the existing DRM Client Cap like DRM_CLIENT_CAP_STEREO_3D, DRM_CLIENT_CAP_ATOMIC.

 

On Similar lines, I was able to add the new DRM_CLIENT_CAP_ASPECT_RATIO. I also added a member 'aspect_ratio_required' in drm_file structure,

which is set, when the client calls drm_setclientcap( ), for aspect ratio, just like its being done for other DRM Client Caps.

 

Now what I want to do is

1.     Setting the aspect-ratio flag-bits (19-22) in drmModeModeInfo only if the client advertises that it requires the aspect-ratio.

So I need to have this information (that client requires aspect ratio) available in the function:

drm_mode_convert_to_umode( ) : Where the flag bits are actually set

 

2.     Similarly in case of modeset request from the client, we would want to parse the aspect ratio bits from the requested  drmModeModeInfo only if the client requires aspect ratio.

This will require change in the function:

drm_mode_convert_umode()  : Where the flag bits of  drm_mode_mode_info are read by the drm layer to determine the aspect ratio and set in drm_display_mode)

 

The problem is that, both these functions have drm_mode_mode_info and drm_display_mode as the only arguments, but our flag aspect_ratio_required is in file_priv (struct drm_file).

 

To do this there are two ways I can think of:

1.     Change the drm_mode_convert_umode() to include aspect_ratio_required flag.

        Before calling this function, the file_priv->aspect_ratio_required will be checked and the flag will be set accordingly.


2.     While getting the drmClientCap from client, instead of storing this information in file-priv, store this info in some other structure.

 

Is my understanding correct or is there any other way I should handle the drm client cap?


Thanks and Regards,

Ankit

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://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