Re: [RFC PATCH v2 1/1] Providers/rxe: Add dma-buf support

2021-09-29 Thread Shunsuke Mie
2021年9月30日(木) 15:37 Zhu Yanjun : > > On Thu, Sep 30, 2021 at 2:20 PM Shunsuke Mie wrote: > > > > Implement a new provider method for dma-buf base memory registration. > > > > Signed-off-by: Shunsuke Mie > > --- > > providers/rxe/rxe.c | 21 + > > 1 file changed, 21 insertions

[PATCH v2] drm/i915/ttm: Rework object initialization slightly

2021-09-29 Thread Thomas Hellström
We may end up in i915_ttm_bo_destroy() in an error path before the object is fully initialized. In that case it's not correct to call __i915_gem_free_object(), because that function a) Assumes the gem object refcount is 0, which it isn't. b) frees the placements which are owned by the caller until

[RFC PATCH v2 1/1] Providers/rxe: Add dma-buf support

2021-09-29 Thread Shunsuke Mie
Implement a new provider method for dma-buf base memory registration. Signed-off-by: Shunsuke Mie --- providers/rxe/rxe.c | 21 + 1 file changed, 21 insertions(+) diff --git a/providers/rxe/rxe.c b/providers/rxe/rxe.c index 3c3ea8bb..84e00e60 100644 --- a/providers/rxe/rxe.c

[RFC PATCH v2 0/1] Providers/rxe: Add dma-buf support

2021-09-29 Thread Shunsuke Mie
This is an user space counter-part of the kernel patch set to add dma-buf support to the RXE driver. Pull request at GitHub: https://github.com/linux-rdma/rdma-core/pull/1055 This is the secound version of the patch. Change log: v2: * Fix code formats that were indicated by Azure CI v1: https://w

Re: [PATCH net-next 3/5] net: bcmasp: Add support for ASP2.0 Ethernet controller

2021-09-29 Thread Justin Chen
On Sun, Sep 26, 2021 at 6:58 AM Andrew Lunn wrote: > > > > > +static int bcmasp_set_priv_flags(struct net_device *dev, u32 flags) > > > > +{ > > > > + struct bcmasp_intf *intf = netdev_priv(dev); > > > > + > > > > + intf->wol_keep_rx_en = flags & BCMASP_WOL_KEEP_RX_EN ? 1 : 0; > > > > + > > > > +

Re: [PATCH v2 2/3] dt-bindings: drm/bridge: ps8640: Add aux-bus child

2021-09-29 Thread Stephen Boyd
Quoting Philip Chen (2021-09-29 17:34:57) > dp-aux-bus.yaml says we can list an eDP panel as a child of > an eDP controller node to represent the fact that the panel > is connected to the controller's DP AUX bus. > > Let's add it to the ps8640 bindings. > > Signed-off-by: Philip Chen > --- Review

Re: [PATCH 2/4] amdgpu_ucode: reduce number of pr_debug calls

2021-09-29 Thread jim . cromie
On Wed, Sep 29, 2021 at 8:08 PM Joe Perches wrote: > > On Wed, 2021-09-29 at 19:44 -0600, Jim Cromie wrote: > > There are blocks of DRM_DEBUG calls, consolidate their args into > > single calls. With dynamic-debug in use, each callsite consumes 56 > > bytes of callsite data, and this patch remove

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

2021-09-29 Thread Yong Wu
Hi Dafna, Thanks very much for the review. On Wed, 2021-09-29 at 14:13 +0200, Dafna Hirschfeld wrote: > > 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

[PATCH v6 2/3] drm/bridge: ti-sn65dsi86: Use regmap_bulk_write API

2021-09-29 Thread Bjorn Andersson
The multi-register u16 write operation can use regmap_bulk_write() instead of two separate regmap_write() calls. It's uncertain if this has any effect on the actual updates of the underlying registers, but this at least gives the hardware the opportunity and saves us one transation on the bus. Si

[PATCH v6 3/3] drm/bridge: ti-sn65dsi86: Implement the pwm_chip

2021-09-29 Thread Bjorn Andersson
The SN65DSI86 provides the ability to supply a PWM signal on GPIO 4, with the primary purpose of controlling the backlight of the attached panel. Add an implementation that exposes this using the standard PWM framework, to allow e.g. pwm-backlight to expose this to the user. Signed-off-by: Bjorn A

[PATCH v6 1/3] pwm: Introduce single-PWM of_xlate function

2021-09-29 Thread Bjorn Andersson
The existing pxa driver and the upcoming addition of PWM support in the TI sn565dsi86 DSI/eDP bridge driver both has a single PWM channel and thereby a need for a of_xlate function with the period as its single argument. Introduce a common helper function in the core that can be used as of_xlate b

[v2 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

[v2 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

[v2 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 Reviewed-by: Chun-Kuang

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

2021-09-29 Thread jason-jh . lin
Change in v2: - cmdq_ddp_cb should use struct mbox_clinet to find struct cmdq_client, and then use struct cmdq_clint to find struct mtk_drm_crtc - change data.sta checking condition to stadard error checking jason-jh.lin (3): drm/mediatek: Fix crash at using pkt->cl->chan in cmdq_pkt_finalize

Re: [PATCH v4 00/24] drm/bridge: Make panel and bridge probe order consistent

2021-09-29 Thread John Stultz
On Wed, Sep 29, 2021 at 4:20 PM Rob Clark wrote: > On Wed, Sep 29, 2021 at 2:51 PM John Stultz wrote: > > On Wed, Sep 29, 2021 at 2:32 PM John Stultz wrote: > > > On Wed, Sep 29, 2021 at 2:27 PM John Stultz > > > wrote: > > > > On Fri, Sep 10, 2021 at 3:12 AM Maxime Ripard wrote: > > > > > Th

[pull] amdgpu drm-fixes-5.15

2021-09-29 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.15. The following changes since commit 05812b971c6d605c00987750f422918589aa4486: Merge tag 'drm/tegra/for-5.15-rc3' of ssh://git.freedesktop.org/git/tegra/linux into drm-fixes (2021-09-28 17:08:44 +1000) are available in the Git repository at: https://gitlab.

Re: [Freedreno] [PATCH v2 00/22] drm/msm/dpu: switch dpu_plane to be virtual

2021-09-29 Thread abhinavk
Hi Dmitry On 2021-07-04 18:20, Dmitry Baryshkov wrote: As discussed on IRC, change dpu_plane implementation to be virtual: register unified planes and select backing SSPP block at runtime. Use msm.dpu_use_virtual_planes=1 to enable usage of virtual planes rather than statically allocated SSPPs

Re: [PATCH 2/4] amdgpu_ucode: reduce number of pr_debug calls

2021-09-29 Thread Joe Perches
On Wed, 2021-09-29 at 19:44 -0600, Jim Cromie wrote: > There are blocks of DRM_DEBUG calls, consolidate their args into > single calls. With dynamic-debug in use, each callsite consumes 56 > bytes of callsite data, and this patch removes about 65 calls, so > it saves ~3.5kb. > > no functional cha

[PATCH 4/4] i915/gvt: remove spaces in pr_debug "gvt: core:" etc prefixes

2021-09-29 Thread Jim Cromie
Taking embedded spaces out of existing prefixes makes them better class-prefixes; simplifying the extra quoting needed otherwise: $> echo format "^gvt: core:" +p >control vs $> echo format ^gvt:core: +p >control Dropping the internal spaces means that quotes are only needed when the trailing

[PATCH 3/4] nouveau: fold multiple DRM_DEBUG_DRIVERs together

2021-09-29 Thread Jim Cromie
With DRM_USE_DYNAMIC_DEBUG, each callsite record requires 56 bytes. We can combine 12 into one here and save ~620 bytes. Signed-off-by: Jim Cromie --- drivers/gpu/drm/nouveau/nouveau_drm.c | 36 +-- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/g

[PATCH 2/4] amdgpu_ucode: reduce number of pr_debug calls

2021-09-29 Thread Jim Cromie
There are blocks of DRM_DEBUG calls, consolidate their args into single calls. With dynamic-debug in use, each callsite consumes 56 bytes of callsite data, and this patch removes about 65 calls, so it saves ~3.5kb. no functional changes. RFC: this creates multi-line log messages, does that break

[PATCH 1/4] drm: fix doc grammar error

2021-09-29 Thread Jim Cromie
no code changes, good for rc Signed-off-by: Jim Cromie --- include/drm/drm_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h index 0cd95953cdf5..4b29261c4537 100644 --- a/include/drm/drm_drv.h +++ b/include/drm/drm_drv.h @@ -4

[PATCH 0/4] drm: maintenance patches for 5.15-rcX

2021-09-29 Thread Jim Cromie
hi drm folks, Heres a small set of assorted patches which are IMO suitable for rcX; one doc fix, 2 patches folding multiple DBGs together, and a format string modification. Jim Cromie (4): drm: fix doc grammar error amdgpu_ucode: reduce number of pr_debug calls nouveau: fold multiple DRM_DE

Re: [PATCH v13 16/35] usb: chipidea: tegra: Add runtime PM and OPP support

2021-09-29 Thread Dmitry Osipenko
27.09.2021 01:40, Dmitry Osipenko пишет: > The Tegra USB controller belongs to the core power domain and we're going > to enable GENPD support for the core domain. Now USB controller must be > resumed using runtime PM API in order to initialize the USB power state. > We already support runtime PM f

[PATCH v2 2/3] dt-bindings: drm/bridge: ps8640: Add aux-bus child

2021-09-29 Thread Philip Chen
dp-aux-bus.yaml says we can list an eDP panel as a child of an eDP controller node to represent the fact that the panel is connected to the controller's DP AUX bus. Let's add it to the ps8640 bindings. Signed-off-by: Philip Chen --- (no changes since v1) .../bindings/display/bridge/ps8640.yam

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

2021-09-29 Thread Stephen Boyd
Quoting Kuogee Hsieh (2021-09-29 09:17:04) > 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 w

Re: [PATCH v4 00/24] drm/bridge: Make panel and bridge probe order consistent

2021-09-29 Thread John Stultz
On Wed, Sep 29, 2021 at 2:51 PM John Stultz wrote: > > On Wed, Sep 29, 2021 at 2:32 PM John Stultz wrote: > > On Wed, Sep 29, 2021 at 2:27 PM John Stultz wrote: > > > On Fri, Sep 10, 2021 at 3:12 AM Maxime Ripard wrote: > > > > The best practice to avoid those issues is to register its function

Re: [PATCH v4 00/24] drm/bridge: Make panel and bridge probe order consistent

2021-09-29 Thread John Stultz
On Wed, Sep 29, 2021 at 4:20 PM Rob Clark wrote: > On Wed, Sep 29, 2021 at 2:51 PM John Stultz wrote: > > On Wed, Sep 29, 2021 at 2:32 PM John Stultz wrote: > > > On Wed, Sep 29, 2021 at 2:27 PM John Stultz > > > wrote: > > > > On Fri, Sep 10, 2021 at 3:12 AM Maxime Ripard wrote: > > > > > Th

Re: [PATCH v4 00/24] drm/bridge: Make panel and bridge probe order consistent

2021-09-29 Thread Rob Clark
On Wed, Sep 29, 2021 at 2:51 PM John Stultz wrote: > > On Wed, Sep 29, 2021 at 2:32 PM John Stultz wrote: > > On Wed, Sep 29, 2021 at 2:27 PM John Stultz wrote: > > > On Fri, Sep 10, 2021 at 3:12 AM Maxime Ripard wrote: > > > > The best practice to avoid those issues is to register its function

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

2021-09-29 Thread Lucas De Marchi
On Wed, Sep 29, 2021 at 11:08:18PM +0200, Andrzej Hajda wrote: 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

[PATCH v1 2/2] drm/tegra: dc: rgb: Allow changing PLLD rate on Tegra30+

2021-09-29 Thread Dmitry Osipenko
Asus Transformer TF700T is a Tegra30 tablet device which uses RGB->DSI bridge that requires a precise clock rate in order to operate properly. Tegra30 has a dedicated PLL for each display controller, hence the PLL rate can be changed freely. Allow PLL rate changes on Tegra30+ for RGB output. Config

[PATCH v1 1/2] drm/tegra: dc: rgb: Move PCLK shifter programming to CRTC

2021-09-29 Thread Dmitry Osipenko
Asus TF700T tablet uses TC358768 DPI->DSI bridge that sits between Tegra's DPI output and display panel input. Bridge requires to have stable PCLK output before RGB encoder is enabled because it uses PCLK by itself to clock internal logic and bridge is programmed before Tegra's encoder is enabled.

[PATCH v1 0/2] NVIDIA Tegra display driver improvements

2021-09-29 Thread Dmitry Osipenko
Asus Transformer TF700T tablet requires couple minor changes to the display driver in order to light up display panel, here they are. Dmitry Osipenko (2): drm/tegra: dc: rgb: Move PCLK shifter programming to CRTC drm/tegra: dc: rgb: Allow changing PLLD rate on Tegra30+ drivers/gpu/drm/tegra/

Re: [PATCH v4 00/24] drm/bridge: Make panel and bridge probe order consistent

2021-09-29 Thread Laurent Pinchart
Hi Maxime, (CC'ing Kieran) On Fri, Sep 10, 2021 at 12:11:54PM +0200, Maxime Ripard wrote: > Hi, > > We've encountered an issue with the RaspberryPi DSI panel that prevented the > whole display driver from probing. > > The issue is described in detail in the commit 7213246a803f ("drm/vc4: dsi: >

Re: [PATCH v4 00/24] drm/bridge: Make panel and bridge probe order consistent

2021-09-29 Thread John Stultz
On Wed, Sep 29, 2021 at 2:32 PM John Stultz wrote: > On Wed, Sep 29, 2021 at 2:27 PM John Stultz wrote: > > On Fri, Sep 10, 2021 at 3:12 AM Maxime Ripard wrote: > > > The best practice to avoid those issues is to register its functions only > > > after > > > all its dependencies are live. We al

[PATCH] drm/brdige: analogix_dp: Grab runtime PM reference for DP-AUX

2021-09-29 Thread Brian Norris
If the display is not enable()d, then we aren't holding a runtime PM reference here. Thus, it's easy to accidentally cause a hang, if user space is poking around at /dev/drm_dp_aux0 at the "wrong" time. Let's get the panel and PM state right before trying to talk AUX. Fixes: 0d97ad03f422 ("drm/br

Re: [PATCH v4 00/24] drm/bridge: Make panel and bridge probe order consistent

2021-09-29 Thread John Stultz
On Wed, Sep 29, 2021 at 2:27 PM John Stultz wrote: > > On Fri, Sep 10, 2021 at 3:12 AM Maxime Ripard wrote: > > > > We've encountered an issue with the RaspberryPi DSI panel that prevented the > > whole display driver from probing. > > > > The issue is described in detail in the commit 7213246a80

Re: [PATCH v4 00/24] drm/bridge: Make panel and bridge probe order consistent

2021-09-29 Thread John Stultz
On Fri, Sep 10, 2021 at 3:12 AM Maxime Ripard wrote: > > We've encountered an issue with the RaspberryPi DSI panel that prevented the > whole display driver from probing. > > The issue is described in detail in the commit 7213246a803f ("drm/vc4: dsi: > Only register our component once a DSI device

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

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: [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

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

[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

[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 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 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 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 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 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 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 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

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 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

[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 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 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

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

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

[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

[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 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 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

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

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 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 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

[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 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: 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_

[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

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

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 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 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 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 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: [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 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: [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 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_

[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] [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 > > > --

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 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 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 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 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: [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

[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

[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 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

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)) { +

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 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 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

[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 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

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 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/

  1   2   >