DRM Client Capability for aspect ratio
Nautiyal, Ankit K
ankit.k.nautiyal at intel.com
Tue Oct 17 09:55:47 UTC 2017
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 requesteddrmModeModeInfo 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171017/40b6e3ff/attachment-0001.html>
More information about the dri-devel
mailing list