Re: [Nouveau] [PATCH 5/6] drm: Delete "mandatory" stereographic modes

2017-01-18 Thread Alastair Bridgewater
On Wed, Jan 18, 2017 at 2:01 PM, Damien Lespiau 
wrote:
>
> On Wed, Jan 18, 2017 at 01:48:04PM -0500, Ilia Mirkin wrote:
> > After some more conversations with Alastair, it sounds like what's
> > actually going on is that it's just the frame-packing modes that
> > aren't working, but all the side-by-side and top-and-bottom modes from
> > the "mandatory" list work. At this point, I'm more inclined to believe
> > that there's an issue in the nouveau implementation for frame-packed
> > modes. But it could still be the TVs themselves that don't support
> > that at all.

By now, and having re-read the relevant spec extract a couple of times,
I'm convinced that the "mandatory" stereographic modes are just that, but
also that the current implementation is incorrect (if anything, too
conservative about adding modes).  In the unlikely event that a display
advertises only a 512x384x1bpp@60Hz mode (I don't even know if that's
possible in terms of an EDID, but let's take it as an example), but also
sets the 3D flag, it must support five specific 3D modes, but the current
implementation would match none.

I'm definitely willing to table changing the mandatory mode logic for the
time being, at least until the question of frame packing on my hardware
is sorted out.

> If Alastair has an intel GPU as well, an "easy" way to check if the
> frame packing modes of those TVs work would be to use the testdisplay[1]
> tool of intel-gpu-tools.

If I have an intel GPU handy, I think that it's getting disabled by the
system BIOS or something due to hardware configuration.  I have a couple
of things to try, and there might be a machine with an intel GPU that I
can borrow next week, though.

Should any intel GPU with an HDMI output work, or do I need to look for
something more specific?

I should also have access to the restore disks that came with some of my
hardware as of this weekend, so I can see what the, ah, *other* operating
system has to say about things.

> Shameless plug: http://damien.lespiau.name/2013/10/hdmi-stereo-3d-kms.html

I had found this, which led me to intel-gpu-tools, and thus testdisplay,
which is what I've been using.  It's a very nice explanation of how things
should work overall...  But it calls one question to mind: Is there userland
software other than testdisplay that does anything with stereo 3D support?

> Towards the end of the post, there are test display usage examples to go
> and test FP modes. Mind you, people have been trying to make
> intel-gpu-tools run on any DRM driver when possible, not sure how far we
> are with that though.

... Which raises the number of possibilities that we're dealing with to
three:

 1. The displays really don't support frame packing.

 2. There's something not yet right with nouveau that breaks frame packing.

 3. There's something not yet right with testdisplay that breaks frame
packing
on nouveau (I had previously presumed that testdisplay wasn't going to
be
a problem, but it sounds like it might be worth me digging into).

> --
> Damien
>
> [1]
http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/tree/tests/testdisplay.c

-- Alastair
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 5/6] drm: Delete "mandatory" stereographic modes

2017-01-18 Thread Damien Lespiau
On Wed, Jan 18, 2017 at 01:48:04PM -0500, Ilia Mirkin wrote:
> After some more conversations with Alastair, it sounds like what's
> actually going on is that it's just the frame-packing modes that
> aren't working, but all the side-by-side and top-and-bottom modes from
> the "mandatory" list work. At this point, I'm more inclined to believe
> that there's an issue in the nouveau implementation for frame-packed
> modes. But it could still be the TVs themselves that don't support
> that at all.

If Alastair has an intel GPU as well, an "easy" way to check if the
frame packing modes of those TVs work would be to use the testdisplay[1]
tool of intel-gpu-tools.

Shameless plug: http://damien.lespiau.name/2013/10/hdmi-stereo-3d-kms.html

Towards the end of the post, there are test display usage examples to go
and test FP modes. Mind you, people have been trying to make
intel-gpu-tools run on any DRM driver when possible, not sure how far we
are with that though.

-- 
Damien

[1] 
http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/tree/tests/testdisplay.c
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 5/6] drm: Delete "mandatory" stereographic modes

2017-01-18 Thread Damien Lespiau
On Wed, Jan 18, 2017 at 04:33:43PM +, Damien Lespiau wrote:
> On Wed, Jan 18, 2017 at 11:27:16AM -0500, Ilia Mirkin wrote:
> > Damien - did you ever test these mandatory modes on an actual
> > commercial 3D TV or similar device?
> 
> My main testing device was a Samsung TV with this 3D_present bit set and
> all the advertised modes were working. Can't quite remember if that
> included the interleaved mode.

I even pushed the EDID of that TV to edid-decode [1] if someone needs to
check that the EDID parsing is correct. It'd be interesting to see what
the tool has to say about the edid of the sink causing problems, in
particular compare the mandatory modes to the other modes advertised by
that TV. Maybe we could see some kind of pattern emerge, like the 3D
modes supported being the ones with the timings in table 8-15.

-- 
Damien

[1] https://cgit.freedesktop.org/xorg/app/edid-decode/
data/samsung-UE40D8000YU-hmdi
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 5/6] drm: Delete "mandatory" stereographic modes

2017-01-18 Thread Damien Lespiau
On Wed, Jan 18, 2017 at 11:27:16AM -0500, Ilia Mirkin wrote:
> Damien - did you ever test these mandatory modes on an actual
> commercial 3D TV or similar device?

My main testing device was a Samsung TV with this 3D_present bit set and
all the advertised modes were working. Can't quite remember if that
included the interleaved mode.

-- 
Damien
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 5/6] drm: Delete "mandatory" stereographic modes

2017-01-18 Thread Damien Lespiau
On Wed, Jan 18, 2017 at 12:10:56AM -0500, Ilia Mirkin wrote:
> On Tue, Jan 17, 2017 at 5:42 PM, Alastair Bridgewater
>  wrote:
> > HDMI specification 1.4a, table 8-15 is very explicitly a "must
> > support at least one of" table, not a "must support all of" table.
> > It is not hard to find hardware that does not support some of the
> > so-called "mandatory" modes.
> >
> > More seriously, this code generates invalid display modes for both
> > of the 3D-capable panels that I have (a 42-inch LG TV and a Sony
> > PlayStation 3D Display).
> >
> > If we want to be persnickety, one option would be to check the
> > final list of modes against the table and give some message if
> > none of them are valid, but it's a whole lot easier just to delete
> > the code in question.
> 
> Damien added this in commit c858cfcae6d some 3 years ago.
> 
> Damien, do you remember why you added these "required" modes? Did you
> have a monitor that only advertised 3D support without the actual
> modes?

Another quick glance at the specs leads me to believe c858cfcae6d is
correct.

8-15 does say that a sink supporting 3D must at lesst support one of the
modes listed in that table. But that's just the very start of the story
and we are really talking about the 3D_present bit in the HMDI VSDB and
the associated "mandatory" modes (the term comes from the spec).

HDMI 1.4a Page 155:

"3D_present [1bit] This bit indicates 3D support by the HDMI Sink,
including the mandatory formats. If set (=1), an HDMI Sink supports the
3D video formats that are mandatory formats," 

Continuing page 157:

"If 3D_present is set (=1), an HDMI Sink shall support 3D video formats
per the following requirements.
・An HDMI Sink which supports at least one 59.94 / 60Hz 2D video format
shall support *all* of "
・An HDMI Sink which supports at least one 50Hz 2D video format shall
support *all* of " 

The 3D pdf extraction from the spec is available would one want to
triple check the above:

   http://www.hdmi.org/manufacturer/specification.aspx

I have even dug up a direct link that someone made available:

  https://etmriwi.home.xs4all.nl/forum/hdmi_spec1.4a_3dextraction.pdf

Look for 3D_present, p. 15 and 17.

If the above is indeed correct, there may still be an issue in the way
we derive the mandatory modes - that part isn't really clear. Or, it
could be that people don't follow standards!

HTH,

-- 
Damien


___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 5/6] drm: Delete "mandatory" stereographic modes

