[PATCH RESEND] drm/nouveau: fix a possible null pointer dereference

2024-08-10 Thread Ma Ke
In ch7006_encoder_get_modes(), the return value of drm_mode_duplicate() is used directly in drm_mode_probed_add(), which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: sta...@vger.kernel.org Fixes: 6ee738610f41 ("drm/nouveau: Add DRM drive

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-10 Thread Mina Almasry
On Fri, Aug 9, 2024 at 11:52 PM Jakub Kicinski wrote: > > On Fri, 9 Aug 2024 16:45:50 +0100 Pavel Begunkov wrote: > > > I think this is good, and it doesn't seem hacky to me, because we can > > > check the page_pools of the netdev while we hold rtnl, so we can be > > > sure nothing is messing with

Re: [PATCH v3 1/9] HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars

2024-08-10 Thread Aditya Garg
> > Sounds good. > > FYI I'll also review the other patches soonish. > So sending a v5 right away is not necessary. Alright, fair enough. You’d want to review the v4 of this patchset then, although the only difference is presence of 1 extra patch in v4. https://lore.kernel.org/linux-input/201

Re: [PATCH v3 1/9] HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars

2024-08-10 Thread Thomas Weißschuh
On 2024-08-10 15:30:58+, Aditya Garg wrote: > > > > > Also include linux/device.h as you are using functions from there. > > Like devm_kcalloc(). > > Alright, I’ll add that > > > >>> > +#include > +#include > + > +#include "hid-ids.h" > + > +#define APPLETB_

Re: [PATCH v3 1/9] HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars

2024-08-10 Thread Aditya Garg
> > Also include linux/device.h as you are using functions from there. > Like devm_kcalloc(). Alright, I’ll add that > >>> +#include +#include + +#include "hid-ids.h" + +#define APPLETB_BL_ON 1 +#define APPLETB_BL_DIM 3 +#define APPLETB_BL_OFF 4 +

Re: [PATCH v3 1/9] HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars

2024-08-10 Thread Thomas Weißschuh
On 2024-08-10 13:23:30+, Aditya Garg wrote: > Hi Thomas > > >> diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile > >> index e40f1ddeb..1d825a474 100644 > >> --- a/drivers/hid/Makefile > >> +++ b/drivers/hid/Makefile > >> @@ -29,6 +29,7 @@ obj-$(CONFIG_HID_ALPS) += hid-alps.o > >> obj-$(

Re: [PATCH v3 1/9] HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars

2024-08-10 Thread Aditya Garg
Hi Thomas > >> diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile >> index e40f1ddeb..1d825a474 100644 >> --- a/drivers/hid/Makefile >> +++ b/drivers/hid/Makefile >> @@ -29,6 +29,7 @@ obj-$(CONFIG_HID_ALPS) += hid-alps.o >> obj-$(CONFIG_HID_ACRUX) += hid-axff.o >> obj-$(CONFIG_HID_APPLE) +=

Re: [PATCH 4/6] drm/imagination: Add compatible string entry for Series6XT

2024-08-10 Thread Icenowy Zheng
在 2024-05-31星期五的 11:18 +,Frank Binns写道: > On Thu, 2024-05-30 at 16:35 +0800, Chen-Yu Tsai wrote: > > The MediaTek MT8173 comes with a PowerVR Rogue GX6250, which is > > part > > of the Series6XT, another variation of the Rogue family of GPUs. > > > > Signed-off-by: Chen-Yu Tsai > > --- > >  d

Re: [PATCH] video/aperture: match the pci device when calling sysfb_disable()

2024-08-10 Thread kernel test robot
'--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Alex-Deucher/video-aperture-match-the-pci-device-when-calling-sysfb_disable/20240810-021357 base: git://anongit.freedesktop.org/drm/drm-mis

Re: [PATCH v3 1/9] HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars

2024-08-10 Thread Thomas Weißschuh
On 2024-08-08 13:50:33+, Aditya Garg wrote: > From: Kerem Karabay > > This commit adds a driver for the backlight of Apple Touch Bars on x86 > Macs. Note that currently only T2 Macs are supported. > > This driver is based on previous work done by Ronald Tschalär > . > > Signed-off-by: Kerem

Re: [PATCH] video/aperture: match the pci device when calling sysfb_disable()

2024-08-10 Thread kernel test robot
'--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Alex-Deucher/video-aperture-match-the-pci-device-when-calling-sysfb_disable/20240810-021357 base: git://anongit.freedesktop.org/drm/drm-mis

[PATCH] staging: drivers: gpu: drm: mediatek: Fix warning: Using plain integer as NULL pointer in mtk_drm_gem.c

2024-08-10 Thread Dipendra Khadka
sparse reported following warking: ''' drivers/gpu/drm/mediatek/mtk_drm_gem.c:290:27: warning: Using plain integer as NULL pointer ''' This patch changes integer 0 to NULL. Signed-off-by: Dipendra Khadka --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH] Fix warning: Using plain integer as NULL pointer in msm_ringbuffer.c

2024-08-10 Thread Dipendra Khadka
sparse reported following warning: ''' drivers/gpu/drm/msm/msm_ringbuffer.c:34:31: warning: Using plain integer as NULL pointer ''' This fix changes integer 0 to NULL. Signed-off-by: Dipendra Khadka --- drivers/gpu/drm/msm/msm_ringbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] drm/meson: add check to prevent dereference of NULL

2024-08-10 Thread Martin Blumenstingl
Hello Anastasia, Thank you for working on this! On Fri, Aug 9, 2024 at 2:48 PM Anastasia Belova wrote: [...] > @@ -373,9 +373,11 @@ static int meson_drv_bind_master(struct device *dev, > bool has_components) > free_drm: > drm_dev_put(drm); > > - meson_encoder_dsi_remove(priv); >

[PATCH v3 5/5] soc: mediatek: cmdq: Remove cmdq_pkt_finalize() helper function

2024-08-10 Thread Chun-Kuang Hu
In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize(). Signed-off-by: Chun-Kuang Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 22 -- include/linux/soc/mediatek/mtk-cmdq.h | 13 - 2 files changed, 35 de

[PATCH v3 4/5] media: platform: mtk-mdp3: Use cmdq_pkt_create() and cmdq_pkt_destroy()

2024-08-10 Thread Chun-Kuang Hu
Use cmdq_pkt_create() and cmdq_pkt_destroy() common function instead of implementing mdp3 version. Signed-off-by: Chun-Kuang Hu --- .../platform/mediatek/mdp3/mtk-mdp3-cmdq.c| 45 ++- 1 file changed, 4 insertions(+), 41 deletions(-) diff --git a/drivers/media/platform/mediat

[PATCH v3 3/5] media: platform: mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize()

2024-08-10 Thread Chun-Kuang Hu
In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize(). Signed-off-by: Chun-Kuang Hu --- drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 3 ++- drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 ++ drivers/media/platform/med

[PATCH v3 2/5] drm/mediatek: Use cmdq_pkt_create() and cmdq_pkt_destroy()

2024-08-10 Thread Chun-Kuang Hu
Use cmdq_pkt_create() and cmdq_pkt_destroy() common function instead of implementing drm version. Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_crtc.c | 46 +++-- 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_c

[PATCH v3 1/5] drm/mediatek: Use cmdq_pkt_eoc() instead of cmdq_pkt_finalize()

2024-08-10 Thread Chun-Kuang Hu
For some client driver, it want to reduce latency between excuting previous packet command and next packet command, so append jump command to the end of previous packet and the jump destination address is the start address of next packet command buffer. Before next packet exist, the previous packet

[PATCH v3 0/5] Remove cl in struct cmdq_pkt

2024-08-10 Thread Chun-Kuang Hu
cl in struct cmdq_pkt is used to store struct cmdq_client, but every client driver has the struct cmdq_client information, so it's not necessary to store struct cmdq_client in struct cmdq_pkt. Because mailbox maintainer do not like to mix mailbox patch with other patches in a series, so mailbox pat

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

2024-08-10 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 display

[PATCH v4 9/10] drm/format-helper: Add conversion from XRGB8888 to BGR888

