dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Shashank Sharma <shashank.sharma@intel.com>
Cc: intel-gfx-trybot@lists.freedesktop.org,
	Jose Abreu <jose.abreu@synopsys.com>,
	aknautiy <ankit.k.nautiyal@intel.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [REBASE 3/5] drm: Expose modes with aspect ratio, only if requested
Date: Tue, 21 Nov 2017 19:11:10 +0200	[thread overview]
Message-ID: <20171121171110.GG10981@intel.com> (raw)
In-Reply-To: <1510911032-25036-4-git-send-email-shashank.sharma@intel.com>

On Fri, Nov 17, 2017 at 03:00:30PM +0530, Shashank Sharma wrote:
> From: aknautiy <ankit.k.nautiyal@intel.com>
> 
> We parse the EDID and add all the modes in the connector's
> modelist. This adds CEA modes with aspect ratio information
> too, regadless of if user space requested this information or
> not.
> 
> This patch prunes the modes with aspect-ratio information, from
> a connector's modelist, if the user-space has not set the aspect
> ratio DRM client cap.
> 
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: Jose Abreu <jose.abreu@synopsys.com>
> 
> Signed-off-by: aknautiy <ankit.k.nautiyal@intel.com>
> ---
>  drivers/gpu/drm/drm_connector.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 704fc89..a246bb5 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -1285,6 +1285,13 @@ static bool drm_mode_expose_to_userspace(const struct drm_display_mode *mode,
>  	 */
>  	if (!file_priv->stereo_allowed && drm_mode_is_stereo(mode))
>  		return false;
> +	/*
> +	 * If user-space hasn't configured the driver to expose the modes
> +	 * with aspect-ratio, don't expose them.
> +	 */
> +	if (!file_priv->aspect_ratio_allowed &&
> +	    mode->picture_aspect_ratio != HDMI_PICTURE_ASPECT_NONE)
> +		return false;

I don't think we can just blindly drop the modes. We would have to
expose them with the aspect ratio cleared. That could lead to
duplicates, but I'm thinking that shouldn't be a real problem for
userspace. Having to filteri out the duplicates would certainly
complicate things a bit.

>  
>  	return true;
>  }
> -- 
> 2.7.4

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-11-21 17:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17  9:30 [REBASE 0/5] Aspect ratio support in DRM layer Shashank Sharma
2017-11-17  9:30 ` [REBASE 1/5] drm: Add DRM client cap for aspect-ratio Shashank Sharma
2017-11-17  9:30 ` [REBASE 2/5] drm: Handle aspect ratio in modeset paths Shashank Sharma
2017-11-21 17:11   ` Ville Syrjälä
2017-11-24  9:00     ` Nautiyal, Ankit K
2017-11-17  9:30 ` [REBASE 3/5] drm: Expose modes with aspect ratio, only if requested Shashank Sharma
2017-11-21 17:11   ` Ville Syrjälä [this message]
2017-11-24  9:06     ` Sharma, Shashank
2017-11-24 13:20       ` Ville Syrjälä
2017-11-17  9:30 ` [REBASE 4/5] drm: Add aspect ratio parsing in DRM layer Shashank Sharma
2017-11-17  9:30 ` [REBASE 5/5] drm: Add and handle new aspect ratios " Shashank Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171121171110.GG10981@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx-trybot@lists.freedesktop.org \
    --cc=jose.abreu@synopsys.com \
    --cc=shashank.sharma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox