From: Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
To: Daniel Vetter <daniel.vetter-/w4YWyX8dFk@public.gmane.org>,
DRI Development
<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
Darren Hart <dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Alex Deucher
<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH v4 0/6] Enable gpu switching on the MacBook Pro
Date: Mon, 12 Oct 2015 19:14:30 +0200 [thread overview]
Message-ID: <cover.1444670070.git.lukas@wunner.de> (raw)
In-Reply-To: <20151006182744.GA15532-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
Changes since v3:
* Previously when switching the display, the DDC lines were switched
as well. But actually this is not necessary: If a GPU probes EDID,
DDC must be switched and locked to the GPU anyway, so why switch
DDC preemptively? Also, previously the DDC lines were switched back
to the previous owner on unlock. This is unnecessary for the same
reason. So I did away with all that and it simplifies the code
considerably. This works fine as long as anything accessing DDC
calls vga_switcheroo_lock_ddc() first. If something in the kernel
or a VM or in user space accesses DDC and omits locking it first,
things may go awry. (However, if locking is omitted, things could
go awry with the previous behaviour as well.) I'm curious if this
new behaviour provokes objections.
* I now have conclusive evidence that only the pre-retina MacBook Pro
can switch DDC. The mux in the retina is incapable of that. So the
->switch_ddc callback is no longer advertised to vga_switcheroo
on retinas.
Also available on GitHub for easier reviewing:
https://github.com/l1k/linux/commits/mbp_switcheroo_v4
For those who haven't been following this series so far:
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 and some models have no
VBIOS at all, so the inactive GPU cannot set up its LVDS output.
Extend vga_switcheroo to support switching only the DDC lines.
Introduce a drm_get_edid_switcheroo() helper which uses this feature.
Amend i915, nouveau and radeon to call it for LVDS connectors.
This only enables EDID probing on the pre-retina MBP (2008 - 2013),
and only under the condition that apple-gmux loads before the DRM
drivers. Later patches will address reprobing of the DRM drivers
if apple-gmux loads late.
The retina MBP (2012 - present) uses eDP and is apparently not
capable of switching AUX separately from the main link.
This will also be addressed in later patches.
Previous installments:
v1: http://lists.freedesktop.org/archives/dri-devel/2015-April/081515.html
v2: http://lists.freedesktop.org/archives/dri-devel/2015-August/088156.html
v3: http://lists.freedesktop.org/archives/dri-devel/2015-October/091741.html
Lukas Wunner (6):
vga_switcheroo: Add support for switching only the DDC
apple-gmux: Add switch_ddc support
drm/edid: Switch DDC when reading the EDID
drm/i915: Switch DDC when reading the EDID
drm/nouveau: Switch DDC when reading the EDID
drm/radeon: Switch DDC when reading the EDID
drivers/gpu/drm/drm_edid.c | 26 ++++++++++++
drivers/gpu/drm/i915/intel_lvds.c | 3 +-
drivers/gpu/drm/nouveau/nouveau_connector.c | 13 +++++-
drivers/gpu/drm/radeon/radeon_connectors.c | 4 ++
drivers/gpu/vga/vga_switcheroo.c | 66 ++++++++++++++++++++++++++++-
drivers/platform/x86/apple-gmux.c | 21 ++++++++-
include/drm/drm_crtc.h | 2 +
include/linux/vga_switcheroo.h | 15 +++++--
8 files changed, 141 insertions(+), 9 deletions(-)
--
1.8.5.2 (Apple Git-48)
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2015-10-12 17: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
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 ` Lukas Wunner [this message]
[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=cover.1444670070.git.lukas@wunner.de \
--to=lukas-jfq808j9c/izqb+pc5nmwq@public.gmane.org \
--cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=daniel.vetter-/w4YWyX8dFk@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 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.