dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v7 5/9] drm: Handle aspect-ratio info in getblob
Date: Mon, 12 Mar 2018 16:10:04 +0200	[thread overview]
Message-ID: <20180312141004.GD5453@intel.com> (raw)
In-Reply-To: <5339072d-6507-977c-c246-7de52dbab39e@intel.com>

On Mon, Mar 12, 2018 at 01:32:48PM +0530, Nautiyal, Ankit K wrote:
> 
> 
> On 3/9/2018 6:40 PM, Ville Syrjälä wrote:
> > IIRC I did have a few more patches in my last inforame series to make
> > sure we don't send invalid aspect ratio values in the infoframe. Unless
> > something has changed I believe we still need those as well. Or am I
> > wrong?
> 
> You are right, There are two patches:
> https://patchwork.freedesktop.org/patch/188049/
> and https://patchwork.freedesktop.org/patch/188051/
> from the info-frame clean up series, both of which have already received 
> r-b.
> 
> These patches need a little change, as they reject picture aspect ratio  
>  > 16:9
> Since we are adding support of 64:27 and 256:135, then we need to update 
> the reject condition.

IIRC the whole point was that the inforframe can't convey 64:27 or
256:135. Thus the >16:9 cheeck still looks correct to me.

> I can make the required changes and add these two patches as part of 
> this series.
> 
> What do you suggest? Is it fine to make these changes?
> 
> Regards,
> Ankit
> >
> >> diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
> >> index c37ac41..0a9c879 100644
> >> --- a/drivers/gpu/drm/drm_property.c
> >> +++ b/drivers/gpu/drm/drm_property.c
> >> @@ -757,6 +757,11 @@ int drm_mode_getblob_ioctl(struct drm_device *dev,
> >>   			ret = -EFAULT;
> >>   			goto unref;
> >>   		}
> >> +		if (blob->is_video_mode) {
> >> +			struct drm_mode_modeinfo __user *mode =
> >> +				u64_to_user_ptr(out_resp->data);
> >> +			drm_mode_handle_aspect_ratio(file_priv, &mode->flags);
> >> +		}
> >>   	}
> >>   	out_resp->length = blob->length;
> >>   unref:
> >> diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
> >> index 2f78b7e..51d1188 100644
> >> --- a/include/drm/drm_modes.h
> >> +++ b/include/drm/drm_modes.h
> >> @@ -461,6 +461,10 @@ bool drm_mode_is_420_also(const struct drm_display_info *display,
> >>   			  const struct drm_display_mode *mode);
> >>   bool drm_mode_is_420(const struct drm_display_info *display,
> >>   		     const struct drm_display_mode *mode);
> >> +bool drm_mode_aspect_ratio_allowed(const struct drm_file *file_priv,
> >> +				   uint32_t flags);
> >> +void drm_mode_handle_aspect_ratio(const struct drm_file *file_priv,
> >> +				  uint32_t *flags);
> >>   
> >>   struct drm_display_mode *drm_cvt_mode(struct drm_device *dev,
> >>   				      int hdisplay, int vdisplay, int vrefresh,
> >> diff --git a/include/drm/drm_property.h b/include/drm/drm_property.h
> >> index 8a522b4..95e6e32 100644
> >> --- a/include/drm/drm_property.h
> >> +++ b/include/drm/drm_property.h
> >> @@ -194,6 +194,7 @@ struct drm_property {
> >>    * @head_global: entry on the global blob list in
> >>    * 	&drm_mode_config.property_blob_list.
> >>    * @head_file: entry on the per-file blob list in &drm_file.blobs list.
> >> + * @is_video_mode: flag to mark the blobs that contain drm_mode_modeinfo.
> >>    * @length: size of the blob in bytes, invariant over the lifetime of the object
> >>    * @data: actual data, embedded at the end of this structure
> >>    *
> >> @@ -208,6 +209,7 @@ struct drm_property_blob {
> >>   	struct drm_device *dev;
> >>   	struct list_head head_global;
> >>   	struct list_head head_file;
> >> +	bool is_video_mode;
> >>   	size_t length;
> >>   	unsigned char data[];
> >>   };
> >> -- 
> >> 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:[~2018-03-12 14:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 12:07 [PATCH v6 0/9] Aspect ratio support in DRM layer Nautiyal, Ankit K
2018-03-06 12:07 ` [PATCH v6 1/9] drm/modes: Introduce drm_mode_match() Nautiyal, Ankit K
2018-03-06 12:07 ` [PATCH v6 2/9] drm/edid: Use drm_mode_match_no_clocks_no_stereo() for consistentcy Nautiyal, Ankit K
2018-03-06 12:07 ` [PATCH v6 3/9] drm/edid: Fix cea mode aspect ratio handling Nautiyal, Ankit K
2018-03-06 12:07 ` [PATCH v6 4/9] drm: Add DRM client cap for aspect-ratio Nautiyal, Ankit K
2018-03-06 12:07 ` [PATCH v6 5/9] drm: Handle aspect-ratio info in getblob Nautiyal, Ankit K
2018-03-06 23:19   ` kbuild test robot
2018-03-07  1:06   ` kbuild test robot
2018-03-09  5:37     ` [PATCH v7 " Nautiyal, Ankit K
2018-03-09 13:10       ` Ville Syrjälä
2018-03-12  8:02         ` Nautiyal, Ankit K
2018-03-12 14:10           ` Ville Syrjälä [this message]
2018-03-06 12:07 ` [PATCH v6 6/9] drm: Handle aspect ratio info in legacy and atomic modeset paths Nautiyal, Ankit K
2018-03-06 12:07 ` [PATCH v6 7/9] drm: Expose modes with aspect ratio, only if requested Nautiyal, Ankit K
2018-03-06 12:07 ` [PATCH v6 8/9] drm: Add aspect ratio parsing in DRM layer Nautiyal, Ankit K
2018-03-06 12:07 ` [PATCH v6 9/9] drm: Add and handle new aspect ratios " Nautiyal, Ankit K

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=20180312141004.GD5453@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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