2024-08-10 Thread Aditya Garg
From: Kerem Karabay Add XRGB emulation helper for devices that only support BGR888. Signed-off-by: Kerem Karabay Signed-off-by: Aditya Garg --- drivers/gpu/drm/drm_format_helper.c | 54 + .../gpu/drm/tests/drm_format_helper_test.c| 81 +++ include

[PATCH v4 8/10] HID: multitouch: add device ID for Apple Touch Bars

2024-08-10 Thread Aditya Garg
From: Kerem Karabay Note that this is device ID is for T2 Macs. Testing on T1 Macs would be appreciated. Signed-off-by: Kerem Karabay Signed-off-by: Aditya Garg --- drivers/hid/Kconfig | 1 + drivers/hid/hid-multitouch.c | 26 ++ 2 files changed, 23 insertion

[PATCH v4 7/10] HID: multitouch: allow specifying if a device is direct in a class

2024-08-10 Thread Aditya Garg
From: Kerem Karabay Currently the driver determines the device type based on the application, but this value is not reliable on Apple Touch Bars, where the application is HID_DG_TOUCHPAD even though the devices are direct, so allow setting it in classes. Signed-off-by: Kerem Karabay Signed-off-

[PATCH v4 6/10] HID: multitouch: take cls->maxcontacts into account for devices without a HID_DG_CONTACTMAX field too

2024-08-10 Thread Aditya Garg
From: Kerem Karabay This is needed for Apple Touch Bars, where no HID_DG_CONTACTMAX field is present and the maximum contact count is greater than the default. Signed-off-by: Kerem Karabay Signed-off-by: Aditya Garg --- drivers/hid/hid-multitouch.c | 7 --- 1 file changed, 4 insertions(+)

Re: [PATCH v3 0/9] Touch Bar support for T2 Macs

2024-08-10 Thread Aditya Garg
V4 with an additional patch sent here: https://lore.kernel.org/linux-input/20190cd7-46ce-400d-9c58-297984796...@live.com/T/#t

[PATCH v4 5/10] HID: multitouch: support getting the tip state from HID_DG_TOUCH fields

2024-08-10 Thread Aditya Garg
From: Kerem Karabay This is necessary on Apple Touch Bars, where the tip state is contained in fields with the HID_DG_TOUCH usage. This feature is gated by a quirk in order to prevent breaking other devices, see commit c2ef8f21ea8f ("HID: multitouch: add support for trackpads"). Signed-off-by: K

[PATCH v4 4/10] HID: multitouch: support getting the contact ID from HID_DG_TRANSDUCER_INDEX fields

2024-08-10 Thread Aditya Garg
From: Kerem Karabay This is needed to support Apple Touch Bars, where the contact ID is contained in fields with the HID_DG_TRANSDUCER_INDEX usage. Signed-off-by: Kerem Karabay Signed-off-by: Aditya Garg --- drivers/hid/hid-multitouch.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-

[PATCH v4 3/10] HID: hid-appletb-kbd: add support for fn toggle between media and function mode

2024-08-10 Thread Aditya Garg
From: Aditya Garg This patch adds support for the switching between the Media and Function keys on the touchbar by pressing the Fn key on Apple Internal Keyboard. Signed-off-by: Aditya Garg --- drivers/hid/hid-appletb-kbd.c | 128 ++ 1 file changed, 128 insertions

[PATCH v4 2/10] HID: hid-appletb-kbd: add driver for the keyboard mode

2024-08-10 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 a driver for the displa

[GIT PULL] mediatek drm fixes 20240805

2024-08-10 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Set sensible cursor width/height values to fix crash Regards, Chun-Kuang. The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: https://git.kerne

[PATCH v4 1/10] HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars

2024-08-10 Thread Aditya Garg
From: Kerem Karabay This commit adds a driver for the backlight of Apple Touch Bars on x86 Macs. Note that currently only T2 Macs are supported. This driver is based on previous work done by Ronald Tschalär . Signed-off-by: Kerem Karabay Co-developed-by: Aditya Garg Signed-off-by: Aditya Garg

[PATCH v4 0/10] Touch Bar support for T2 Macs

2024-08-10 Thread Aditya Garg
Hi Maintainers 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 patch series adds support for both the c