All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Matthew Garrett <matthew.garrett@nebula.com>
Cc: Dave Airlie <airlied@gmail.com>,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH 08/11] apple-gmux: Add support for the switch_ddc callback
Date: Mon, 2 Jun 2014 10:35:47 -0400	[thread overview]
Message-ID: <CADnq5_PrQM2PbNkAb+nf7shgk1jQTjjzya02EvhME9uO+LPxiA@mail.gmail.com> (raw)
In-Reply-To: <1401640723-2058-9-git-send-email-matthew.garrett@nebula.com>

On Sun, Jun 1, 2014 at 12:38 PM, Matthew Garrett
<matthew.garrett@nebula.com> wrote:
> We can switch DDC pins in a way that ought (with luck) to work for LVDS.
> This isn't sufficient for eDP, which is addressed in later patches.
>
> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>

FWIW, on AMD muxed PX systems, there are separate muxes for ddc/hpd
and data lines so it would be trivial to implement there as well.

Alex

> ---
>  drivers/platform/x86/apple-gmux.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
> index b9429fb..5594cbc 100644
> --- a/drivers/platform/x86/apple-gmux.c
> +++ b/drivers/platform/x86/apple-gmux.c
> @@ -271,6 +271,16 @@ static const struct backlight_ops gmux_bl_ops = {
>         .update_status = gmux_update_status,
>  };
>
> +static int gmux_switch_ddc(enum vga_switcheroo_client_id id)
> +{
> +       if (id == VGA_SWITCHEROO_IGD)
> +               gmux_write8(apple_gmux_data, GMUX_PORT_SWITCH_DDC, 1);
> +       else
> +               gmux_write8(apple_gmux_data, GMUX_PORT_SWITCH_DDC, 2);
> +
> +       return 0;
> +}
> +
>  static int gmux_switchto(enum vga_switcheroo_client_id id)
>  {
>         if (id == VGA_SWITCHEROO_IGD) {
> @@ -346,6 +356,7 @@ gmux_active_client(struct apple_gmux_data *gmux_data)
>
>  static struct vga_switcheroo_handler gmux_handler = {
>         .switchto = gmux_switchto,
> +       .switch_ddc = gmux_switch_ddc,
>         .power_state = gmux_set_power_state,
>         .get_client_id = gmux_get_client_id,
>  };
> --
> 1.8.5.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-06-02 14:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-01 16:38 Improve Apple GMUX support on switcheroo Matthew Garrett
2014-06-01 16:38 ` [PATCH 01/11] vga_switcheroo: Add support for switching only the DDC Matthew Garrett
2014-06-03 13:26   ` Jani Nikula
2014-06-12  0:37   ` Dave Airlie
2014-06-01 16:38 ` [PATCH 02/11] vga_switcheroo: Add support for reprobing connectors Matthew Garrett
2014-06-01 16:38 ` [PATCH 03/11] vga_switcheroo: Add command line option Matthew Garrett
2014-06-01 16:38 ` [PATCH 04/11] vga_switcheroo: Allow stashing of panel data Matthew Garrett
2014-06-03 13:40   ` Jani Nikula
2014-06-01 16:38 ` [PATCH 05/11] vga_switcheroo: Allow handlers to indicate that they can handle PM Matthew Garrett
2014-06-01 16:38 ` [PATCH 06/11] vga_switcheroo: Add enable() call to clients and permit deferral of dynamic PM Matthew Garrett
2014-06-01 16:38 ` [PATCH 07/11] vga_switcheroo: Reprobe old device on switching Matthew Garrett
2014-06-01 16:38 ` [PATCH 08/11] apple-gmux: Add support for the switch_ddc callback Matthew Garrett
2014-06-02 14:35   ` Alex Deucher [this message]
2014-06-01 16:38 ` [PATCH 09/11] apple-gmux: Assign apple_gmux_data before registering Matthew Garrett
2014-06-01 16:38 ` [PATCH 10/11] apple-gmux: Indicate that driver supports changing of GPU power states Matthew Garrett
2014-06-01 16:38 ` [PATCH 11/11] apple_gmux: Wait for switch completion Matthew Garrett

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_PrQM2PbNkAb+nf7shgk1jQTjjzya02EvhME9uO+LPxiA@mail.gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=matthew.garrett@nebula.com \
    --cc=platform-driver-x86@vger.kernel.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.