All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: William Brown <william@blackhats.net.au>,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v3 6/6] drm/radeon: Switch DDC when reading the EDID
Date: Wed, 7 Oct 2015 23:14:43 -0400	[thread overview]
Message-ID: <CADnq5_P3bfj_w+FAmpwbU3kkgS4g4bX=zP1cOhvt+aqRJhnBrw@mail.gmail.com> (raw)
In-Reply-To: <dd957202c7c113a09414a27c598daf358ee5d068.1443952353.git.lukas@wunner.de>

On Sat, Sep 12, 2015 at 3:44 AM, Lukas Wunner <lukas@wunner.de> wrote:
> The pre-retina MacBook Pro uses an LVDS panel and a gmux controller
> to switch the panel between its two GPUs. The panel mode in VBIOS
> is notoriously bogus on these machines.
>
> Use drm_get_edid_switcheroo() in lieu of drm_get_edid() on LVDS.
> This allows us to retrieve the EDID if the outputs are currently
> muxed to the integrated GPU by temporarily switching the panel's
> DDC lines to the discrete GPU.
>
> This only enables EDID probing on the pre-retina MBP (2008 - 2013).
> The retina MBP (2012 - present) uses eDP and gmux is apparently not
> capable of switching AUX separately from the main link on these models.
> This will be addressed in later patches.
>
> List of pre-retina MBPs with dual GPUs, one of them AMD:
>     [MBP  8,2 2011  intel SNB + amd turks     pre-retina  15"]
>     [MBP  8,3 2011  intel SNB + amd turks     pre-retina  17"]
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115
> Tested-by: William Brown <william@blackhats.net.au>
>     [MBP  8,2 2011  intel SNB + amd turks     pre-retina  15"]
>
> Signed-off-by: Lukas Wunner <lukas@wunner.de>

I'm not opposed to this series, but I have a few questions.

1.  Has any of this been tested on non-Apple hybrid laptops to make
sure nothing has regressed?  I think it would be good to verify that
since there are more of them in the wild.
2.  This only does the ddc switching for LVDS.  Newer systems almost
certainly use DP (either eDP or DP to LVDS bridges).  What about those
systems?
3.  Most muxed hybrid laptops also mux external displays connectors as
well (VGA, DVI, HDMI, DP, etc.).  Do you have any plans to extend this
to those cases?
4. Some desktop environments (GNOME IIRC, but possibly KDE as well)
rely on the fact that ddc doesn't work on one of the GPUs when it's
not selected.  They don't know how to deal with muxes and can't deal
with the same port showing up as connected on two GPUs.  I suspect
this patch set may break that.  radeon has always been able to report
the panel information on hybrid laptops even when the mux is not
switched since the info is also stored in the vbios.  At the behest of
those desktop environments there is actually code in the driver to not
report the edid for the unselected gpu on hybrid laptops even though
we could report it.  I suspect this patch may break that.

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_connectors.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
> index 5a2cafb..569f63c 100644
> --- a/drivers/gpu/drm/radeon/radeon_connectors.c
> +++ b/drivers/gpu/drm/radeon/radeon_connectors.c
> @@ -344,6 +344,10 @@ static void radeon_connector_get_edid(struct drm_connector *connector)
>                 else if (radeon_connector->ddc_bus)
>                         radeon_connector->edid = drm_get_edid(&radeon_connector->base,
>                                                               &radeon_connector->ddc_bus->adapter);
> +       } else if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS &&
> +                  radeon_connector->ddc_bus) {
> +               radeon_connector->edid = drm_get_edid_switcheroo(&radeon_connector->base,
> +                                                                &radeon_connector->ddc_bus->adapter);
>         } else if (radeon_connector->ddc_bus) {
>                 radeon_connector->edid = drm_get_edid(&radeon_connector->base,
>                                                       &radeon_connector->ddc_bus->adapter);
> --
> 1.8.5.2 (Apple Git-48)
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-10-08  3:14 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-04  9:52 [PATCH v3 0/6] Enable gpu switching on the MacBook Pro Lukas Wunner
2015-08-14 16:50 ` [PATCH v3 1/6] vga_switcheroo: Add support for switching only the DDC Lukas Wunner
2015-08-14 16:18   ` [PATCH v3 2/6] apple-gmux: Add switch_ddc support Lukas Wunner
2015-08-14 16:28     ` [PATCH v3 3/6] drm/edid: Switch DDC when reading the EDID Lukas Wunner
2015-09-11 10:40       ` [PATCH v3 4/6] drm/i915: " Lukas Wunner
2015-05-09 15:20         ` [PATCH v3 5/6] drm/nouveau: " Lukas Wunner
2015-09-12  7:44           ` [PATCH v3 6/6] drm/radeon: " Lukas Wunner
2015-10-08  3:14             ` Alex Deucher [this message]
2015-10-08 14:53               ` Lukas Wunner
2015-10-12 18:59                 ` Alex Deucher
2015-10-06  7:27   ` [PATCH v3 1/6] vga_switcheroo: Add support for switching only the DDC Daniel Vetter
2015-10-06 10:10     ` Lukas Wunner
2015-10-06 11:10       ` Daniel Vetter
2015-10-06 18:27         ` Lukas Wunner
2015-10-07  7:52           ` Daniel Vetter
2015-10-12 15:17             ` [PATCH 0/9] vga_switcheroo cleanup Lukas Wunner
2015-08-28  9:56               ` [PATCH 1/9] vga_switcheroo: Use enum vga_switcheroo_state instead of int Lukas Wunner
2015-10-12 16:09                 ` Alex Deucher
2015-08-28 10:54               ` [PATCH 3/9] vga_switcheroo: Use enum vga_switcheroo_client_id " Lukas Wunner
2015-10-12 16:10                 ` Alex Deucher
2015-08-28 11:30               ` [PATCH 2/9] vga_switcheroo: Use VGA_SWITCHEROO_UNKNOWN_ID instead of -1 Lukas Wunner
2015-10-12 16:09                 ` Alex Deucher
2015-10-13  7:28                   ` Daniel Vetter
2015-10-15 18:14                     ` Lukas Wunner
2015-10-16 14:25                       ` Daniel Vetter
2015-09-04 18:49               ` [PATCH 4/9] ALSA: hda - Spell vga_switcheroo consistently Lukas Wunner
2015-10-12  8:57               ` [PATCH 5/9] drm/i915: Drop unnecessary #include <linux/vga_switcheroo.h> Lukas Wunner
2015-10-13  7:25                 ` Daniel Vetter
2015-10-13  7:26                 ` Jani Nikula
2015-10-12  9:15               ` [PATCH 6/9] drm/radeon: " Lukas Wunner
2015-10-12  9:44               ` [PATCH 8/9] drm/radeon: Fix kernel-doc copy/paste snafu Lukas Wunner
2015-10-12 16:02                 ` Alex Deucher
2015-10-12 16:36                   ` Lukas Wunner
2015-10-12  9:54               ` [PATCH 7/9] drm/amdgpu: Drop unnecessary #include <linux/vga_switcheroo.h> Lukas Wunner
2015-10-12 16:27                 ` Alex Deucher
2015-10-12 10:00               ` [PATCH 9/9] drm/amdgpu: Fix kernel-doc copy/paste snafu Lukas Wunner
2015-10-12 16:03                 ` Alex Deucher
     [not found]           ` <20151006182744.GA15532-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2015-10-12 17:14             ` [PATCH v4 0/6] Enable gpu switching on the MacBook Pro Lukas Wunner
     [not found]               ` <cover.1444670070.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2015-05-09 15:20                 ` [PATCH v4 5/6] drm/nouveau: Switch DDC when reading the EDID Lukas Wunner
2015-08-14 16:18               ` [PATCH v4 2/6] apple-gmux: Add switch_ddc support Lukas Wunner
2015-10-12 21:07                 ` Alex Deucher
2015-10-12 21:10                   ` Alex Deucher
2015-10-13  7:32                     ` Daniel Vetter
2015-10-29 14:58                     ` Lukas Wunner
2015-10-15  4:51                 ` Darren Hart
2015-10-15  6:27                   ` Daniel Vetter
2015-08-14 16:28               ` [PATCH v4 3/6] drm/edid: Switch DDC when reading the EDID Lukas Wunner
2015-08-14 16:50               ` [PATCH v4 1/6] vga_switcheroo: Add support for switching only the DDC Lukas Wunner
2015-09-11 10:40               ` [PATCH v4 4/6] drm/i915: Switch DDC when reading the EDID Lukas Wunner
2015-09-12  7:44               ` [PATCH v4 6/6] drm/radeon: " Lukas Wunner
2015-10-05 13:23 ` [PATCH v3 0/6] Enable gpu switching on the MacBook Pro Lukas Wunner
     [not found]   ` <20151005132349.GA15130-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2015-10-05 14:15     ` Evan Foss
2015-10-05 15:17       ` [Nouveau] " Lukas Wunner
     [not found]         ` <20151005151704.GA15177-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2015-10-05 15:23           ` Evan Foss
2015-10-05 15:31             ` [Nouveau] " Lukas Wunner
     [not found]       ` <CAM2RGhT5x9GoNU4xPwzoEoiWKqVrC2pwp3ydFgaXFwtsYiBa7A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-05 15:20         ` Pierre Moreau

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='CADnq5_P3bfj_w+FAmpwbU3kkgS4g4bX=zP1cOhvt+aqRJhnBrw@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lukas@wunner.de \
    --cc=william@blackhats.net.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.