public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: Daniel Vetter <daniel@ffwll.ch>,
	Shashank Sharma <shashank.sharma@intel.com>
Cc: daniel.vetter@intel.com, intel-gfx@lists.freedesktop.org,
	Carlos Palminha <CARLOS.PALMINHA@synopsys.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 0/4]: Picture aspect ratio support in DRM layer
Date: Wed, 3 Aug 2016 14:08:16 +0100	[thread overview]
Message-ID: <57A1ECC0.3050203@synopsys.com> (raw)
In-Reply-To: <20160803114823.GM6232@phenom.ffwll.local>

Hi,


On 03-08-2016 12:48, Daniel Vetter wrote:
> On Wed, Aug 03, 2016 at 04:26:24PM +0530, Shashank Sharma wrote:
>> This patch series adds 4 patches.
>> - The first two patches add aspect ratio support in DRM layes
>> - Next two patches add new aspect ratios defined in CEA-861-F
>>   supported for HDMI 2.0 4k modes.
>>
>> Adding aspect ratio support in DRM layer:
>> - The CEA videmodes contain aspect ratio information, which we
>>   parse when we read the modes from EDID. But while transforming
>>   user_mode to kernel_mode or viceversa, DRM layer lose this
>>   information.
>> - HDMI compliance testing for CEA modes, expects the AVI info frames
>>   to contain exact VIC no for the 'video mode under test'. Now CEA
>>   modes have different VIC for same modes but different aspect ratio
>>   for example:
>> 	VIC 2 = 720x480@60 4:3 
>> 	VIC 3 = 720x480@60 16:9
>>   In this way, lack of aspect ratio information, can cause wrong VIC
>>   no in AVI IF, causing HDMI complaince test to fail.
>> - This patch set adds code, which embeds the aspect ratio information
>>   also in DRM video mode flags, and uses it while comparing two modes. 
>>
>> Adding new aspect ratios for HDMI 2.0
>> - CEA-861-F defines two new aspect ratios, to be used for 4k HDMI 2.0
>>   modes.
>> 	- 64:27
>> 	- 256:135
>> Last two patches in the series, adds code to handle these new
>> aspect ratios.
>>
>> Shashank Sharma (4):
>>   drm: add picture aspect ratio flags
>>   drm: Add aspect ratio parsing in DRM layer
>>   video: Add new aspect ratios for HDMI 2.0
>>   drm: Add and handle new aspect ratios in DRM layer
> Patch series seems to have 0 changelogs anywhere, but I'm pretty sure I've
> seen this before. Please try again and state what changed and why you are
> resubmitting this.
> -Daniel

I've also seen this before and I am using them in order to pass
HDMI compliance. Without these patches the compliance fails.
Still, I've made some changes which I can submit. I've some
comments to you (Shashank):

First, you add an if condition in
drm_mode_equal_no_clocks_no_stereo() (patch 2) which
unconditionally compares the aspect ratio. But I think that you
have to take into account that some modes handed by the user to
the DRM layer do not initialize this field so I think the best
solution would be to compare the aspect ratios only when the
field is populated (i.e. picture_aspect_ratio !=
HDMI_PICTURE_ASPECT_NONE).

Second, you are expecting that the picture aspect field is
correctly set in the HDMI parsing but, at least in the test
equipment that I am using, this field is not set by the DRM layer
because the mode is coming in the detailed timings section which
does not include a picture aspect field. In my implementation I
add a function which given the mode width and height (fields
->width_mm and ->height_mm of mode) computes the aspect ratio and
populates the field.

Third, I am facing some difficulties when using Xserver and
Xrandr. Using libdrm's modetest application everything works ok
but with xrandr the aspect ratio gets lost between the link DRM
-> Xserver -> DRM. I set the aspect ratio in the flags field when
passing the mode to user level (just like you do in patch 2) but
then when the mode is returned and delivered to the DRM driver
the picture aspect is not present. I think this is due to how
Xserver or xrandr sets the mode but I am not sure.

@Daniel, can you give some comments regarding this?

>>  drivers/gpu/drm/drm_modes.c | 43 +++++++++++++++++++++++++++++++++++++++++++
>>  drivers/video/hdmi.c        |  4 ++++
>>  include/linux/hdmi.h        |  2 ++
>>  include/uapi/drm/drm_mode.h | 24 +++++++++++++++++++-----
>>  4 files changed, 68 insertions(+), 5 deletions(-)
>>
>> -- 
>> 1.9.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Best regards,
Jose Miguel Abreu
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-08-03 13:08 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 10:56 [PATCH 0/4]: Picture aspect ratio support in DRM layer Shashank Sharma
2016-08-03 10:56 ` [PATCH 1/4] drm: add picture aspect ratio flags Shashank Sharma
2016-08-03 17:40   ` Sean Paul
2016-08-04  9:19     ` Sharma, Shashank
2016-08-04  9:42   ` Emil Velikov
2016-08-04 10:16     ` Sharma, Shashank
2016-08-04 10:36       ` [Intel-gfx] " Daniel Vetter
2016-08-04 13:05         ` Sharma, Shashank
2016-08-04 16:04           ` Daniel Vetter
2016-08-04 11:34       ` Emil Velikov
2016-08-04 13:15         ` Sharma, Shashank
2016-08-04 14:31           ` Emil Velikov
2016-08-04 16:09             ` Daniel Vetter
2016-08-05  3:37               ` [Intel-gfx] " Sharma, Shashank
2016-08-09 13:12                 ` Jose Abreu
2016-08-09 13:44                   ` [Intel-gfx] " Daniel Vetter
2016-08-09 13:57                     ` Sharma, Shashank
2016-08-18 10:15               ` Emil Velikov
2016-08-03 10:56 ` [PATCH 2/4] drm: Add aspect ratio parsing in DRM layer Shashank Sharma
2016-08-03 17:44   ` Sean Paul
2016-08-04  9:22     ` Sharma, Shashank
2016-08-03 10:56 ` [PATCH 3/4] video: Add new aspect ratios for HDMI 2.0 Shashank Sharma
2016-08-03 17:47   ` Sean Paul
2016-08-03 10:56 ` [PATCH 4/4] drm: Add and handle new aspect ratios in DRM layer Shashank Sharma
2016-08-03 17:47   ` [Intel-gfx] " Sean Paul
2016-08-03 11:08 ` ✗ Ro.CI.BAT: failure for : Picture aspect ratio support " Patchwork
2016-08-03 11:48 ` [PATCH 0/4]: " Daniel Vetter
2016-08-03 13:08   ` Jose Abreu [this message]
2016-08-03 15:47     ` Sharma, Shashank
2016-08-04 14:16       ` Jose Abreu
2016-08-04 14:29         ` Sharma, Shashank
2016-08-04 15:13           ` Jose Abreu
2016-08-03 15:33   ` Sharma, Shashank

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=57A1ECC0.3050203@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=CARLOS.PALMINHA@synopsys.com \
    --cc=daniel.vetter@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --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