2017-01-18 Thread Ilia Mirkin
On Wed, Jan 18, 2017 at 11:57 AM, Ilia Mirkin  wrote:
> On Wed, Jan 18, 2017 at 11:41 AM, Damien Lespiau
>  wrote:
>> On Wed, Jan 18, 2017 at 04:33:43PM +, Damien Lespiau wrote:
>>> On Wed, Jan 18, 2017 at 11:27:16AM -0500, Ilia Mirkin wrote:
>>> > Damien - did you ever test these mandatory modes on an actual
>>> > commercial 3D TV or similar device?
>>>
>>> My main testing device was a Samsung TV with this 3D_present bit set and
>>> all the advertised modes were working. Can't quite remember if that
>>> included the interleaved mode.
>>
>> I even pushed the EDID of that TV to edid-decode [1] if someone needs to
>> check that the EDID parsing is correct. It'd be interesting to see what
>> the tool has to say about the edid of the sink causing problems, in
>> particular compare the mandatory modes to the other modes advertised by
>> that TV. Maybe we could see some kind of pattern emerge, like the 3D
>> modes supported being the ones with the timings in table 8-15.
>
> This is Alastair's display (one of them): http://paste.lisp.org/display/335893
>
> I believe this is the interesting part:
>
>   Video data block
> VIC  16 1920x1080@60Hz
> VIC  31 1920x1080@50Hz
> VIC   5 1920x1080i@60Hz
> VIC  20 1920x1080i@50Hz
> VIC   4 1280x720@60Hz
> VIC  19 1280x720@50Hz
> VIC   3 720x480@60Hz
> VIC   2 720x480@60Hz
> VIC  18 720x576@50Hz
> VIC  17 720x576@50Hz
> VIC   7 1440x480i@60Hz
> VIC   6 1440x480i@60Hz
> VIC  22 1440x576i@50Hz
> VIC  21 1440x576i@50Hz
> VIC  32 1920x1080@24Hz
> VIC   1 640x480@60Hz
> ...
> Extended HDMI video details:
>   3D present
>   Base EDID image size is in units of 1cm
>   VIC index 2 supports side-by-side (half, horizontal)
>   VIC index 3 supports side-by-side (half, horizontal)
>   VIC index 4 supports side-by-side (half, horizontal)
>   VIC index 5 supports side-by-side (half, horizontal)
>   VIC index 14 supports side-by-side (half, horizontal)
>   VIC index 0 supports top-and-bottom
>   VIC index 1 supports top-and-bottom

And for the record, this is his other TV (available at the same paste
url as above):

  Video data block
VIC  16 1920x1080@60Hz (native)
VIC  34 1920x1080@30Hz
VIC  32 1920x1080@24Hz
VIC   5 1920x1080i@60Hz
VIC   4 1280x720@60Hz
VIC   3 720x480@60Hz
VIC   2 720x480@60Hz
VIC   1 640x480@60Hz
Extended HDMI video details:
  3D present
  3D-capable-VIC mask present
  3D: Side-by-side (half, horizontal)
  3D: Top-and-bottom
  3D VIC indices: 2 4
  VIC index 0 supports side-by-side (half, horizontal)
  VIC index 1 supports side-by-side (half, horizontal)
  VIC index 2 supports side-by-side (half, horizontal)
  VIC index 3 supports side-by-side (half, horizontal)
  VIC index 4 supports side-by-side (half, horizontal)

After some more conversations with Alastair, it sounds like what's
actually going on is that it's just the frame-packing modes that
aren't working, but all the side-by-side and top-and-bottom modes from
the "mandatory" list work. At this point, I'm more inclined to believe
that there's an issue in the nouveau implementation for frame-packed
modes. But it could still be the TVs themselves that don't support
that at all.

Cheers,

  -ilia
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 5/6] drm: Delete "mandatory" stereographic modes

2017-01-18 Thread Ilia Mirkin
On Wed, Jan 18, 2017 at 11:41 AM, Damien Lespiau
 wrote:
> On Wed, Jan 18, 2017 at 04:33:43PM +, Damien Lespiau wrote:
>> On Wed, Jan 18, 2017 at 11:27:16AM -0500, Ilia Mirkin wrote:
>> > Damien - did you ever test these mandatory modes on an actual
>> > commercial 3D TV or similar device?
>>
>> My main testing device was a Samsung TV with this 3D_present bit set and
>> all the advertised modes were working. Can't quite remember if that
>> included the interleaved mode.
>
> I even pushed the EDID of that TV to edid-decode [1] if someone needs to
> check that the EDID parsing is correct. It'd be interesting to see what
> the tool has to say about the edid of the sink causing problems, in
> particular compare the mandatory modes to the other modes advertised by
> that TV. Maybe we could see some kind of pattern emerge, like the 3D
> modes supported being the ones with the timings in table 8-15.

This is Alastair's display (one of them): http://paste.lisp.org/display/335893

I believe this is the interesting part:

  Video data block
VIC  16 1920x1080@60Hz
VIC  31 1920x1080@50Hz
VIC   5 1920x1080i@60Hz
VIC  20 1920x1080i@50Hz
VIC   4 1280x720@60Hz
VIC  19 1280x720@50Hz
VIC   3 720x480@60Hz
VIC   2 720x480@60Hz
VIC  18 720x576@50Hz
VIC  17 720x576@50Hz
VIC   7 1440x480i@60Hz
VIC   6 1440x480i@60Hz
VIC  22 1440x576i@50Hz
VIC  21 1440x576i@50Hz
VIC  32 1920x1080@24Hz
VIC   1 640x480@60Hz
...
Extended HDMI video details:
  3D present
  Base EDID image size is in units of 1cm
  VIC index 2 supports side-by-side (half, horizontal)
  VIC index 3 supports side-by-side (half, horizontal)
  VIC index 4 supports side-by-side (half, horizontal)
  VIC index 5 supports side-by-side (half, horizontal)
  VIC index 14 supports side-by-side (half, horizontal)
  VIC index 0 supports top-and-bottom
  VIC index 1 supports top-and-bottom
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 5/6] drm: Delete "mandatory" stereographic modes

2017-01-18 Thread Ilia Mirkin
On Wed, Jan 18, 2017 at 6:45 AM, Damien Lespiau
 wrote:
> On Wed, Jan 18, 2017 at 12:10:56AM -0500, Ilia Mirkin wrote:
>> On Tue, Jan 17, 2017 at 5:42 PM, Alastair Bridgewater
>>  wrote:
>> > HDMI specification 1.4a, table 8-15 is very explicitly a "must
>> > support at least one of" table, not a "must support all of" table.
>> > It is not hard to find hardware that does not support some of the
>> > so-called "mandatory" modes.
>> >
>> > More seriously, this code generates invalid display modes for both
>> > of the 3D-capable panels that I have (a 42-inch LG TV and a Sony
>> > PlayStation 3D Display).
>> >
>> > If we want to be persnickety, one option would be to check the
>> > final list of modes against the table and give some message if
>> > none of them are valid, but it's a whole lot easier just to delete
>> > the code in question.
>>
>> Damien added this in commit c858cfcae6d some 3 years ago.
>>
>> Damien, do you remember why you added these "required" modes? Did you
>> have a monitor that only advertised 3D support without the actual
>> modes?
>
> Another quick glance at the specs leads me to believe c858cfcae6d is
> correct.
>
> 8-15 does say that a sink supporting 3D must at lesst support one of the
> modes listed in that table. But that's just the very start of the story
> and we are really talking about the 3D_present bit in the HMDI VSDB and
> the associated "mandatory" modes (the term comes from the spec).
>
> HDMI 1.4a Page 155:
>
> "3D_present [1bit] This bit indicates 3D support by the HDMI Sink,
> including the mandatory formats. If set (=1), an HDMI Sink supports the
> 3D video formats that are mandatory formats,"
>
> Continuing page 157:
>
> "If 3D_present is set (=1), an HDMI Sink shall support 3D video formats
> per the following requirements.
> ・An HDMI Sink which supports at least one 59.94 / 60Hz 2D video format
> shall support *all* of "
> ・An HDMI Sink which supports at least one 50Hz 2D video format shall
> support *all* of "
>
> The 3D pdf extraction from the spec is available would one want to
> triple check the above:
>
>http://www.hdmi.org/manufacturer/specification.aspx
>
> I have even dug up a direct link that someone made available:
>
>   https://etmriwi.home.xs4all.nl/forum/hdmi_spec1.4a_3dextraction.pdf
>
> Look for 3D_present, p. 15 and 17.
>
> If the above is indeed correct, there may still be an issue in the way
> we derive the mandatory modes - that part isn't really clear. Or, it
> could be that people don't follow standards!

OK, so the text definitely makes it seem like you're right.

Damien - did you ever test these mandatory modes on an actual
commercial 3D TV or similar device?

Alastair - I think this warrants some more attempts at getting those
"extra" modes to work. I'd be especially curious whether the blob
shows support for these modes, or what Windows shows with any
hardware.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 5/6] drm: Delete "mandatory" stereographic modes

2017-01-17 Thread Ilia Mirkin
On Tue, Jan 17, 2017 at 5:42 PM, Alastair Bridgewater
 wrote:
