public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	nouveau@lists.freedesktop.org
Cc: Pierre Moreau <pierre.morrow@free.fr>,
	William Brown <william@blackhats.net.au>
Subject: [PATCH v3 0/6] Enable gpu switching on the MacBook Pro
Date: Sun, 4 Oct 2015 11:52:33 +0200	[thread overview]
Message-ID: <cover.1443952353.git.lukas@wunner.de> (raw)

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


Changes since v2:
  * Previously the DDC locking happened in drm_get_edid() and thus
    was done for all DRM drivers, regardless if they are ever used
    on muxed machines. Now this is moved to a separate helper which
    is only called by relevant drivers and only for LVDS connectors.
    (Suggested by Thierry Reding and seconded by Alex Deucher and
    Daniel Vetter.)
  * Squashed commits, overhauled locking, added kernel-doc for new
    public functions and locks.
    (Suggested by Daniel Vetter.)


Thanks a lot to the reviewers and testers for your valuable feedback.


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            | 98 ++++++++++++++++++++++++++++-
 drivers/platform/x86/apple-gmux.c           | 23 +++++++
 include/drm/drm_crtc.h                      |  2 +
 include/linux/vga_switcheroo.h              |  9 +++
 8 files changed, 173 insertions(+), 5 deletions(-)

-- 
1.8.5.2 (Apple Git-48)

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2015-10-04  9:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-04  9:52 Lukas Wunner [this message]
     [not found] ` <a46bc3667badb466475ed9ab6eac21c2b4814741.1443952353.git.lukas@wunner.de>
     [not found]   ` <90fa3492f441814eab48c7df2431bcac39d6219a.1443952353.git.lukas@wunner.de>
     [not found]     ` <af50270ecf44e9f88013ce48c96c5ffbd0fbc250.1443952353.git.lukas@wunner.de>
2015-09-11 10:40       ` [PATCH v3 4/6] drm/i915: Switch DDC when reading the EDID 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.1443952353.git.lukas@wunner.de \
    --to=lukas@wunner.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=pierre.morrow@free.fr \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox