From: "Nautiyal, Ankit K" Subject: DRM Client capability for aspect ratio Date: Tue, 17 Oct 2017 15:38:14 +0530 Message-ID: <0631a271-8b7a-d14c-6790-d20b5fe9a891@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0355355654==" Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 397B96E21C for ; Tue, 17 Oct 2017 10:08:20 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org This is a multi-part message in MIME format. --===============0355355654== Content-Type: multipart/alternative; boundary="------------63EC7971EE1DDDE63C28A7A2" This is a multi-part message in MIME format. --------------63EC7971EE1DDDE63C28A7A2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------63EC7971EE1DDDE63C28A7A2 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

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

--------------63EC7971EE1DDDE63C28A7A2-- --===============0355355654== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0355355654==--