> HDMI specification 1.4a, table 8-15 is very explicitly a "must
> support at least one of" table, not a "must support all of" table.
> It is not hard to find hardware that does not support some of the
> so-called "mandatory" modes.
>
> More seriously, this code generates invalid display modes for both
> of the 3D-capable panels that I have (a 42-inch LG TV and a Sony
> PlayStation 3D Display).
>
> If we want to be persnickety, one option would be to check the
> final list of modes against the table and give some message if
> none of them are valid, but it's a whole lot easier just to delete
> the code in question.

Damien added this in commit c858cfcae6d some 3 years ago.

Damien, do you remember why you added these "required" modes? Did you
have a monitor that only advertised 3D support without the actual
modes?

>
> Signed-off-by: Alastair Bridgewater 
> ---
>  drivers/gpu/drm/drm_edid.c | 66 
> --
>  1 file changed, 66 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 336be31..723116a 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2926,70 +2926,6 @@ do_cea_modes(struct drm_connector *connector, const u8 
> *db, u8 len)
> return modes;
>  }
>
> -struct stereo_mandatory_mode {
> -   int width, height, vrefresh;
> -   unsigned int flags;
> -};
> -
> -static const struct stereo_mandatory_mode stereo_mandatory_modes[] = {
> -   { 1920, 1080, 24, DRM_MODE_FLAG_3D_TOP_AND_BOTTOM },
> -   { 1920, 1080, 24, DRM_MODE_FLAG_3D_FRAME_PACKING },
> -   { 1920, 1080, 50,
> - DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF },
> -   { 1920, 1080, 60,
> - DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF },
> -   { 1280, 720,  50, DRM_MODE_FLAG_3D_TOP_AND_BOTTOM },
> -   { 1280, 720,  50, DRM_MODE_FLAG_3D_FRAME_PACKING },
> -   { 1280, 720,  60, DRM_MODE_FLAG_3D_TOP_AND_BOTTOM },
> -   { 1280, 720,  60, DRM_MODE_FLAG_3D_FRAME_PACKING }
> -};
> -
> -static bool
> -stereo_match_mandatory(const struct drm_display_mode *mode,
> -  const struct stereo_mandatory_mode *stereo_mode)
> -{
> -   unsigned int interlaced = mode->flags & DRM_MODE_FLAG_INTERLACE;
> -
> -   return mode->hdisplay == stereo_mode->width &&
> -  mode->vdisplay == stereo_mode->height &&
> -  interlaced == (stereo_mode->flags & DRM_MODE_FLAG_INTERLACE) &&
> -  drm_mode_vrefresh(mode) == stereo_mode->vrefresh;
> -}
> -
> -static int add_hdmi_mandatory_stereo_modes(struct drm_connector *connector)
> -{
> -   struct drm_device *dev = connector->dev;
> -   const struct drm_display_mode *mode;
> -   struct list_head stereo_modes;
> -   int modes = 0, i;
> -
> -   INIT_LIST_HEAD(&stereo_modes);
> -
> -   list_for_each_entry(mode, &connector->probed_modes, head) {
> -   for (i = 0; i < ARRAY_SIZE(stereo_mandatory_modes); i++) {
> -   const struct stereo_mandatory_mode *mandatory;
> -   struct drm_display_mode *new_mode;
> -
> -   if (!stereo_match_mandatory(mode,
> -   
> &stereo_mandatory_modes[i]))
> -   continue;
> -
> -   mandatory = &stereo_mandatory_modes[i];
> -   new_mode = drm_mode_duplicate(dev, mode);
> -   if (!new_mode)
> -   continue;
> -
> -   new_mode->flags |= mandatory->flags;
> -   list_add_tail(&new_mode->head, &stereo_modes);
> -   modes++;
> -   }
> -   }
> -
> -   list_splice_tail(&stereo_modes, &connector->probed_modes);
> -
> -   return modes;
> -}
> -
>  static int add_hdmi_mode(struct drm_connector *connector, u8 vic)
>  {
> struct drm_device *dev = connector->dev;
> @@ -3090,8 +3026,6 @@ do_hdmi_vsdb_modes(struct drm_connector *connector, 
> const u8 *db, u8 len,
> /* 3D_Present */
> offset++;
> if (db[8 + offset] & (1 << 7)) {
> -   modes += add_hdmi_mandatory_stereo_modes(connector);
> -
> /* 3D_Multi_present */
> multi_present = (db[8 + offset] & 0x60) >> 5;
> }
> --
> 2.10.2
>
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH 5/6] drm: Delete "mandatory" stereographic modes

2017-01-17 Thread Alastair Bridgewater
HDMI specification 1.4a, table 8-15 is very explicitly a "must
support at least one of" table, not a "must support all of" table.
It is not hard to find hardware that does not support some of the
so-called "mandatory" modes.

More seriously, this code generates invalid display modes for both
of the 3D-capable panels that I have (a 42-inch LG TV and a Sony
PlayStation 3D Display).

If we want to be persnickety, one option would be to check the
final list of modes against the table and give some message if
none of them are valid, but it's a whole lot easier just to delete
the code in question.

Signed-off-by: Alastair Bridgewater 
---
 drivers/gpu/drm/drm_edid.c | 66 --
 1 file changed, 66 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 336be31..723116a 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2926,70 +2926,6 @@ do_cea_modes(struct drm_connector *connector, const u8 
*db, u8 len)
return modes;
 }
 
-struct stereo_mandatory_mode {
-   int width, height, vrefresh;
-   unsigned int flags;
-};
-
-static const struct stereo_mandatory_mode stereo_mandatory_modes[] = {
-   { 1920, 1080, 24, DRM_MODE_FLAG_3D_TOP_AND_BOTTOM },
-   { 1920, 1080, 24, DRM_MODE_FLAG_3D_FRAME_PACKING },
-   { 1920, 1080, 50,
- DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF },
-   { 1920, 1080, 60,
- DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF },
-   { 1280, 720,  50, DRM_MODE_FLAG_3D_TOP_AND_BOTTOM },
-   { 1280, 720,  50, DRM_MODE_FLAG_3D_FRAME_PACKING },
-   { 1280, 720,  60, DRM_MODE_FLAG_3D_TOP_AND_BOTTOM },
-   { 1280, 720,  60, DRM_MODE_FLAG_3D_FRAME_PACKING }
-};
-
-static bool
-stereo_match_mandatory(const struct drm_display_mode *mode,
-  const struct stereo_mandatory_mode *stereo_mode)
-{
-   unsigned int interlaced = mode->flags & DRM_MODE_FLAG_INTERLACE;
-
-   return mode->hdisplay == stereo_mode->width &&
-  mode->vdisplay == stereo_mode->height &&
-  interlaced == (stereo_mode->flags & DRM_MODE_FLAG_INTERLACE) &&
-  drm_mode_vrefresh(mode) == stereo_mode->vrefresh;
-}
-
-static int add_hdmi_mandatory_stereo_modes(struct drm_connector *connector)
-{
-   struct drm_device *dev = connector->dev;
-   const struct drm_display_mode *mode;
-   struct list_head stereo_modes;
-   int modes = 0, i;
-
-   INIT_LIST_HEAD(&stereo_modes);
-
-   list_for_each_entry(mode, &connector->probed_modes, head) {
-   for (i = 0; i < ARRAY_SIZE(stereo_mandatory_modes); i++) {
-   const struct stereo_mandatory_mode *mandatory;
-   struct drm_display_mode *new_mode;
-
-   if (!stereo_match_mandatory(mode,
-   &stereo_mandatory_modes[i]))
-   continue;
-
-   mandatory = &stereo_mandatory_modes[i];
-   new_mode = drm_mode_duplicate(dev, mode);
-   if (!new_mode)
-   continue;
-
-   new_mode->flags |= mandatory->flags;
-   list_add_tail(&new_mode->head, &stereo_modes);
-   modes++;
-   }
-   }
-
-   list_splice_tail(&stereo_modes, &connector->probed_modes);
-
-   return modes;
-}
-
 static int add_hdmi_mode(struct drm_connector *connector, u8 vic)
 {
struct drm_device *dev = connector->dev;
@@ -3090,8 +3026,6 @@ do_hdmi_vsdb_modes(struct drm_connector *connector, const 
u8 *db, u8 len,
/* 3D_Present */
offset++;
if (db[8 + offset] & (1 << 7)) {
-   modes += add_hdmi_mandatory_stereo_modes(connector);
-
/* 3D_Multi_present */
multi_present = (db[8 + offset] & 0x60) >> 5;
}
-- 
2.10.2

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau