<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/apple-gmux.h, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-04-06T12:24:04+00:00</updated>
<entry>
<title>platform/x86: apple-gmux: Fix iomem_base __iomem annotation</title>
<updated>2023-04-06T12:24:04+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2023-04-04T11:19:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fb131c472df92b2885262e747906c0a4038c82e5'/>
<id>urn:sha1:fb131c472df92b2885262e747906c0a4038c82e5</id>
<content type='text'>
Fix the __iomem annotation of the iomem_base pointers in the apple-gmux
code. The __iomem should go before the *.

This fixes a bunch of sparse warnings like this one:

drivers/platform/x86/apple-gmux.c:224:48: sparse:
 expected void const [noderef] __iomem *
 got unsigned char [usertype] *

Fixes: 0c18184de990 ("platform/x86: apple-gmux: support MMIO gmux on T2 Macs")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Link: https://lore.kernel.org/oe-kbuild-all/202304040401.IMxt7Ubi-lkp@intel.com/
Suggested-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Orlando Chamberlain &lt;orlandoch.dev@gmail.com&gt;
Link: https://lore.kernel.org/r/20230404111955.43266-1-hdegoede@redhat.com
</content>
</entry>
<entry>
<title>platform/x86: apple-gmux: Update apple_gmux_detect documentation</title>
<updated>2023-03-16T12:30:29+00:00</updated>
<author>
<name>Orlando Chamberlain</name>
<email>orlandoch.dev@gmail.com</email>
</author>
<published>2023-03-09T10:43:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad3d0ee8dca5fa4a656057e20f9605bbe7ff067c'/>
<id>urn:sha1:ad3d0ee8dca5fa4a656057e20f9605bbe7ff067c</id>
<content type='text'>
Commit fc83fbc80e1a ("platform/x86: apple-gmux: refactor gmux types")
neglected to update the documentation of apple_gmux_detect's arguments.
Update the documentation to reflect that commit's changes.

include/linux/apple-gmux.h:99: warning:
	Function parameter or member 'type_ret' not described in 'apple_gmux_detect'
include/linux/apple-gmux.h:99: warning:
	Excess function parameter 'indexed_ret' description in 'apple_gmux_detect'

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Link: https://lore.kernel.org/lkml/20230309122822.77435e33@canb.auug.org.au/
Fixes: fc83fbc80e1a ("platform/x86: apple-gmux: refactor gmux types")
Signed-off-by: Orlando Chamberlain &lt;orlandoch.dev@gmail.com&gt;
Link: https://lore.kernel.org/r/20230309104353.10905-1-orlandoch.dev@gmail.com
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: apple-gmux: support MMIO gmux on T2 Macs</title>
<updated>2023-03-16T10:02:00+00:00</updated>
<author>
<name>Orlando Chamberlain</name>
<email>orlandoch.dev@gmail.com</email>
</author>
<published>2023-03-03T11:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0c18184de990e63f708b090bcb9fc6c0fbc427cd'/>
<id>urn:sha1:0c18184de990e63f708b090bcb9fc6c0fbc427cd</id>
<content type='text'>
In some newer dual gpu MacBooks, the T2 Coprocessor functions as the
gmux, and the Intel side can interract with this new gmux type through
MMIO. Add support for these gmux controllers to the apple-gmux driver.

We start using the GMSP(0) acpi method on these gmux's when clearing
interrupts, as this prevents a flood of status=0 interrupts that can't
be cleared. It's unknown if this helps or hinders older gmux types, so
it isn't enabled for those.

Interestingly, the ACPI table only allocates 8 bytes for GMUX, but we
actually need 16, and as such we request 16 with request_mem_region.

Reading and writing from ports:
    16 bytes from 0xfe0b0200 are used. 0x0 to 0x4 are where data
    to read appears, and where data to write goes. Writing to 0xe
    sets the gmux port being accessed, and writing to 0xf sends commands.

    These commands are 0x40 &amp; data_length for write, and data_length for
    read, where data_length is 1, 2 or 4. Once byte base+0xf is 0, the
    command is done.

Issues:
    As with other retina models, we can't switch DDC lines so
    switching at runtime doesn't work if the inactive gpu driver
    already disabled eDP due to it not being connected when that
    driver loaded.

    Additionally, turning on the dgpu back on on the MacBookPro16,1 does
    not work.

Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Orlando Chamberlain &lt;orlandoch.dev@gmail.com&gt;
Link: https://lore.kernel.org/r/20230303112842.3094-4-orlandoch.dev@gmail.com
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: apple-gmux: refactor gmux types</title>
<updated>2023-03-16T10:02:00+00:00</updated>
<author>
<name>Orlando Chamberlain</name>
<email>orlandoch.dev@gmail.com</email>
</author>
<published>2023-03-03T11:28:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96ec2d9868c4afd3cea17f4ee18b84ccc1cde20f'/>
<id>urn:sha1:96ec2d9868c4afd3cea17f4ee18b84ccc1cde20f</id>
<content type='text'>
Add apple_gmux_config struct containing operations and data specific to
each mux type.

This is in preparation for adding a third, MMIO based, gmux type.

Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Orlando Chamberlain &lt;orlandoch.dev@gmail.com&gt;
Link: https://lore.kernel.org/r/20230303112842.3094-3-orlandoch.dev@gmail.com
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
</entry>
<entry>
<title>platform/x86: apple-gmux: Add apple_gmux_detect() helper</title>
<updated>2023-01-24T12:41:57+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2023-01-24T10:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d143908f80f3e5d164ac3342f73d6b9f536e8b4d'/>
<id>urn:sha1:d143908f80f3e5d164ac3342f73d6b9f536e8b4d</id>
<content type='text'>
Add a new (static inline) apple_gmux_detect() helper to apple-gmux.h
which can be used for gmux detection instead of apple_gmux_present().

The latter is not really reliable since an ACPI device with a HID
of APP000B is present on some devices without a gmux at all, as well
as on devices with a newer (unsupported) MMIO based gmux model.

This causes apple_gmux_present() to return false-positives on
a number of different Apple laptop models.

This new helper uses the same probing as the actual apple-gmux
driver, so that it does not return false positives.

To avoid code duplication the gmux_probe() function of the actual
driver is also moved over to using the new apple_gmux_detect() helper.

This avoids false positives (vs _HID + IO region detection) on:

MacBookPro5,4
https://pastebin.com/8Xjq7RhS

MacBookPro8,1
https://linux-hardware.org/?probe=e513cfbadb&amp;log=dmesg

MacBookPro9,2
https://bugzilla.kernel.org/attachment.cgi?id=278961

MacBookPro10,2
https://lkml.org/lkml/2014/9/22/657

MacBookPro11,2
https://forums.fedora-fr.org/viewtopic.php?id=70142

MacBookPro11,4
https://raw.githubusercontent.com/im-0/investigate-card-reader-suspend-problem-on-mbp11.4/master/test-16/dmesg

Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection")
Link: https://lore.kernel.org/platform-driver-x86/20230123113750.462144-1-hdegoede@redhat.com/
Reported-by: Emmanouil Kouroupakis &lt;kartebi@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20230124105754.62167-3-hdegoede@redhat.com
</content>
</entry>
<entry>
<title>platform/x86: apple-gmux: Move port defines to apple-gmux.h</title>
<updated>2023-01-24T12:41:57+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2023-01-24T10:57:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=39f5a81f7ad80eb3fbcbfd817c6552db9de5504d'/>
<id>urn:sha1:39f5a81f7ad80eb3fbcbfd817c6552db9de5504d</id>
<content type='text'>
This is a preparation patch for adding a new static inline
apple_gmux_detect() helper which actually checks a supported
gmux is present, rather then only checking an ACPI device with
the HID is there as apple_gmux_present() does.

Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection")
Link: https://lore.kernel.org/platform-driver-x86/20230123113750.462144-1-hdegoede@redhat.com/
Reported-by: Emmanouil Kouroupakis &lt;kartebi@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20230124105754.62167-2-hdegoede@redhat.com
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234</title>
<updated>2019-06-19T15:09:07+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-06-03T05:44:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=caab277b1de0a22b675c4c95fc7b285ec2eb5bf5'/>
<id>urn:sha1:caab277b1de0a22b675c4c95fc7b285ec2eb5bf5</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not see http www gnu org
  licenses

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 503 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Enrico Weigelt &lt;info@metux.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190602204653.811534538@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ACPI / utils: Rename acpi_dev_present()</title>
<updated>2016-04-09T01:12:58+00:00</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2016-03-24T12:15:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c68ae33e7fb4a010f9a48af3e4b87089dca96551'/>
<id>urn:sha1:c68ae33e7fb4a010f9a48af3e4b87089dca96551</id>
<content type='text'>
acpi_dev_present() was originally named after pci_dev_present()
to signify the similarity of the two functions.

However Rafael J. Wysocki pointed out that the exported function
acpi_dev_present() is easily confused with the non-exported
acpi_device_is_present(). Additionally in ACPI parlance the term
"present" usually refers to the "device is present" bit returned
by the _STA control method, yet acpi_dev_present() merely checks
presence in the namespace. It does not invoke _STA at all, let
alone check the "device is present" bit.

As suggested by Rafael, rename the function to acpi_dev_found()
and adjust all existing call sites.

Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>apple-gmux: Fix build breakage if !CONFIG_ACPI</title>
<updated>2016-02-11T08:23:59+00:00</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2016-02-10T13:17:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b7172119714781d15128cd1ae029bd028b0bf37a'/>
<id>urn:sha1:b7172119714781d15128cd1ae029bd028b0bf37a</id>
<content type='text'>
The DRM drivers i915, nouveau and radeon may be compiled with
CONFIG_ACPI not set, in which case acpi_dev_present() is undefined.

Add a no-op stub for apple_gmux_present() which is used if
CONFIG_APPLE_GMUX is not enabled to avoid build breakage.
(CONFIG_APPLE_GMUX depends on CONFIG_ACPI.)

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20160210131741.GA15492@wunner.de
</content>
</entry>
<entry>
<title>apple-gmux: Add helper for presence detect</title>
<updated>2016-02-09T10:21:11+00:00</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2016-01-11T19:09:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2413306c2566b729a9d17a81e9d1181e6f354d6a'/>
<id>urn:sha1:2413306c2566b729a9d17a81e9d1181e6f354d6a</id>
<content type='text'>
Centralize gmux' ACPI HID in a header file and add apple_gmux_present().
This can be used by other drivers to activate quirks specific to dual
GPU MacBook Pros &amp; Mac Pros. The alternative would be to hardcode DMI
or PCI IDs and amend them whenever Apple introduces a new machine.

Tested-by: Lukas Wunner &lt;lukas@wunner.de&gt;
    [MBP  9,1 2012  intel IVB + nvidia GK107  pre-retina  15"]
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Reviewed-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/89c23769058a340e5e11d4a7102f3793d3b0c94c.1452525860.git.lukas@wunner.de
</content>
</entry>
</feed>
