mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aditya Garg <gargaditya08@live.com>
To: "maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"mripard@kernel.org" <mripard@kernel.org>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	"andriy.shevchenko@linux.intel.com"
	<andriy.shevchenko@linux.intel.com>
Cc: Kerem Karabay <kekrby@gmail.com>,
	Atharva Tiwari <evepolonium@gmail.com>,
	Aun-Ali Zaidi <admin@kodeit.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: [PATCH v5 0/2] Touch Bar DRM driver for x86 Macs
Date: Tue, 25 Feb 2025 10:06:49 +0000	[thread overview]
Message-ID: <3457BF95-0E50-4B70-86DE-EE5EE95D3ACE@live.com> (raw)

Hi all!

This patch series aims to improve the Touch Bar support for x86 Macs.

Recently, the hid-appletb-kbd and hid-appletb-bl drivers were upstreamed
into the Linux kernel [1]. They enabled the Touch Bar to display a
predefined set of media and function keys, exactly the same it does on
Windows Bootcamp.

Now, we are adding support for the DRM mode of the Touch Bar via these
patches. The DRM mode enables the Touch Bar to act as a second display,
just like macOS. So now you can add a widget, put a clock or anything
else on the Touch Bar as long as you can develop a daemon.

Credits for this driver should goto Ben (Bingxing) Wang on GitHub [2],
who reverse engineered the protocol and made a Windows driver for the
same. Credits also goto Kerem Karabay, the author of this patch series,
who ported this Windows driver to Linux.

The first patch adds emulation helper from XRGB8888 to BGR888 which is
needed by this device and the driver.

The second patch is the main DRM driver, required for the DRM mode.
Currently, only T2 Macs are supported.

Currently, a daemon named tiny-dfr [3] by Asahi Linux supports the
Touch Bar in this mode by displaying the Function and Media keys.
More such daemons can be made with more customisation in the future.

For the case of T2 Macs, apple-bce [4], the driver for the T2 Security
Chip is also needed for all the peripherals, including the Touch Bar
to work. It is still WIP, and will be subsequently sent later to the
appropriate tree. Till then, I'll suggest for get the driver from [4],
or more preferably, get Linux support from https://t2linux.org/.

Cheers
Aditya

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.15/apple
[2]: https://github.com/imbushuo/DFRDisplayKm
[3]: https://github.com/AsahiLinux/tiny-dfr
[4]: https://github.com/t2linux/apple-bce-drv

Kerem Karabay (2):
  drm/format-helper: Add conversion from XRGB8888 to BGR888
  drm/tiny: add driver for Apple Touch Bars in x86 Macs

 MAINTAINERS                                   |   8 +
 drivers/gpu/drm/drm_format_helper.c           |  54 ++
 .../gpu/drm/tests/drm_format_helper_test.c    |  81 ++
 drivers/gpu/drm/tiny/Kconfig                  |  12 +
 drivers/gpu/drm/tiny/Makefile                 |   1 +
 drivers/gpu/drm/tiny/appletbdrm.c             | 844 ++++++++++++++++++
 include/drm/drm_format_helper.h               |   3 +
 7 files changed, 1003 insertions(+)
 create mode 100644 drivers/gpu/drm/tiny/appletbdrm.c

-- 
2.43.0


             reply	other threads:[~2025-02-25 10:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25 10:06 Aditya Garg [this message]
2025-02-25 10:07 ` [PATCH v5 1/2] drm/format-helper: Add conversion from XRGB8888 to BGR888 Aditya Garg
2025-02-25 10:09 ` [PATCH v5 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs Aditya Garg
2025-02-25 10:33   ` andriy.shevchenko
2025-02-25 10:36     ` Aditya Garg
2025-02-25 10:46       ` andriy.shevchenko
2025-02-25 10:48         ` Aditya Garg
2025-02-25 11:01           ` andriy.shevchenko
2025-02-25 11:59             ` Thomas Zimmermann
2025-02-25 13:27               ` andriy.shevchenko
2025-02-25 13:53                 ` Thomas Zimmermann
2025-02-25 14:17                   ` andriy.shevchenko
2025-02-25 11:49         ` Aditya Garg
2025-02-25 11:58     ` Thomas Zimmermann
2025-02-25 13:25       ` andriy.shevchenko
2025-02-25 14:54       ` Aditya Garg
2025-02-25 14:56         ` Aditya Garg
2025-02-25 15:01           ` Aditya Garg
2025-02-25 15:10         ` Aditya Garg
2025-02-25 15:59           ` Aditya Garg
2025-02-25 16:06         ` Thomas Zimmermann
2025-02-25 16:09           ` Aditya Garg
2025-02-25 16:40             ` Aditya Garg

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=3457BF95-0E50-4B70-86DE-EE5EE95D3ACE@live.com \
    --to=gargaditya08@live.com \
    --cc=admin@kodeit.net \
    --cc=airlied@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=evepolonium@gmail.com \
    --cc=kekrby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®