[PATCH] drm/msm/mdp4: Add error handling in mdp4_lvds_connector_init()

2023-09-23 Thread liuhaoran
This patch adds error-handling for the drm_connector_init() and drm_connector_attach_encoder inside the mdp4_lvds_connector_init(). Signed-off-by: liuhaoran --- .../gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c| 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/

[PATCH] drm/i915/gt: Add error handling in intel_timeline_pin()

2023-09-23 Thread liuhaoran
This patch adds error-handling for the i915_active_acquire() inside the intel_timeline_pin(). Signed-off-by: liuhaoran --- drivers/gpu/drm/i915/gt/intel_timeline.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm

Re: [PATCH v2] drm/gma500: refactor deprecated strncpy

2023-09-23 Thread Kees Cook
On Tue, Sep 19, 2023 at 04:41:16AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > Since `chan->base.name` is expected to be NUL-terminated, a suitable > replacement

Re: [PATCH] udmabuf: Fix a potential (and unlikely) access to unallocated memory

2023-09-23 Thread Kees Cook
On Mon, Sep 18, 2023 at 09:22:44PM +0200, Christophe JAILLET wrote: > Le 18/09/2023 à 05:10, Gustavo A. R. Silva a écrit : > > > > > > On 9/18/23 12:46, Christophe JAILLET wrote: > > > If 'list_limit' is set to a very high value, 'lsize' computation could > > > overflow if 'head.count' is big eno

Re: [PATCH v2] drm/etnaviv: refactor deprecated strncpy

2023-09-23 Thread Kees Cook
On Mon, Sep 18, 2023 at 01:34:08PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > A suitable replacement is `strscpy_pad` due to the fact that it > guarantees NUL-te

Re: [PATCH v4 03/10] drm/sched: Move schedule policy to scheduler

2023-09-23 Thread kernel test robot
Hi Matthew, kernel test robot noticed the following build warnings: [auto build test WARNING on drm/drm-next] [also build test WARNING on drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.6-rc2 next-20230921] [cannot apply to drm-

[drm-tip:drm-tip 4/6] arch/x86/include/asm/string_32.h:195:29: warning: '__builtin_memset' writing 16 bytes into a region of size 0 overflows the destination

2023-09-23 Thread kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip head: e1973de2c4516e9130157e538014e79c8aa57b41 commit: a59bb8e436a090adb48ed2723fd6864cd82bf8c8 [4/6] Merge remote-tracking branch 'drm-intel/drm-intel-gt-next' into drm-tip config: i386-buildonly-randconfig-005-20230924 (https://downloa

[PATCH] drm/i915/gt: Add error handling in intel_timeline_pin()

2023-09-23 Thread liuhaoran
This patch adds error-handling for the i915_active_acquire() inside the intel_timeline_pin(). Signed-off-by: liuhaoran --- drivers/gpu/drm/i915/gt/intel_timeline.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm

Re: [PATCH 7/9] drm/virtio: Annotate struct virtio_gpu_object_array with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:32, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

[RFC PATCH 2/3] drm/msm/dpu: add support for MSM8937

2023-09-23 Thread Dmitry Baryshkov
Experimental support for MSM8937, which has MDP5 v1.14. It looks like trimmed down version of MSM8996. Less SSPP, LM and PP blocks. No DSC, etc. Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_1_14_msm8937.h | 213 ++ .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c

[RFC PATCH 3/3] drm/msm/dpu: add support for MSM8917

2023-09-23 Thread Dmitry Baryshkov
Experimental support for MSM8917, which has MDP5 v1.15. It looks like trimmed down version of MSM8937. Even fewer PP, LM and no DSI1. Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_1_15_msm8917.h | 190 ++ .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c| 1 +

[RFC PATCH 1/3] drm/msm/dpu: add support for MSM8953

2023-09-23 Thread Dmitry Baryshkov
Experimental support for MSM8953, which has MDP5 v1.16. It looks like trimmed down version of MSM8996. Less SSPP, LM and PP blocks. No DSC, etc. Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_1_16_msm8953.h | 221 ++ .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c

[RFC PATCH 0/3] drm/msm/dpu: convert even more MDP5 platforms

2023-09-23 Thread Dmitry Baryshkov
Extend DPU driver with experimental support for even more MDP5 platforms: MSM8937, MSM8917, MSM8953. As with other MDP5 devices, one has to pass `msm.prefer_mdp5=false` kernel param to test DPU driver insead of using MDP5. Dependencies: [1] [1] https://patchwork.freedesktop.org/series/123294/ D

Re: [PATCH] video: mmp: Annotate struct mmp_path with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:51, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH v5 1/4] video: fbdev: atyfb: only use ioremap_uc() on i386 and ia64

2023-09-23 Thread Helge Deller
On 9/21/23 13:04, Baoquan He wrote: From: Arnd Bergmann ioremap_uc() is only meaningful on old x86-32 systems with the PAT extension, and on ia64 with its slightly unconventional ioremap() behavior, everywhere else this is the same as ioremap() anyway. Change the only driver that still referen

Re: [PATCH v3 1/7] drm/msm/dp: tie dp_display_irq_handler() with dp driver

2023-09-23 Thread Dmitry Baryshkov
On Sat, 23 Sept 2023 at 02:03, Kuogee Hsieh wrote: > > > On 9/15/2023 5:29 PM, Dmitry Baryshkov wrote: > > On Sat, 16 Sept 2023 at 00:38, Kuogee Hsieh wrote: > >> Currently the dp_display_irq_handler() is executed at msm_dp_modeset_init() > >> which ties irq registration to the DPU device's life

Re: [PATCH] video: fbdev: mmp: Annotate struct mmphw_ctrl with __counted_by

2023-09-23 Thread Helge Deller
On 9/23/23 18:33, Gustavo A. R. Silva wrote: On 9/22/23 11:51, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BO

Re: [PATCH 13/15] mailbox: mediatek: Add mt8188 support for CMDQ secure driver

2023-09-23 Thread Krzysztof Kozlowski
On 18/09/2023 21:22, Jason-JH.Lin wrote: > Add mt8188 support for CMDQ secure driver. > > Signed-off-by: Jason-JH.Lin > --- > drivers/mailbox/mtk-cmdq-mailbox.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c > b/drivers/mailbox/mtk-cmdq-mailbox.c >

Re: [PATCH 14/15] mailbox: mediatek: Add mt8195 support for CMDQ secure driver

2023-09-23 Thread Krzysztof Kozlowski
On 18/09/2023 21:22, Jason-JH.Lin wrote: > Add mt8195 support for CMDQ secure driver. How is it anyhow related to your patch content? > > Signed-off-by: Jason-JH.Lin > --- > drivers/mailbox/mtk-cmdq-mailbox.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mailbox/mtk-cmdq-ma

Re: [PATCH 08/15] soc: mediatek: Add cmdq_pkt_finalize_loop to CMDQ driver

2023-09-23 Thread Krzysztof Kozlowski
On 18/09/2023 21:21, Jason-JH.Lin wrote: > Add cmdq_pkt_finalize_loop to CMDQ driver. > > cmdq_pkt_finalize_loop appends end of command(EOC) instruction and > jump to start of command buffer instruction to make the command > buffer loopable. > > Signed-off-by: Jason-JH.Lin > --- > drivers/soc/m

Re: [PATCH 06/15] mailbox: mediatek: Add cmdq_mbox_stop to disable GCE thread

2023-09-23 Thread Krzysztof Kozlowski
On 18/09/2023 21:21, Jason-JH.Lin wrote: > Add cmdq_mbox_stop to disable GCE thread. > > To support the error handling or the stop flow of the GCE loopping > thread, lopping thread user can call cmdq_mbox_stop to disable the > GCE HW thread. > > Signed-off-by: Jason-JH.Lin > --- > drivers/mailb

Re: [PATCH 08/15] soc: mediatek: Add cmdq_pkt_finalize_loop to CMDQ driver

2023-09-23 Thread Krzysztof Kozlowski
On 18/09/2023 21:21, Jason-JH.Lin wrote: > Add cmdq_pkt_finalize_loop to CMDQ driver. > > cmdq_pkt_finalize_loop appends end of command(EOC) instruction and > jump to start of command buffer instruction to make the command > buffer loopable. > > Signed-off-by: Jason-JH.Lin > --- > drivers/soc/m

Re: [PATCH 07/15] mailbox: mediatek: Add loop pkt flag and irq handling for loop command

2023-09-23 Thread Krzysztof Kozlowski
On 18/09/2023 21:21, Jason-JH.Lin wrote: > CMDQ client can use a loop flag for the CMDQ packet to make current > command buffer jumps to the beginning when GCE executes to the end > of commands buffer. > > GCE irq occurs when GCE executes to the end of command instruction. > If the CMDQ packet is

Re: [PATCH 06/15] mailbox: mediatek: Add cmdq_mbox_stop to disable GCE thread

2023-09-23 Thread Krzysztof Kozlowski
On 18/09/2023 21:21, Jason-JH.Lin wrote: > Add cmdq_mbox_stop to disable GCE thread. > > To support the error handling or the stop flow of the GCE loopping > thread, lopping thread user can call cmdq_mbox_stop to disable the > GCE HW thread. > > Signed-off-by: Jason-JH.Lin > --- > drivers/mailb

Re: [PATCH 03/15] soc: mailbox: Add SPR definition for GCE

2023-09-23 Thread Krzysztof Kozlowski
On 18/09/2023 21:21, Jason-JH.Lin wrote: > GCE has specific purpose registers, abbreviated as SPR. > Client can us SPR to store data or programs. > > In CMDQ driver, it allows client to STORE or LOAD data into SPR. > The value stored in SPR will be cleared after reset GCE HW thread. > > There are

Re: [PATCH 02/15] dt-bindings: gce: mt8195: Add CMDQ_SYNC_TOKEN_SECURE_THR_EOF event id

2023-09-23 Thread Krzysztof Kozlowski
On 18/09/2023 21:21, Jason-JH.Lin wrote: > CMDQ_SYNC_TOKEN_SECURE_THR_EOF is used as secure irq to notify CMDQ > driver in the normal world that GCE secure thread has completed a task > in thee secure world. How can #define be added after its usage? Does it even make any sense of being separate pa

Re: [PATCH] video: fbdev: mmp: Annotate struct mmphw_ctrl with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:51, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH v6 00/16] introduce more MDP3 components in MT8195

2023-09-23 Thread Krzysztof Kozlowski
On 22/09/2023 09:21, Moudy Ho wrote: > Changes since v5: > - Rebase on v6.6-rc2. > - Dependent dtsi files: > https://patchwork.kernel.org/project/linux-mediatek/list/?series=786511 > - Depends on: > Message ID = 20230911074233.31556-5-shawn.s...@mediatek.com > - Split out common propertis for R

Re: [PATCH v6 10/16] dt-bindings: media: mediatek: mdp3: add component TDSHP for MT8195

2023-09-23 Thread Krzysztof Kozlowski
On 22/09/2023 09:21, Moudy Ho wrote: > Add the fundamental hardware configuration of component TDSHP, > which is controlled by MDP3 on MT8195. > > Signed-off-by: Moudy Ho > --- > .../bindings/media/mediatek,mdp3-tdshp.yaml | 61 +++ > 1 file changed, 61 insertions(+) > create

Re: [PATCH v6 03/16] dt-bindings: media: mediatek: mdp3: include common properties

2023-09-23 Thread Krzysztof Kozlowski
On 22/09/2023 09:21, Moudy Ho wrote: > To minimize duplication and standardize the document style, > include the common properties for MT8183 RDMA. > > Signed-off-by: Moudy Ho > --- > .../bindings/media/mediatek,mdp3-rdma.yaml| 43 ++- > 1 file changed, 4 insertions(+), 39 de

Re: [PATCH v6 02/16] dt-bindings: media: mediatek: mdp3: split out general properties

2023-09-23 Thread Krzysztof Kozlowski
On 22/09/2023 09:21, Moudy Ho wrote: > In order to minimize duplication and standardize the document style, > it is necessary to separate the general properties specific to > MediaTek MDP3 RDMA. > > Signed-off-by: Moudy Ho > --- > .../media/mediatek,mdp3-rdma-common.yaml | 72 ++

Re: [PATCH 5.4 000/367] 5.4.257-rc1 review

2023-09-23 Thread Greg Kroah-Hartman
On Thu, Sep 21, 2023 at 09:16:57PM +0800, Sui Jingfeng wrote: > Hi, > > > On 2023/9/21 21:10, Sui Jingfeng wrote: > > return -ERR_PTR(-ENOMEM) > > > return ERR_PTR(-ENOMEM); Thanks, now fixed up. greg k-h

Re: [PATCH 1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:32, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF