[PATCH 2/3] drm/mediatek: Fix pkt buf alloc once but free many times

2021-09-29 Thread jason-jh . lin
Because mtk_drm_crt_cmdq_pkt_create is called once in mtk_drm_crtc_create, the pkt should not be destroy at ddp_cmdq_cb. So move mtk_drm_crtc_pkt_destroy to mtk_drm_crtc_destroy. Fixes: bc9241be73d9 ("drm/mediatek: Add cmdq_handle in mtk_crtc") Signed-off-by: jason-jh.lin --- drivers/gpu/drm/me

[PATCH 0/3] Fix the issues caused by CMDQ refinement of mtk-drm

2021-09-29 Thread jason-jh . lin
jason-jh.lin (3): drm/mediatek: Fix crash at using pkt->cl->chan in cmdq_pkt_finalize drm/mediatek: Fix pkt buf alloc once but free many times drm/mediatek: Fix cursor plane is not config when primary is updating drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 95 ++--- 1 file

[PATCH 1/3] drm/mediatek: Fix crash at using pkt->cl->chan in cmdq_pkt_finalize

2021-09-29 Thread jason-jh . lin
Because mtk_drm_crtc_create_pkt didn't assign pkt->cl, it will crash at using pkt->cl->chan in cmdq_pkt_finalize. So add struct cmdq_client and let mtk_drm_crtc instance define cmdq_client as: struct mtk_drm_crtc { /* client instance data */ struct cmdq_client cmdq_client; }; and

[PATCH 3/3] drm/mediatek: Fix cursor plane is not config when primary is updating

2021-09-29 Thread jason-jh . lin
If cursor plane has updated but primary plane config task is not finished, mtk_drm_crtc_update_config will call mbox_flush() to clear all task in current GCE thread and let cursor plane re-send a new GCE task with cursor + primary plane config to replace the unfinished GCE task. So the plane confi

[RFC PATCH v2 0/2] RDMA/rxe: Add dma-buf support

2021-09-29 Thread Shunsuke Mie
This patch series add a dma-buf support for rxe driver. A dma-buf based memory registering has beed introduced to use the memory region that lack of associated page structures (e.g. device memory and CMA managed memory) [1]. However, to use the dma-buf based memory, each rdma device drivers requir

[PATCH] drm/nouveau:Fix gcc '-Wunused-but-set-variable' warnings:

2021-09-29 Thread Kai Song
drivers/gpu/drm/nouveau/nouveau_bo.c: In function 'nouveau_ttm_tt_populate': drivers/gpu/drm/nouveau/nouveau_bo.c:1251:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable] drivers/gpu/drm/nouveau/nouveau_bo.c: In function 'nouveau_ttm_tt_unpopulate': drivers/gpu/drm/nouveau/nou

[RFC PATCH v2 2/2] RDMA/rxe: Add dma-buf support

2021-09-29 Thread Shunsuke Mie
Implement a ib device operation ‘reg_user_mr_dmabuf’. Generate a rxe_map from the memory space linked the passed dma-buf. Signed-off-by: Shunsuke Mie --- drivers/infiniband/sw/rxe/rxe_loc.h | 2 + drivers/infiniband/sw/rxe/rxe_mr.c| 118 ++ drivers/infiniband/sw/r

[PATCH -next] drivers/base/component.c: remove superfluous header files from component.c

2021-09-29 Thread Mianhan Liu
component.c hasn't use any macro or function declared in linux/kref.h. Thus, these files can be removed from component.c safely without affecting the compilation of the drivers/base/ module Signed-off-by: Mianhan Liu --- drivers/base/component.c | 1 - 1 file changed, 1 deletion(-) diff --git

[RFC PATCH v2 1/2] RDMA/umem: Change for rdma devices has not dma device

2021-09-29 Thread Shunsuke Mie
Current implementation requires a dma device for RDMA driver to use dma-buf memory space as RDMA buffer. However, software RDMA drivers has not dma device and copy RDMA data using CPU instead of hardware. This patch changes to be hold a dma-buf on struct ib_umem_dmabuf. This allows the software RD

Re: [PATCH v3 00/12] Context types, v3

2021-09-29 Thread Gerd Hoffmann
> Gurchetan Singh (10): > virtio-gpu api: multiple context types with explicit initialization > drm/virtgpu api: create context init feature > drm/virtio: implement context init: track valid capabilities in a mask > drm/virtio: implement context init: track {ring_idx, emit_fence_info} >

Re: [PATCH] [SUBMITTED 20210721] fbdev: simplefb: fix Kconfig dependencies

2021-09-29 Thread Thomas Zimmermann
Hi Am 28.09.21 um 16:52 schrieb Arnd Bergmann: From: Arnd Bergmann Configurations with both CONFIG_FB_SIMPLE=y and CONFIG_DRM_SIMPLEDRM=m are allowed by Kconfig because the 'depends on !DRM_SIMPLEDRM' dependency does not disallow FB_SIMPLE as long as SIMPLEDRM is not built-in. This can however

[PATCH v5 0/7] drm/sun4i: Add support for dual-link LVDS on the A20

2021-09-29 Thread Maxime Ripard
Hi, This is a fourth attempt at supporting the LVDS dual-link output on the Allwinner A20. Let me know what you think, Maxime Changes from v4: - Rebased on 5.15 Changes from v3: - Reintroduce the endpoint sanity check (and make of_graph_get_port_by_id const in the process) - Make a fe

[PATCH v5 1/7] of: Make of_graph_get_port_by_id take a const device_node

2021-09-29 Thread Maxime Ripard
of_graph_get_port_by_id doesn't modify the device_node pointer it takes as argument, so we can make it const. Signed-off-by: Maxime Ripard --- drivers/of/property.c| 2 +- include/linux/of_graph.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/of/property.c

[PATCH v5 2/7] drm/of: Change the prototype of drm_of_lvds_get_dual_link_pixel_order

2021-09-29 Thread Maxime Ripard
The drm_of_lvds_get_dual_link_pixel_order() function took so far the device_node of the two ports used together to make up a dual-link LVDS output. This assumes that a binding would use an entire port for the LVDS output. However, some bindings have used endpoints instead and thus we need to opera

[PATCH v5 3/7] dt-bindings: display: sun4i: Add LVDS Dual-Link property

2021-09-29 Thread Maxime Ripard
The Allwinner SoCs with two TCONs and LVDS output can use both to drive an LVDS dual-link. Add a new property to express that link between these two TCONs. Signed-off-by: Maxime Ripard --- .../bindings/display/allwinner,sun4i-a10-tcon.yaml | 6 ++ 1 file changed, 6 insertions(+) di

[PATCH v5 4/7] drm/sun4i: tcon: Refactor the LVDS and panel probing

2021-09-29 Thread Maxime Ripard
The current code to parse the DT, deal with the older device trees, and register either the RGB or LVDS output has so far grown organically into the bind function and has become quite hard to extend properly. Let's move it into a single function that grabs all the resources it needs and registers

[PATCH v5 5/7] drm/sun4i: tcon: Support the LVDS Dual-Link

2021-09-29 Thread Maxime Ripard
The A20 and other SoC with two TCONs (A31, R40, etc.) can use its second TCON as the secondary LVDS link in a dual-link setup, with the TCON0 being the main link. Extend a bit the parsing code to leverage the DRM dual-link code, register only the LVDS output on the primary TCON, and add the needed

[PATCH v5 6/7] drm/sun4i: tcon: Enable the A20 dual-link output

2021-09-29 Thread Maxime Ripard
The A20 second TCON (TCON1) can be used as a secondary output to drive a dual-link LVDS output. Let's add it to our capabilities. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/sun

[PATCH v5 7/7] [DO NOT MERGE] ARM: dts: sun7i: Enable LVDS Dual-Link on the Cubieboard

2021-09-29 Thread Maxime Ripard
For the sake of the example, let's enable an LVDS Dual-Link display on a Cubieboard. Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 69 + 1 file changed, 69 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boo

[PATCH] drm/i915: Add ww context to intel_dpt_pin, v2.

2021-09-29 Thread Maarten Lankhorst
Ensure i915_vma_pin_iomap and vma_unpin are done with dpt->obj lock held. I don't think there's much of a point in merging intel_dpt_pin() with intel_pin_fb_obj_dpt(), they touch different objects. Changes since v1: - Fix using the wrong pointer to retrieve error code (Julia) Signed-off-by: Maar

[PATCH v2 0/4] drm/v3d: add multiple in/out syncobjs support

2021-09-29 Thread Melissa Wen
Currently, v3d only supports single in/out syncobj per submission (in v3d_submit_cl, there are two in_sync, one for bin and another for render job); however, Vulkan queue submit operations expect multiples wait and signal semaphores. This series extends v3d interface and job dependency operations t

[PATCH v2 1/4] drm/v3d: decouple adding job dependencies steps from job init

2021-09-29 Thread Melissa Wen
Prep work to enable a job to wait for more than one syncobj before start. Also get rid of old checkpatch warnings in the v3d_gem file. No functional changes. Signed-off-by: Melissa Wen --- drivers/gpu/drm/v3d/v3d_gem.c | 28 ++-- 1 file changed, 18 insertions(+), 10 delet

[PATCH v2 2/4] drm/v3d: alloc and init job in one shot

2021-09-29 Thread Melissa Wen
Move job memory allocation to v3d_job_init function. This aim to facilitate error handling in job initialization, since cleanup steps are similar for all (struct v3d_job)-based types of job involved in a command submission. To generalize v3d_job_init(), this change takes into account that all job s

[PATCH v2 3/4] drm/v3d: add generic ioctl extension

2021-09-29 Thread Melissa Wen
Add support to attach generic extensions on job submission. This patch is third prep work to enable multiple syncobjs on job submission. With this work, when the job submission interface needs to be extended to accomodate a new feature, we will use a generic extension struct where an id determines

[PATCH v2 4/4] drm/v3d: add multiple syncobjs support

2021-09-29 Thread Melissa Wen
Using the generic extension from the previous patch, a specific multisync extension enables more than one in/out binary syncobj per job submission. Arrays of syncobjs are set in struct drm_v3d_multisync, that also cares of determining the stage for sync (wait deps) according to the job queue. v2:

[PATCH v1 2/4] dt-bindings: display: mediatek: add MT8195 hdmi bindings

2021-09-29 Thread Guillaume Ranquet
Add Mediatek HDMI and HDMI-DDC bindings for MT8195 SoC. Signed-off-by: Guillaume Ranquet --- .../mediatek/mediatek,mt8195-hdmi-ddc.yaml| 45 + .../mediatek/mediatek,mt8195-hdmi.yaml| 98 +++ 2 files changed, 143 insertions(+) create mode 100644 Documentation

[PATCH v1 3/4] phy: mediatek: add support for phy-mtk-hdmi-mt8195

2021-09-29 Thread Guillaume Ranquet
Add basic support for the mediatek hdmi phy on MT8195 SoC Signed-off-by: Guillaume Ranquet --- drivers/phy/mediatek/Makefile | 1 + drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 793 + drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h | 204 ++ 3 files changed, 998

[PATCH v1 4/4] drm/mediatek: add mt8195 hdmi TX support

2021-09-29 Thread Guillaume Ranquet
Add basic hdmi TX support for the mediatek mt8195 SoCs Signed-off-by: Guillaume Ranquet --- drivers/gpu/drm/mediatek/Kconfig | 10 + drivers/gpu/drm/mediatek/Makefile |4 +- drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c| 2293 + drivers/gpu/drm/med

Re: [PATCH] [RFC] qcom_scm: hide Kconfig symbol

2021-09-29 Thread Will Deacon
On Mon, Sep 27, 2021 at 05:22:13PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > Now that SCM can be a loadable module, we have to add another > dependency to avoid link failures when ipa or adreno-gpu are > built-in: > > aarch64-linux-ld: drivers/net/ipa/ipa_main.o: in function `ipa_pro

[PATCH] drm: document pre-multiplied assumptions

2021-09-29 Thread Simon Ser
When a plane is missing the "alpha blend mode" property, KMS drivers will use the pre-multiplied mode. Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Pekka Paalanen --- drivers/gpu/drm/drm_blend.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/

Re: [PATCH] [RFC] qcom_scm: hide Kconfig symbol

2021-09-29 Thread Arnd Bergmann
On Wed, Sep 29, 2021 at 11:51 AM Will Deacon wrote: > On Mon, Sep 27, 2021 at 05:22:13PM +0200, Arnd Bergmann wrote: > > > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > > index 124c41adeca1..989c83acbfee 100644 > > --- a/drivers/iommu/Kconfig > > +++ b/drivers/iommu/Kconfig > > @@

[PATCH] drm/msm/dp: Remove redundant initialization of variable bpp

2021-09-29 Thread Colin King
From: Colin Ian King The variable bpp is being initialized with a value that is never read, it is being updated later on in both paths of an if statement. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/msm/

Re: [PATCH v5 09/13] drm/i915/ttm: add tt shmem backend

2021-09-29 Thread Thomas Hellström
On Mon, 2021-09-27 at 12:41 +0100, Matthew Auld wrote: > For cached objects we can allocate our pages directly in shmem. This > should make it possible(in a later patch) to utilise the existing > i915-gem shrinker code for such objects. For now this is still > disabled. Some minor comments below,

[PATCH] drm/msm/mdp4: Fix potential integer overflow on 32 bit multiply

2021-09-29 Thread Colin King
From: Colin Ian King In the case where clock is 2147485 or greater the 32 bit multiplication by 1000 will cause an integer overflow. Fix this by making the constant 1000 a long to ensure a long multiply occurs to avoid the overflow before assigning the result to the long result in variable reques

Re: [PATCH] drm/atomic: Add the crtc to affected crtc only if uapi.enable = true

2021-09-29 Thread Ville Syrjälä
On Thu, Apr 01, 2021 at 02:49:13PM -0700, Navare, Manasi wrote: > On Fri, Mar 26, 2021 at 06:15:22PM +0200, Ville Syrjälä wrote: > > On Thu, Mar 25, 2021 at 03:01:29PM -0700, Navare, Manasi wrote: > > > On Fri, Mar 19, 2021 at 11:27:59PM +0200, Ville Syrjälä wrote: > > > > On Fri, Mar 19, 2021 at 0

NAK: [PATCH] drm/msm/mdp4: Fix potential integer overflow on 32 bit multiply

2021-09-29 Thread Colin Ian King
On 29/09/2021 12:08, Colin King wrote: From: Colin Ian King In the case where clock is 2147485 or greater the 32 bit multiplication by 1000 will cause an integer overflow. Fix this by making the constant 1000 a long to ensure a long multiply occurs to avoid the overflow before assigning the res

Re: [PATCH v5 11/13] drm/i915/ttm: make evicted shmem pages visible to the shrinker

2021-09-29 Thread Thomas Hellström
On Mon, 2021-09-27 at 12:41 +0100, Matthew Auld wrote: > We currently just evict lmem objects to system memory when under > memory > pressure, and in the next patch we want to use the shmem backend even > for this case. For this case we lack the usual object mm.pages, which > effectively hides the

[PATCH][V2] drm/msm: Fix potential integer overflow on 32 bit multiply

2021-09-29 Thread Colin King
From: Colin Ian King In the case where clock is 2147485 or greater the 32 bit multiplication by 1000 will cause an integer overflow. Fix this by making the constant 1000 an unsigned long to ensure a long multiply occurs to avoid the overflow before assigning the result to the long result in varia

Re: [PATCH v5 12/13] drm/i915/ttm: use cached system pages when evicting lmem

2021-09-29 Thread Thomas Hellström
On Mon, 2021-09-27 at 12:41 +0100, Matthew Auld wrote: > This should let us do an accelerated copy directly to the shmem pages > when temporarily moving lmem-only objects, where the i915-gem > shrinker > can later kick in to swap out the pages, if needed. > > Signed-off-by: Matthew Auld > Cc: Tho

Re: [PATCH v5 13/13] drm/i915/ttm: enable shmem tt backend

2021-09-29 Thread Thomas Hellström
On Mon, 2021-09-27 at 12:41 +0100, Matthew Auld wrote: > Turn on the shmem tt backend, and enable shrinking. > > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > --- >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 1 + >  1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/i915/gem/

Re: [Intel-gfx] [PATCH v5 01/13] drm/ttm: stop calling tt_swapin in vm_access

2021-09-29 Thread Christian König
Am 27.09.21 um 18:14 schrieb Matthew Auld: On Mon, 27 Sept 2021 at 12:47, Christian König wrote: Any objections that I just push patches 1-7 to drm-misc-next? Please go ahead Christian. Thanks. Well I've pushed patches #1-#4 because #5 won't apply on current drm-misc-next (some conflict in

Re: [PATCH v8 09/12] media: mtk-vcodec: Get rid of mtk_smi_larb_get/put

2021-09-29 Thread Dafna Hirschfeld
On 29.09.21 03:37, Yong Wu wrote: MediaTek IOMMU has already added the device_link between the consumer and smi-larb device. If the vcodec device call the pm_runtime_get_sync, the smi-larb's pm_runtime_get_sync also be called automatically. CC: Tiffany Lin CC: Irui Wang Signed-off-by: Yong

[PATCH] drm/msm: Fix null pointer dereference on pointer edp

2021-09-29 Thread Colin King
From: Colin Ian King The initialization of pointer dev dereferences pointer edp before edp is null checked, so there is a potential null pointer deference issue. Fix this by only dereferencing edp after edp has been null checked. Addresses-Coverity: ("Dereference before null check") Fixes: ab5b0

Re: [PATCH] drm: document pre-multiplied assumptions

2021-09-29 Thread Ville Syrjälä
On Wed, Sep 29, 2021 at 09:54:14AM +, Simon Ser wrote: > When a plane is missing the "alpha blend mode" property, KMS drivers > will use the pre-multiplied mode. > > Signed-off-by: Simon Ser > Cc: Daniel Vetter > Cc: Pekka Paalanen Reviewed-by: Ville Syrjälä Another option would be to sp

Re: [PATCH v5 10/13] drm/i915: try to simplify make_{un}shrinkable

2021-09-29 Thread Thomas Hellström
On Mon, 2021-09-27 at 12:41 +0100, Matthew Auld wrote: > Drop the atomic shrink_pin stuff, and just have make_{un}shrinkable > update the shrinker visible lists immediately. This at least > simplifies > the next patch, and does make the behaviour more obvious. The > potential > downside is that mak

Re: [PATCH] drm: document pre-multiplied assumptions

2021-09-29 Thread Pekka Paalanen
On Wed, 29 Sep 2021 09:54:14 + Simon Ser wrote: > When a plane is missing the "alpha blend mode" property, KMS drivers > will use the pre-multiplied mode. > > Signed-off-by: Simon Ser > Cc: Daniel Vetter > Cc: Pekka Paalanen > --- > drivers/gpu/drm/drm_blend.c | 3 +++ > 1 file changed,

Re: [PATCH v4 02/10] drm/ingenic: Add support for JZ4780 and HDMI output

2021-09-29 Thread H. Nikolaus Schaller
Hi Paul, > Am 28.09.2021 um 14:06 schrieb H. Nikolaus Schaller : > > Hi Paul, > >> Am 28.09.2021 um 12:21 schrieb H. Nikolaus Schaller : >> @@ -1492,10 +1555,16 @@ static int ingenic_drm_init(void) { int err; + if (IS_ENABLED(CONFIG_DRM_INGENIC_DW_HDMI)) { +

[PATCH 1/3] drm/ttm: s/FLAG_SG/FLAG_EXTERNAL/

2021-09-29 Thread Matthew Auld
It covers more than just ttm_bo_type_sg usage, like with say dma-buf, since one other user is userptr in amdgpu, and in the future we might have some more. Hence EXTERNAL is likely a more suitable name. v2(Christian): - Rename these to TTM_TT_FLAGS_* - Fix up all the holes in the flag values

[PATCH 2/3] drm/ttm: add some kernel-doc for TTM_TT_FLAG_*

2021-09-29 Thread Matthew Auld
Move it to inline kernel-doc, otherwise we can't add empty lines it seems. Also drop the kernel-doc for pages_list, which doesn't seem to exist. v2(Christian): - Add a note that FLAG_SWAPPED shouldn't need to be touched by drivers. - Mention what FLAG_POPULATED does. Signed-off-by: Matthew Au

[PATCH 3/3] drm/ttm: add TTM_TT_FLAG_EXTERNAL_MAPPABLE

2021-09-29 Thread Matthew Auld
In commit: commit 667a50db0477d47fdff01c666f5ee1ce26b5264c Author: Thomas Hellstrom Date: Fri Jan 3 11:17:18 2014 +0100 drm/ttm: Refuse to fault (prime-) imported pages we introduced the restriction that imported pages should not be directly mappable through TTM(this also extends to userp

Re: [Intel-gfx] [PATCH v5 01/13] drm/ttm: stop calling tt_swapin in vm_access

2021-09-29 Thread Matthew Auld
On Wed, 29 Sept 2021 at 13:01, Christian König wrote: > > Am 27.09.21 um 18:14 schrieb Matthew Auld: > > On Mon, 27 Sept 2021 at 12:47, Christian König > > wrote: > >> Any objections that I just push patches 1-7 to drm-misc-next? > > Please go ahead Christian. Thanks. > > Well I've pushed patche

Re: [PATCH v1 2/4] dt-bindings: display: mediatek: add MT8195 hdmi bindings

2021-09-29 Thread Rob Herring
On Wed, 29 Sep 2021 11:44:23 +0200, Guillaume Ranquet wrote: > Add Mediatek HDMI and HDMI-DDC bindings for MT8195 SoC. > > Signed-off-by: Guillaume Ranquet > --- > .../mediatek/mediatek,mt8195-hdmi-ddc.yaml| 45 + > .../mediatek/mediatek,mt8195-hdmi.yaml| 98 +

Re: [PATCH v2] drm/amd/display: Only define DP 2.0 symbols if not already defined

2021-09-29 Thread Harry Wentland
On 2021-09-28 23:58, Navare, Manasi D wrote: > [AMD Official Use Only] > > We have merged such DRM definition dependencies previously through a topic > branch in order to avoid redefining inside the driver. > But yes guarding this with ifdef is good. > > Reviewed-by: Manasi Navare > Ah, I

Re: [PATCH v2 0/4] CMDQ refinement of Mediatek DRM driver

2021-09-29 Thread Chun-Kuang Hu
+Jason: Hi, Enric: Please test Jason's series [1], [2]. Does these series fixes your problem? [1] https://patchwork.kernel.org/project/linux-mediatek/list/?series=554759 [2] https://patchwork.kernel.org/project/linux-mediatek/list/?series=554767 Regards, Chun-Kuang. Chun-Kuang Hu 於 2021年9月24日

Re: [PATCH v4 02/10] drm/ingenic: Add support for JZ4780 and HDMI output

2021-09-29 Thread Paul Cercueil
Hi, Le mar., sept. 28 2021 at 14:06:03 +0200, H. Nikolaus Schaller a écrit : Hi Paul, Am 28.09.2021 um 12:21 schrieb H. Nikolaus Schaller : @@ -1492,10 +1555,16 @@ static int ingenic_drm_init(void) { int err; + if (IS_ENABLED(CONFIG_DRM_INGENIC_DW_HDMI)) { +

Re: [PATCH v4 02/10] drm/ingenic: Add support for JZ4780 and HDMI output

2021-09-29 Thread H. Nikolaus Schaller
Hi Paul, > Am 29.09.2021 um 16:30 schrieb Paul Cercueil : > > Hi, > > Le mar., sept. 28 2021 at 14:06:03 +0200, H. Nikolaus Schaller > a écrit : >> Hi Paul, >>> Am 28.09.2021 um 12:21 schrieb H. Nikolaus Schaller : > @@ -1492,10 +1555,16 @@ static int ingenic_drm_init(void) > { >

Re: [PATCH] [RFC] qcom_scm: hide Kconfig symbol

2021-09-29 Thread Bjorn Andersson
On Wed 29 Sep 05:04 CDT 2021, Arnd Bergmann wrote: > On Wed, Sep 29, 2021 at 11:51 AM Will Deacon wrote: > > On Mon, Sep 27, 2021 at 05:22:13PM +0200, Arnd Bergmann wrote: > > > > > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > > > index 124c41adeca1..989c83acbfee 100644 > > > --

[PATCH 1/1 REPOST] drm: fix colour banding on Lenovo Thinkpad L540 panel

2021-09-29 Thread Francesco P. Lovergine
Hi, there is an issue with Lenovo Thinkpad L540 panel i.e. a bad looking color banding with dark colors mainly, very similar to that present in other models as pointed in referenced bugs. That happens with any kernel starting from 4.8 up to the current. Bug: https://bugs.launchpad.net/ubuntu/+

Re: [PATCH 2/2] [v2] qcom_scm: hide Kconfig symbol

2021-09-29 Thread Bjorn Andersson
On Tue 28 Sep 02:50 CDT 2021, Arnd Bergmann wrote: > From: Arnd Bergmann > > Now that SCM can be a loadable module, we have to add another > dependency to avoid link failures when ipa or adreno-gpu are > built-in: > > aarch64-linux-ld: drivers/net/ipa/ipa_main.o: in function `ipa_probe': > ipa_

Re: [Intel-gfx] [PATCH] drm/i915: Add ww context to intel_dpt_pin, v2.

2021-09-29 Thread Intel
On 9/29/21 10:59, Maarten Lankhorst wrote: Ensure i915_vma_pin_iomap and vma_unpin are done with dpt->obj lock held. I don't think there's much of a point in merging intel_dpt_pin() with intel_pin_fb_obj_dpt(), they touch different objects. Changes since v1: - Fix using the wrong pointer to r

Re: [PATCH 1/3] drm/mediatek: Fix crash at using pkt->cl->chan in cmdq_pkt_finalize

2021-09-29 Thread Chun-Kuang Hu
Hi, Jason: jason-jh.lin 於 2021年9月29日 週三 下午3:02寫道: > > Because mtk_drm_crtc_create_pkt didn't assign pkt->cl, it will > crash at using pkt->cl->chan in cmdq_pkt_finalize. > > So add struct cmdq_client and let mtk_drm_crtc instance define > cmdq_client as: > > struct mtk_drm_crtc { > /* cli

Re: [Freedreno] [PATCH v2 13/13] drm/msm: Implement HDCP 1.x using the new drm HDCP helpers

2021-09-29 Thread Sean Paul
On Tue, Sep 28, 2021 at 02:35:09PM -0700, abhin...@codeaurora.org wrote: > On 2021-09-28 11:02, Sean Paul wrote: > > On Tue, Sep 21, 2021 at 07:25:41PM -0700, abhin...@codeaurora.org wrote: > > > On 2021-09-15 13:38, Sean Paul wrote: > > > > From: Sean Paul > > > > > > > > This patch adds HDCP 1.x

Re: [PATCH 2/3] drm/mediatek: Fix pkt buf alloc once but free many times

2021-09-29 Thread Chun-Kuang Hu
Hi, Jason: jason-jh.lin 於 2021年9月29日 週三 下午3:02寫道: > > Because mtk_drm_crt_cmdq_pkt_create is called once > in mtk_drm_crtc_create, the pkt should not be destroy > at ddp_cmdq_cb. > > So move mtk_drm_crtc_pkt_destroy to mtk_drm_crtc_destroy. Reviewed-by: Chun-Kuang Hu > > Fixes: bc9241be73d9 ("

Re: [PATCH 3/3] drm/mediatek: Fix cursor plane is not config when primary is updating

2021-09-29 Thread Chun-Kuang Hu
Hi, Jason: jason-jh.lin 於 2021年9月29日 週三 下午3:02寫道: > > If cursor plane has updated but primary plane config task is not > finished, mtk_drm_crtc_update_config will call mbox_flush() to clear > all task in current GCE thread and let cursor plane re-send a new > GCE task with cursor + primary plane

Re: [PATCH v7 2/3] drm/mediatek: implment the dsi hs packets aligned

2021-09-29 Thread Chun-Kuang Hu
Hi, Jitao: Jitao Shi 於 2021年9月16日 週四 上午6:31寫道: > > Some dsi devices require the packets on lanes aligned at the end, > or the screen will shift or scroll. Reviewed-by: Chun-Kuang Hu > > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dsi.c | 10 ++ > 1 file changed, 10

Re: [PATCH v11 12/16] drm/mediatek: rename the define of register offset

2021-09-29 Thread Chun-Kuang Hu
Hi, Jason: jason-jh.lin 於 2021年9月21日 週二 下午11:52寫道: > > Add DISP_REG prefix for the define of register offset to > make the difference from the define of register value. Reviewed-by: Chun-Kuang Hu > > Signed-off-by: jason-jh.lin > --- > rebase on series [1] > > [1] drm/mediatek: add support fo

Re: [PATCH v11 13/16] drm/mediatek: adjust to the alphabetic order for mediatek-drm

2021-09-29 Thread Chun-Kuang Hu
Hi, Jason: jason-jh.lin 於 2021年9月21日 週二 下午11:52寫道: > > Adjust to the alphabetic order for the define, function, struct > and array in mediatek-drm driver Reviewed-by: Chun-Kuang Hu > > Signed-off-by: jason-jh.lin > --- > rebase on series [1] > > [1] drm/mediatek: add support for mediatek SOC

Re: [PATCH v11 14/16] drm/mediatek: add DSC support for mediatek-drm

2021-09-29 Thread Chun-Kuang Hu
Hi, Jason: jason-jh.lin 於 2021年9月21日 週二 下午11:52寫道: > > DSC is designed for real-time systems with real-time compression, > transmission, decompression and display. > The DSC standard is a specification of the algorithms used for > compressing and decompressing image display streams, including > t

[PATCH v2] drm/msm/dp: only signal audio when disconnected detected at dp_pm_resume

2021-09-29 Thread Kuogee Hsieh
Currently there is audio not working problem after system resume from suspend if hdmi monitor stay plugged in at DUT. However this problem does not happen at normal operation but at a particular test case. The root cause is DP driver signal audio with connected state at resume which trigger audio t

[PATCH] drm/msm: prevent NULL dereference in msm_gpu_crashstate_capture()

2021-09-29 Thread Tim Gardner
Coverity complains of a possible NULL dereference: CID 120718 (#1 of 1): Dereference null return value (NULL_RETURNS) 23. dereference: Dereferencing a pointer that might be NULL state->bos when calling msm_gpu_crashstate_get_bo. [show details] 301msm_gpu_crashstate_get_

Re: [PATCH v8 03/12] iommu/mediatek: Add probe_defer for smi-larb

2021-09-29 Thread Dafna Hirschfeld
On 29.09.21 03:37, Yong Wu wrote: Prepare for adding device_link. The iommu consumer should use device_link to connect with the smi-larb(supplier). then the smi-larb should run before the iommu consumer. Here we delay the iommu driver until the smi driver is ready, then all the iommu consumer

[PATCH] drm/msm/dsi: prevent unintentional integer overflow in dsi_pll_28nm_clk_recalc_rate()

2021-09-29 Thread Tim Gardner
Coverity warns of an unintentional integer overflow CID 120715 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) overflow_before_widen: Potentially overflowing expression ref_clk * sdm_byp_div with type unsigned int (32 bits, unsigned) is evaluated using 32-bit arithmetic, and

Re: [PATCH v2] drm/i915/bdb: Fix version check

2021-09-29 Thread Souza, Jose
On Thu, 2021-09-23 at 18:49 +0200, Lukasz Majczak wrote: > With patch "drm/i915/vbt: Fix backlight parsing for VBT 234+" > the size of bdb_lfp_backlight_data structure has been increased, > causing if-statement in the parse_lfp_backlight function > that comapres this structure size to the one retri

Re: [PATCH v3 2/4] drm/rockchip: dsi: Reconfigure hardware on resume()

2021-09-29 Thread Nícolas F . R . A . Prado
On Tue, Sep 28, 2021 at 02:35:50PM -0700, Brian Norris wrote: > Since commit 43c2de1002d2, we perform most HW configuration in the > bind() function. This configuration may be lost on suspend/resume, so we > need to call it again. That may lead to errors like this after system > suspend/resume: >

Re: [PATCH v3 3/4] drm/rockchip: dsi: Fix unbalanced clock on probe error

2021-09-29 Thread Nícolas F . R . A . Prado
On Tue, Sep 28, 2021 at 02:35:51PM -0700, Brian Norris wrote: > Our probe() function never enabled this clock, so we shouldn't disable > it if we fail to probe the bridge. > > Noted by inspection. > > Fixes: 2d4f7bdafd70 ("drm/rockchip: dsi: migrate to use dw-mipi-dsi bridge > driver") > Signed-

Re: [PATCH v3 4/4] drm/rockchip: dsi: Disable PLL clock on bind error

2021-09-29 Thread Nícolas F . R . A . Prado
On Tue, Sep 28, 2021 at 02:35:52PM -0700, Brian Norris wrote: > Fix some error handling here noticed in review of other changes. > > Fixes: 2d4f7bdafd70 ("drm/rockchip: dsi: migrate to use dw-mipi-dsi bridge > driver") > Signed-off-by: Brian Norris > Reported-by: Chen-Yu Tsai > Reviewed-by: Che

[PATCH 1/3] drm/i915: rename IS_ACTIVE

2021-09-29 Thread Lucas De Marchi
It took me some time to understand the need for IS_ACTIVE and why we couldn't use kconfig.h. Rename it to something else that would be more suitable to include in kconfig.h and shared with other subsystems rather than maintaining it only in i915. Name here is pretty open for suggestions, but I thi

[PATCH 0/3] Rename IS_ACTIVE() and move to kconfig.h

2021-09-29 Thread Lucas De Marchi
As we try to reduce our i915-only helpers, let's try to improve IS_ACTIVE() logic and move to kconfig.h. I'm not 100% happy with the name, but it's the best I could come up with, hopefully a little better than trying to add IS_ACTIVE() to be used broadly. Lucas De Marchi (3): drm/i915: rename I

[PATCH 3/3] Move IS_CONFIG_NONZERO() to kconfig.h

2021-09-29 Thread Lucas De Marchi
The check for config value doesn't really belong to i915_utils.h - we are trying to eliminate that utils helper and share them when possible with other drivers and subsystems. Rationale for having such macro is in commit babaab2f4738 ("drm/i915: Encapsulate kconfig constant values inside boolean

[PATCH 2/3] drm/i915/utils: do not depend on config being defined

2021-09-29 Thread Lucas De Marchi
Like the IS_ENABLED() counterpart, we can make IS_CONFIG_NONZERO() to return the right thing when the config is not defined rather than a build error, with the limitation that it can't be used on preprocessor context. The trick here is that macro names can't start with a number or dash, so we stri

Re: refactor the i915 GVT support

2021-09-29 Thread Wang, Zhi A
On 9/28/21 3:05 PM, Jason Gunthorpe wrote: > On Tue, Sep 28, 2021 at 02:35:06PM +, Wang, Zhi A wrote: > >> Yes. I was thinking of the possibility of putting off some work later so >> that we don't need to make a lot of changes. GVT-g needs to take a >> snapshot of GPU registers as the initial v

Re: [PATCH] [RFC] qcom_scm: hide Kconfig symbol

2021-09-29 Thread Arnd Bergmann
On Wed, Sep 29, 2021 at 4:46 PM Bjorn Andersson wrote: > > On Wed 29 Sep 05:04 CDT 2021, Arnd Bergmann wrote: > > > On Wed, Sep 29, 2021 at 11:51 AM Will Deacon wrote: > > > On Mon, Sep 27, 2021 at 05:22:13PM +0200, Arnd Bergmann wrote: > > > > > > > > diff --git a/drivers/iommu/Kconfig b/drivers

[PATCH v2 0/3] Rename IS_ACTIVE() and move to kconfig.h

2021-09-29 Thread Lucas De Marchi
As we try to reduce our i915-only helpers, let's try to improve IS_ACTIVE() logic and move to kconfig.h. I'm not 100% happy with the name, but it's the best I could come up with, hopefully a little better than trying to add IS_ACTIVE() to be used broadly. v2: now with Cc/To list fixed up - no cha

[PATCH v2 3/3] Move IS_CONFIG_NONZERO() to kconfig.h

2021-09-29 Thread Lucas De Marchi
The check for config value doesn't really belong to i915_utils.h - we are trying to eliminate that utils helper and share them when possible with other drivers and subsystems. Rationale for having such macro is in commit babaab2f4738 ("drm/i915: Encapsulate kconfig constant values inside boolean

[PATCH v2 1/3] drm/i915: rename IS_ACTIVE

2021-09-29 Thread Lucas De Marchi
It took me some time to understand the need for IS_ACTIVE and why we couldn't use kconfig.h. Rename it to something else that would be more suitable to include in kconfig.h and shared with other subsystems rather than maintaining it only in i915. Name here is pretty open for suggestions, but I thi

[PATCH v2 2/3] drm/i915/utils: do not depend on config being defined

2021-09-29 Thread Lucas De Marchi
Like the IS_ENABLED() counterpart, we can make IS_CONFIG_NONZERO() to return the right thing when the config is not defined rather than a build error, with the limitation that it can't be used on preprocessor context. The trick here is that macro names can't start with a number or dash, so we stri

Re: refactor the i915 GVT support

2021-09-29 Thread Jason Gunthorpe
On Wed, Sep 29, 2021 at 06:27:16PM +, Wang, Zhi A wrote: > On 9/28/21 3:05 PM, Jason Gunthorpe wrote: > > On Tue, Sep 28, 2021 at 02:35:06PM +, Wang, Zhi A wrote: > > > >> Yes. I was thinking of the possibility of putting off some work later so > >> that we don't need to make a lot of chang

[PATCH v3 3/6] drm/format-helper: Add drm_fb_xrgb8888_to_rgb888()

2021-09-29 Thread Noralf Trønnes
Add XRGB emulation support for devices that can only do RGB888. Cc: Thomas Zimmermann Reviewed-by: Daniel Vetter Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_format_helper.c | 38 + include/drm/drm_format_helper.h | 2 ++ 2 files changed, 40 insert

[PATCH v3 1/6] drm/fourcc: Add R8 to drm_format_info

2021-09-29 Thread Noralf Trønnes
Add an entry in drm_format_info for the existing format DRM_FORMAT_R8. Reviewed-by: Daniel Vetter Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fourcc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index eda832f9200d..78

[PATCH v3 0/6] drm/gud: Add some more pixel formats

2021-09-29 Thread Noralf Trønnes
Hi, I'd appreciate if someone could review the 3 small driver patches. Changes since version 2: - Drop the patch adding module parameter 'xrgb'. Both Daniel and Thomas had some comments that eventually led me to to drop this for now. Noralf. Noralf Trønnes (6): drm/fourcc: Add R8 to drm_

[PATCH v3 2/6] drm/format-helper: Add drm_fb_xrgb8888_to_rgb332()

2021-09-29 Thread Noralf Trønnes
Add XRGB emulation support for devices that can only do RGB332. v2: - Support Big Endian (Daniel) Cc: Thomas Zimmermann Reviewed-by: Daniel Vetter Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_format_helper.c | 50 + include/drm/drm_format_helper.h

[PATCH v3 6/6] drm/gud: Add GUD_PIXEL_FORMAT_RGB888

2021-09-29 Thread Noralf Trønnes
Add support for the RGB888 pixel format. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/gud/gud_drv.c | 2 ++ drivers/gpu/drm/gud/gud_internal.h | 4 drivers/gpu/drm/gud/gud_pipe.c | 2 ++ include/drm/gud.h | 1 + 4 files changed, 9 insertions(+) diff --git a/d

[PATCH v3 5/6] drm/gud: Add GUD_PIXEL_FORMAT_RGB332

2021-09-29 Thread Noralf Trønnes
Add support for the RGB332 pixel format. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/gud/gud_drv.c | 2 ++ drivers/gpu/drm/gud/gud_internal.h | 4 drivers/gpu/drm/gud/gud_pipe.c | 2 ++ include/drm/gud.h | 1 + 4 files changed, 9 insertions(+) diff --git a/d

[PATCH v3 4/6] drm/gud: Add GUD_PIXEL_FORMAT_R8

2021-09-29 Thread Noralf Trønnes
Add support for 8-bit greyscale format. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/gud/gud_drv.c | 2 ++ drivers/gpu/drm/gud/gud_internal.h | 4 drivers/gpu/drm/gud/gud_pipe.c | 2 ++ include/drm/gud.h | 4 ++-- 4 files changed, 10 insertions(+), 2 deletions

[PATCH 1/2] drm: Add Gamma and Degamma LUT sizes props to drm_crtc to validate.

2021-09-29 Thread Mark Yacoub
From: Mark Yacoub [Why] 1. drm_atomic_helper_check doesn't check for the LUT sizes of either Gamma or Degamma props in the new CRTC state, allowing any invalid size to be passed on. 2. Each driver has its own LUT size, which could also be different for legacy users. [How] 1. Create |degamma_lut_

[PATCH 2/2] amd/amdgpu_dm: Verify Gamma and Degamma LUT sizes using DRM Core check

2021-09-29 Thread Mark Yacoub
From: Mark Yacoub [Why] drm_atomic_helper_check_crtc now verifies both legacy and non-legacy LUT sizes. There is no need to check it within amdgpu_dm_atomic_check. [How] Remove the local call to verify LUT sizes and use DRM Core function instead. Tested on ChromeOS Zork. Signed-off-by: Mark Ya

Re: [Intel-gfx] [PATCH 25/27] drm/i915/guc: Handle errors in multi-lrc requests

2021-09-29 Thread John Harrison
On 8/20/2021 15:44, Matthew Brost wrote: If an error occurs in the front end when multi-lrc requests are getting generated we need to skip these in the backend but we still need to emit the breadcrumbs seqno. An issues arrises because with multi-lrc arrises -> arises breadcrumbs there is a han

Re: [Intel-gfx] [PATCH 25/27] drm/i915/guc: Handle errors in multi-lrc requests

2021-09-29 Thread Matthew Brost
On Wed, Sep 29, 2021 at 01:44:10PM -0700, John Harrison wrote: > On 8/20/2021 15:44, Matthew Brost wrote: > > If an error occurs in the front end when multi-lrc requests are getting > > generated we need to skip these in the backend but we still need to > > emit the breadcrumbs seqno. An issues arr

kmemleak report: 5.15.0-rc3: nouveau_fence_new

2021-09-29 Thread John Ogness
Hello, With 5.15.0-rc3 on my ppc64 (PowerMac G5) I am seeing kmemleak reports. They are always 96 bytes and with the same stacktrace. unreferenced object 0xc00011d2a7e0 (size 96): comm "X", pid 1743, jiffies 4295010075 (age 5457.040s) hex dump (first 32 bytes): c0 00 00 00 0b 9f f0 00

Re: [PATCH v2 2/3] drm/i915/utils: do not depend on config being defined

2021-09-29 Thread Andrzej Hajda
W dniu 29.09.2021 o 20:33, Lucas De Marchi pisze: > Like the IS_ENABLED() counterpart, we can make IS_CONFIG_NONZERO() to > return the right thing when the config is not defined rather than a > build error, with the limitation that it can't be used on preprocessor > context. > > The trick here is

  1   2   >