From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Sharma, Shashank" <shashank.sharma@intel.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>,
"Jia, Lin A" <lin.a.jia@intel.com>,
Akashdeep Sharma <akashdeep.sharma@intel.com>,
Emil Velikov <emil.l.velikov@gmail.com>,
dri-devel@lists.freedesktop.org,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Jim Bride <jim.bride@linux.intel.com>
Subject: Re: [PATCH 1/2] Revert "drm: Add and handle new aspect ratios in DRM layer"
Date: Mon, 14 Nov 2016 17:49:37 +0200 [thread overview]
Message-ID: <20161114154937.GY31595@intel.com> (raw)
In-Reply-To: <69c7ad2d-be85-b7c5-4a89-3fa4f37f44e2@intel.com>
On Mon, Nov 14, 2016 at 08:14:34PM +0530, Sharma, Shashank wrote:
> Regards
> Shashank
> > the revert:
> >
> > HDMI2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 700mm x 390mm
> > - 1920x1080 60.00*+
> > - 1920x1080i 60.00 50.00
> > + 1920x1080 60.00*+ 50.00 59.94 30.00 25.00 24.00 29.97 23.98
> > + 1920x1080i 60.00 50.00 59.94
> > 1600x1200 60.00
> > 1680x1050 59.88
> > 1280x1024 75.02 60.02
> > @@ -13,30 +13,29 @@
> > 1360x768 60.02
> > 1280x800 59.91
> > 1152x864 75.00
> > - 1280x720 60.00 50.00
> > + 1280x720 60.00 50.00 59.94
> > 1024x768 75.03 70.07 60.00
> > 832x624 74.55
> > 800x600 72.19 75.00 60.32
> > - 640x480 75.00 72.81 66.67 59.94
> > + 720x576 50.00
> > + 720x480 60.00 59.94
> > + 640x480 75.00 72.81 66.67 60.00 59.94
> > 720x400 70.08
> None of these aspect ratios are new modes / new aspect ratios from HDMI
> 2.0/CEA-861-F
> These are the existing modes, and should be independent of reverted
> patches.
They're affected because your patches changed them by adding the aspect
ratio flags to them.
> > This was with sna, which does this:
> > #define KNOWN_MODE_FLAGS ((1<<14)-1)
> > if (mode->status == MODE_OK && kmode->flags & ~KNOWN_MODE_FLAGS)
> > mode->status = MODE_BAD; /* unknown flags => unhandled */
> > so all the modes with an aspect ratio just vanished.
> >
> > -modesetting and -ati on the other hand just copy over the unknown
> > bits into the xrandr mode structure, which sounds dubious at best:
> > mode->Flags = kmode->flags; //& FLAG_BITS;
> > I've not checked what damage it can actually cause.
> >
> >
> > It looks like a few modes disappeared from the kernel's mode list
> > as well, presumably because some cea modes in the list originated from
> > DTDs and whanot so they don't have an aspect ratio and that causes
> > add_alternate_cea_modes() to ignore them. So not populating an aspect
> > ratio for cea modes originating from a source other than
> > edid_cea_modes[] looks like another bug to me as well.
> I am writing a patch series to cap the aspect ratio implementation under
> a drm_cap_hdmi2_aspect_ratios
> This is how its going to work (inspired from the 2D/stereo series from
> damien L)
>
> - Add a new capability hdmi2_ar
It should be just a generic "expose aspect ratio flags to userspace?"
> - by default parsing the new hdmi 2.0 aspect ratio will be disabled
> under check of this cap
> - during bootup time, while initializing the display, a userspace can
> get_cap on the hdmi2_aspect_ratio
> - If it wants HDMI 2.0 aspect ratio support, it will set the cap, and
> kernel will expose these aspect ratios
> > Another bug I think might be the ordering of the modes with aspect ratio
> > specified. IIRC the spec says that the preferred aspect ratio should be
> > listed first in the EDID, but I don't think we preserve that ordering
> > in the final mode list. I guess we could fix that by somehow noting
> > which aspect ratio is preferred and sort based on that, or we try to
> > preserve the order from the EDID until we're ready to sort, and then do
> > the sorting with a stable algorithm.
> AFAIK The mode order and priority is decided and arranged in userspace,
> based on various factors like
> - preferred mode.
> - previously applied mode in previous sessions (like for android tvs)
> - Bigger h/w vs better refresh rate ?
> - Xserver applies its own algorithms to decide which mode should be
> shown first.
Xorg does sort on its own. But since it doesn't know anything about
aspect ratios and whatnot I wouldn't rely on that for anything. I
also wouldn't expect eg. wayland compositors to do their own sorting.
And yeah, looks like weston at least doesn't do any sorting whatsoever.
>
> I dont think kernel needs to bother about it.
So I'm going to say that we in fact do need to bother.
--
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-11-14 15:49 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 12:31 [PATCH 1/2] Revert "drm: Add and handle new aspect ratios in DRM layer" ville.syrjala
2016-11-03 12:31 ` [PATCH 2/2] Revert "drm: Add aspect ratio parsing " ville.syrjala
2016-11-03 12:47 ` Sharma, Shashank
[not found] ` <FF3DDC77922A8A4BB08A3BC48A1EA8CB411AE158@BGSMSX101.gar.corp.intel.com>
[not found] ` <20161103130253.GM4617@intel.com>
2016-11-03 13:04 ` [PATCH 1/2] Revert "drm: Add and handle new aspect ratios " Ville Syrjälä
2016-11-03 13:09 ` Ville Syrjälä
2016-11-03 13:22 ` Sharma, Shashank
[not found] ` <2ededbc1-b923-200e-8443-f1ee522402bf@intel.com>
2016-11-03 13:26 ` Ville Syrjälä
2016-11-03 13:34 ` Sharma, Shashank
2016-11-03 13:49 ` Ville Syrjälä
2016-11-03 16:03 ` Daniel Vetter
2016-11-03 16:19 ` Sharma, Shashank
2016-11-07 7:43 ` Sharma, Shashank
2016-11-07 15:26 ` Emil Velikov
2016-11-07 15:48 ` Sharma, Shashank
2016-11-07 16:57 ` Emil Velikov
2016-11-03 16:02 ` Daniel Vetter
2016-11-11 17:00 ` Ville Syrjälä
2016-11-11 17:03 ` Ville Syrjälä
2016-11-11 17:07 ` Alex Deucher
2016-11-11 17:08 ` Daniel Vetter
2016-11-11 17:22 ` Ville Syrjälä
2016-11-14 14:44 ` Sharma, Shashank
2016-11-14 15:49 ` Ville Syrjälä [this message]
2016-11-14 16:07 ` Sharma, Shashank
2016-11-14 16:20 ` Ville Syrjälä
2016-11-14 16:42 ` Sharma, Shashank
2016-11-14 16:45 ` Ville Syrjälä
2016-11-14 16:56 ` Sharma, Shashank
2016-11-15 8:51 ` Daniel Vetter
2016-11-15 9:00 ` Sharma, Shashank
2016-11-15 10:00 ` Daniel Vetter
2016-11-15 10:06 ` Sharma, Shashank
2016-11-15 10:52 ` Daniel Vetter
2016-11-15 13:48 ` Jose Abreu
2016-11-15 14:18 ` Ville Syrjälä
2016-11-15 15:10 ` Sharma, Shashank
2016-11-15 15:18 ` Ville Syrjälä
2016-11-15 15:13 ` Sharma, Shashank
2016-11-15 13:54 ` Ville Syrjälä
2016-11-15 14:03 ` Daniel Vetter
2016-11-15 14:18 ` Alex Deucher
2016-11-15 14:24 ` Ville Syrjälä
2016-11-15 14:26 ` Daniel Vetter
2016-11-15 15:26 ` Alex Deucher
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=20161114154937.GY31595@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=Jose.Abreu@synopsys.com \
--cc=akashdeep.sharma@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=jim.bride@linux.intel.com \
--cc=lin.a.jia@intel.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;
as well as URLs for NNTP newsgroup(s).