Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-20 Thread Aditya Garg
Hi > On 19 Feb 2025, at 1:27 PM, Thomas Zimmermann wrote: > > Hi > > Am 18.02.25 um 21:12 schrieb Aditya Garg: >> Hi >> >> In continuation to my previous mail. >> + +static int appletbdrm_send_msg(struct appletbdrm_device *adev, u32 msg) +{ + struct appletbdrm_msg_simple_r

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-20 Thread Aditya Garg
> > The thing is I am still new to DRM code and APIs, it's my first driver (and > probably the last). I actually thought I could learn more here, but I'll try > to find solutions myself now. > > I'll send a v2 once all the issues are addressed > V2 with all the problems pointed out solved

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-20 Thread Aditya Garg
> On 20 Feb 2025, at 3:50 PM, Thomas Zimmermann wrote: > > Hi, > > to be honest: you are just throwing patches and errors at me and want me to > fix your driver for you. If you want to maintain a kernel driver, you need to > be able to debug at least such basic problems. I suggest you start

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-20 Thread Aditya Garg
> On 20 Feb 2025, at 3:46 PM, Thomas Zimmermann wrote: > > Hi > >> Am 20.02.25 um 11:11 schrieb Aditya Garg: >> Hi >> >> >>> + ret = drm_dev_register(drm, 0); + if (ret) + return dev_err_probe(dev, ret, "Failed to register DRM device\n"); >>> This call does not belong to the

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-20 Thread Thomas Zimmermann
Hi, to be honest: you are just throwing patches and errors at me and want me to fix your driver for you. If you want to maintain a kernel driver, you need to be able to debug at least such basic problems. I suggest you start to debug these issues by yourself and try to find their causes. (pri

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-20 Thread Thomas Zimmermann
Hi Am 20.02.25 um 11:11 schrieb Aditya Garg: Hi + ret = drm_dev_register(drm, 0); + if (ret) + return dev_err_probe(dev, ret, "Failed to register DRM device\n"); This call does not belong to the mode-setting pipeline and belongs into appletbdrm_probe(). + + return 0; +} + +static int ap

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-20 Thread Aditya Garg
Hi > > >> + ret = drm_dev_register(drm, 0); >> + if (ret) >> + return dev_err_probe(dev, ret, "Failed to register DRM device\n"); > > This call does not belong to the mode-setting pipeline and belongs into > appletbdrm_probe(). > >> + >> + return 0; >> +} >> + >> +static int appletbdrm_probe

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-19 Thread Aditya Garg
Hi > On 19 Feb 2025, at 3:19 PM, Thomas Zimmermann wrote: > > Hi > > Am 19.02.25 um 10:37 schrieb Aditya Garg: >> Hi >> I’ve tried these changes, seem to be breaking the driver: —>8— From 16c920cabf65ec664663ebe1611c0ccf6e81de4a Mon Sep 17 00:00:00 2001 From: Aditya

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-19 Thread Thomas Zimmermann
Hi Am 19.02.25 um 10:37 schrieb Aditya Garg: Hi I’ve tried these changes, seem to be breaking the driver: —>8— From 16c920cabf65ec664663ebe1611c0ccf6e81de4a Mon Sep 17 00:00:00 2001 From: Aditya Garg Date: Tue, 18 Feb 2025 18:54:10 +0530 Subject: [PATCH] better error handling --- .../app

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-19 Thread Aditya Garg
Hi >> I’ve tried these changes, seem to be breaking the driver: >> >> —>8— >> From 16c920cabf65ec664663ebe1611c0ccf6e81de4a Mon Sep 17 00:00:00 2001 >> From: Aditya Garg >> Date: Tue, 18 Feb 2025 18:54:10 +0530 >> Subject: [PATCH] better error handling >> >> --- >> .../apple-touchbar-advanced-

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-19 Thread Thomas Zimmermann
Hi Am 19.02.25 um 08:57 schrieb Thomas Zimmermann: Hi Am 18.02.25 um 21:12 schrieb Aditya Garg: Hi In continuation to my previous mail. + +static int appletbdrm_send_msg(struct appletbdrm_device *adev, u32 msg) +{ + struct appletbdrm_msg_simple_request *request; + int ret; + + request = k

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-18 Thread Thomas Zimmermann
Hi Am 18.02.25 um 21:12 schrieb Aditya Garg: Hi In continuation to my previous mail. + +static int appletbdrm_send_msg(struct appletbdrm_device *adev, u32 msg) +{ + struct appletbdrm_msg_simple_request *request; + int ret; + + request = kzalloc(sizeof(*request), GFP_KERNEL); + if (!request) +

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-18 Thread Thomas Zimmermann
Hi Am 18.02.25 um 14:49 schrieb Aditya Garg: [...] This code runs in the middle of the atomic update. It's then too late to do error handling. If these allocs fail, the display hardware will remain in undefined state. It is much preferable to allocate this memory in the atomic_check. To do so

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-18 Thread Aditya Garg
Hi In continuation to my previous mail. >> + >> +static int appletbdrm_send_msg(struct appletbdrm_device *adev, u32 msg) >> +{ >> + struct appletbdrm_msg_simple_request *request; >> + int ret; >> + >> + request = kzalloc(sizeof(*request), GFP_KERNEL); >> + if (!request) >> + return -ENOMEM; >> +

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-18 Thread Aditya Garg
Hi >> drivers/gpu/drm/tiny/appletbdrm.c | 702 ++ > > You also have to add the driver to MAINTAINERS. Sorry, forgot about that > >> 3 files changed, 716 insertions(+) >> create mode 100644 drivers/gpu/drm/tiny/appletbdrm.c >> >> diff --git a/drivers/gpu/drm/tiny

Re: [PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-18 Thread Thomas Zimmermann
Hi Am 17.02.25 um 19:52 schrieb Aditya Garg: From: Kerem Karabay The Touch Bars found on x86 Macs support two USB configurations: one where the device presents itself as a HID keyboard and can display predefined sets of keys, and one where the operating system has full control over what is dis

[PATCH 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

2025-02-17 Thread Aditya Garg
From: Kerem Karabay The Touch Bars found on x86 Macs support two USB configurations: one where the device presents itself as a HID keyboard and can display predefined sets of keys, and one where the operating system has full control over what is displayed. This commit adds support for the displa