linux-next: manual merge of the vfio tree with the drm tree

2021-04-15 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the vfio tree got a conflict in: drivers/gpu/drm/i915/gvt/gvt.c between commit: 9ff06c385300 ("drm/i915/gvt: Remove references to struct drm_device.pdev") from the drm tree and commit: 383987fd15ba ("vfio/gvt: Use mdev_get_type_group_id()") from the

Re: [PATCH 17/18] drm/vc4: hdmi: Move the pixel rate calculation to a helper

2021-04-15 Thread Thomas Zimmermann
Am 17.03.21 um 16:43 schrieb Maxime Ripard: In order to implement a fallback mechanism to YUV422 when the pixel rate is too high, let's move the pixel rate computation to a function of its own that will be shared across two functions. Signed-off-by: Maxime Ripard Acked-by: Thomas

Re: [PATCH 18/18] drm/vc4: hdmi: Force YUV422 if the rate is too high

2021-04-15 Thread Thomas Zimmermann
Am 17.03.21 um 16:43 schrieb Maxime Ripard: When using the modes that need the highest pixel rate we support (such as 4k at 60Hz), using a 10 or 12 bpc output will put us over the limit of what we can achieve. In such a case, let's force our output to be YUV422 so that we can go back down

Re: [PATCH v2 08/10] drm/simpledrm: Acquire clocks from DT device node

2021-04-15 Thread Thomas Zimmermann
Hi Am 08.04.21 um 10:13 schrieb Maxime Ripard: Hi, On Thu, Mar 18, 2021 at 11:29:19AM +0100, Thomas Zimmermann wrote: Make sure required hardware clocks are enabled while the firmware framebuffer is in use. The basic code has been taken from the simplefb driver and adapted to DRM. Clocks are

Re: [PATCH v4 6/6] drm/sprd: add Unisoc's drm mipi dsi driver

2021-04-15 Thread Kevin Tang
Maxime Ripard 于2021年4月7日周三 下午6:48写道: > > On Wed, Mar 31, 2021 at 09:47:12AM +0800, Kevin Tang wrote: > > > > diff --git a/drivers/gpu/drm/sprd/Makefile > > > b/drivers/gpu/drm/sprd/Makefile > > > > index 6c25bfa99..d49f4977b 100644 > > > > --- a/drivers/gpu/drm/sprd/Makefile > > > > +++

Re: [PATCH 16/18] drm/vc4: hdmi: Support HDMI YUV output

2021-04-15 Thread Thomas Zimmermann
Am 17.03.21 um 16:43 schrieb Maxime Ripard: The HDMI controllers in the BCM2711 support YUV444 and YUV420 outputs, let's add support for it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 73 +++-- drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 6

Re: [PATCH v2 04/10] drm/aperture: Add infrastructure for aperture ownership

2021-04-15 Thread Thomas Zimmermann
Hi Am 09.04.21 um 11:22 schrieb Daniel Vetter: Is it that easy? simepldrm's detach function has code to synchronize with concurrent hotplug removals. If we can use drm_dev_unplug() for everything, I'm all for it. Uh, I should have looked at the code instead of just asking silly questions :-)

Re: [PATCH v4 4/6] drm/sprd: add Unisoc's drm display controller driver

2021-04-15 Thread Kevin Tang
Maxime Ripard 于2021年3月24日周三 下午7:10写道: > > Hi, > > On Mon, Feb 22, 2021 at 09:28:20PM +0800, Kevin Tang wrote: > > Adds DPU(Display Processor Unit) support for the Unisoc's display subsystem. > > It's support multi planes, scaler, rotation, PQ(Picture Quality) and more. > > > > Cc: Orson Zhai > >

Re: [PATCH 9/9] drm/amdgpu: Lock the attached dmabuf in unpopulate

2021-04-15 Thread Christian König
Am 14.04.21 um 17:15 schrieb Felix Kuehling: Am 2021-04-14 um 3:33 a.m. schrieb Christian König: Am 14.04.21 um 08:46 schrieb Felix Kuehling: amdgpu_ttm_tt_unpopulate can be called during bo_destroy. The dmabuf->resv must not be held by the caller or dma_buf_detach will deadlock. This is

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-15 Thread Tvrtko Ursulin
On 14/04/2021 17:20, Matthew Auld wrote: On Wed, 14 Apr 2021 at 16:22, Tvrtko Ursulin wrote: On 12/04/2021 10:05, Matthew Auld wrote: From: Venkata Sandeep Dhanalakota Determine the possible coherent map type based on object location, and if target has llc or if user requires an always

Re: [PATCH 2/2] drm/ingenic: Don't request full modeset if property is not modified

2021-04-15 Thread Maxime Ripard
Hi, On Mon, Mar 29, 2021 at 06:50:46PM +0100, Paul Cercueil wrote: > Avoid requesting a full modeset if the sharpness property is not > modified, because then we don't actually need it. > > Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU") > Cc: # 5.8+ > Signed-off-by: Paul Cercueil

[PATCH 4/4] drm: Remove DRM_KMS_FB_HELPER Kconfig option

2021-04-15 Thread Thomas Zimmermann
It's only used by DRM_FBDEV_EMULATION, so inline it there. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/Kconfig | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index

[PATCH 2/4] drm/mxsfb: Don't select DRM_KMS_FB_HELPER

2021-04-15 Thread Thomas Zimmermann
Selecting DRM_FBDEV_EMULATION will include the correct secttings for fbdev emulation. Drivers should not override this. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mxsfb/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/mxsfb/Kconfig

[PATCH 3/4] drm/zte: Don't select DRM_KMS_FB_HELPER

2021-04-15 Thread Thomas Zimmermann
Selecting DRM_FBDEV_EMULATION will include the correct secttings for fbdev emulation. Drivers should not override this. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/zte/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/zte/Kconfig b/drivers/gpu/drm/zte/Kconfig

[PATCH 0/4] drm: Fix config dependencies for fbdev emulation

2021-04-15 Thread Thomas Zimmermann
While working on the recent aperture helpers, I found it hard to disable fbdev because drivers keep on selecting it automatically. Cleanup the config dependencies. Fbdev support should be configured by users. DRM drivers should check for DRM_FBDEV_EMULATION to enable fbdev support. Thomas

[PATCH 1/4] drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION

2021-04-15 Thread Thomas Zimmermann
Respect DRM's kconfig setting for fbdev console emulation. If enabled, it will select all required config options. So remove them from vmwgfx's Kconfig file. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vmwgfx/Kconfig | 7 +-- drivers/gpu/drm/vmwgfx/Makefile | 4 +++-

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-15 Thread Tvrtko Ursulin
On 15/04/2021 10:23, Matthew Auld wrote: On Thu, 15 Apr 2021 at 09:21, Tvrtko Ursulin wrote: On 14/04/2021 17:20, Matthew Auld wrote: On Wed, 14 Apr 2021 at 16:22, Tvrtko Ursulin wrote: On 12/04/2021 10:05, Matthew Auld wrote: From: Venkata Sandeep Dhanalakota Determine the

Re: [PATCH v4 4/6] drm/sprd: add Unisoc's drm display controller driver

2021-04-15 Thread Maxime Ripard
Hi, On Fri, Apr 09, 2021 at 09:35:07PM +0800, Kevin Tang wrote: > > > > > + } > > > > > + > > > > > + return MODE_OK; > > > > > +} > > > > > + > > > > > +static void sprd_crtc_atomic_enable(struct drm_crtc *crtc, > > > > > +struct drm_atomic_state *state) >

Re: [PATCH v2 08/10] drm/simpledrm: Acquire clocks from DT device node

2021-04-15 Thread Maxime Ripard
Hi, On Thu, Apr 15, 2021 at 09:31:01AM +0200, Thomas Zimmermann wrote: > Am 08.04.21 um 10:13 schrieb Maxime Ripard: > > Hi, > > > > On Thu, Mar 18, 2021 at 11:29:19AM +0100, Thomas Zimmermann wrote: > > > Make sure required hardware clocks are enabled while the firmware > > > framebuffer is in

Re: [PATCH v2 2/7] drm/amdgpu: Implement mmap as GEM object function

2021-04-15 Thread Christian König
Am 15.04.21 um 14:11 schrieb Thomas Zimmermann: Hi Am 15.04.21 um 13:38 schrieb Christian König: Am 15.04.21 um 12:17 schrieb Thomas Zimmermann: Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. This change resolves

[PATCH 1/3] drm/amdgpu: make sure we unpin the UVD BO

2021-04-15 Thread Christian König
Releasing pinned BOs is illegal now. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c index 7cd67cb2ac5f..1a2bf2ca1be5 100644 ---

[PATCH 2/3] drm/amdgpu: freeing pinned objects is illegal now

2021-04-15 Thread Christian König
We want to drop support in TTM for this. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 36 ++ 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[PATCH 3/3] drm/ttm: warn stricter about freeing pinned BOs

2021-04-15 Thread Christian König
So far we only warned when the BOs where pinned and not idle. Also warn if we see a pinned BO in general. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c

[PATCH] drm/rockchip: remove unused function

2021-04-15 Thread Jiapeng Chong
Fix the following clang warning: drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:320:20: warning: unused function 'dsi_set' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 5 - 1 file changed, 5 deletions(-)

[PATCH v3 0/9] drm: Support simple-framebuffer devices and firmware fbs

2021-04-15 Thread Thomas Zimmermann
This patchset adds support for simple-framebuffer platform devices and a handover mechanism for native drivers to take-over control of the hardware. The new driver, called simpledrm, binds to a simple-frambuffer platform device. The kernel's boot code creates such devices for firmware-provided

Re: [PATCH] drm/virtio: Create Dumb BOs as guest Blobs (v3)

2021-04-15 Thread Gerd Hoffmann
On Wed, Apr 14, 2021 at 04:31:45PM -0700, Gurchetan Singh wrote: > On Mon, Apr 12, 2021 at 10:36 PM Vivek Kasireddy > wrote: > > > If support for Blob resources is available, then dumb BOs created > > by the driver can be considered as guest Blobs. > > > > v2: Don't skip transfer and flush

Re: [PATCH 05/12] drm/imx: Don't set allow_fb_modifiers explicitly

2021-04-15 Thread Daniel Vetter
On Tue, Apr 13, 2021 at 01:47:28PM +0200, Lucas Stach wrote: > Am Dienstag, dem 13.04.2021 um 11:48 +0200 schrieb Daniel Vetter: > > Since > > > > commit 890880ddfdbe256083170866e49c87618b706ac7 > > Author: Paul Kocialkowski > > Date: Fri Jan 4 09:56:10 2019 +0100 > > > > drm: Auto-set

[PATCH 1/3] drm/panel: Add connector_type and bus_format for AUO G104SN02 V2 panel

2021-04-15 Thread Stefan Riedmueller
The AUO G104SN02 V2 is an LVDS display which supports 6 and 8 bpc PSWG. Add the corresponding connector type and 8 bpc as default bus_format. Signed-off-by: Stefan Riedmueller --- drivers/gpu/drm/panel/panel-simple.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH] drm/msm/dsi: fix msm_dsi_phy_get_clk_provider return code

2021-04-15 Thread Dmitry Baryshkov
Hi On 12/04/2021 03:01, Dmitry Baryshkov wrote: msm_dsi_phy_get_clk_provider() always returns two provided clocks, so return 0 instead of returning incorrect -EINVAL error code. Fixes: 5d13459650b3 ("drm/msm/dsi: push provided clocks handling into a generic code") Signed-off-by: Dmitry

Re: [PATCH] drm/bridge: Centralize error message when bridge attach fails

2021-04-15 Thread Jyri Sarha
On 2021-04-15 4:47, Laurent Pinchart wrote: Being informed of a failure to attach a bridge is useful, and many drivers prints an error message in that case. Move the message to drm_bridge_attach() to avoid code duplication. Suggested-by: Stephen Boyd Signed-off-by: Laurent Pinchart

Re: [PATCH v3 2/3] drm: bridge: add it66121 driver

2021-04-15 Thread Neil Armstrong
On 14/04/2021 19:35, Paul Cercueil wrote: > Hi Neil, > > Le mer. 14 avril 2021 à 8:17, Neil Armstrong a > écrit : >> Hi, >> >> Le 13/04/2021 à 22:56, Paul Cercueil a écrit : >>>  Hi Neil, >>> >>>  I get build failures locally: >>> >>>  drivers/gpu/drm/bridge/ite-it66121.c: In function

[PATCH v3 5/9] drm/simpledrm: Add fbdev emulation

2021-04-15 Thread Thomas Zimmermann
This displays a console on simpledrm's framebuffer. The default framebuffer format is being used. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Tested-by: nerdopolis --- drivers/gpu/drm/tiny/simpledrm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v3 1/9] drm/format-helper: Pass destination pitch to drm_fb_memcpy_dstclip()

2021-04-15 Thread Thomas Zimmermann
The memcpy's destination buffer might have a different pitch than the source. Support different pitches as function argument. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Tested-by: nerdopolis --- drivers/gpu/drm/drm_format_helper.c| 9 +

[PATCH v3 4/9] drm: Add simpledrm driver

2021-04-15 Thread Thomas Zimmermann
The simpledrm driver is a DRM driver for simplefb framebuffers as provided by the kernel's boot code. This driver enables basic graphical output on many different graphics devices that are provided by the platform (e.g., EFI, VESA, embedded framebuffers). With the kernel's simplefb

[PATCH v3 2/9] drm/format-helper: Add blitter functions

2021-04-15 Thread Thomas Zimmermann
The blitter functions copy a framebuffer to I/O memory using one of the existing conversion functions. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Tested-by: nerdopolis --- drivers/gpu/drm/drm_format_helper.c | 87 + include/drm/drm_format_helper.h

[PATCH v3 7/9] drm/simpledrm: Acquire clocks from DT device node

2021-04-15 Thread Thomas Zimmermann
Make sure required hardware clocks are enabled while the firmware framebuffer is in use. The basic code has been taken from the simplefb driver and adapted to DRM. Clocks are released automatically via devres helpers. Signed-off-by: Thomas Zimmermann Tested-by: nerdopolis ---

[PATCH v3 9/9] drm/simpledrm: Acquire memory aperture for framebuffer

2021-04-15 Thread Thomas Zimmermann
We register the simplekms device with the DRM platform helpers. A native driver for the graphics hardware will kick-out the simpledrm driver before taking over the device. The original generic platform device from the simple-framebuffer boot code will be unregistered. The native driver will use

[PATCH v3 6/9] drm/simpledrm: Initialize framebuffer data from device-tree node

2021-04-15 Thread Thomas Zimmermann
A firmware framebuffer might also be specified via device-tree files. If no device platform data is given, try the DT device node. v2: * add Device Tree match table * clean-up parser wrappers Signed-off-by: Thomas Zimmermann Tested-by: nerdopolis ---

[PATCH v3 8/9] drm/simpledrm: Acquire regulators from DT device node

2021-04-15 Thread Thomas Zimmermann
Make sure required hardware regulators are enabled while the firmware framebuffer is in use. The basic code has been taken from the simplefb driver and adapted to DRM. Regulators are released automatically via devres helpers. v2: * use strscpy() Signed-off-by: Thomas Zimmermann

[PATCH v3 3/9] drm/aperture: Add infrastructure for aperture ownership

2021-04-15 Thread Thomas Zimmermann
Platform devices might operate on firmware framebuffers, such as VESA or EFI. Before a native driver for the graphics hardware can take over the device, it has to remove any platform driver that operates on the firmware framebuffer. Aperture helpers provide the infrastructure for platform drivers

Re: [PATCH v2 2/7] drm/amdgpu: Implement mmap as GEM object function

2021-04-15 Thread Christian König
Am 15.04.21 um 12:17 schrieb Thomas Zimmermann: Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. This change resolves several inconsistencies between regular mmap and prime-based mmap. The vm_ops field in vma is now set for

[PATCH] drm/vc4: remove unused function

2021-04-15 Thread Jiapeng Chong
Fix the following clang warning: drivers/gpu/drm/vc4/vc4_vec.c:201:1: warning: unused function 'to_vc4_vec_connector' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/vc4/vc4_vec.c | 6 -- 1 file changed, 6 deletions(-) diff --git

Re: [PATCH v4 4/6] drm/sprd: add Unisoc's drm display controller driver

2021-04-15 Thread Maxime Ripard
Hi, On Thu, Apr 15, 2021 at 08:18:52AM +0800, Kevin Tang wrote: > Maxime Ripard 于2021年3月24日周三 下午7:10写道: > > > +static struct sprd_dpu *sprd_crtc_init(struct drm_device *drm, > > > + struct drm_plane *primary) > > > +{ > > > + struct device_node *port; > > > + struct

[PATCH v2 0/7] drm: Clean up mmap for TTM-based GEM drivers

2021-04-15 Thread Thomas Zimmermann
Implement mmap via struct drm_gem_object_functions.mmap in amdgpu, radeon and nouveau. This allows for using common DRM helpers for the mmap-related callbacks in struct file_operations and struct drm_driver. The drivers have their own vm_ops, which are now set automatically by the DRM core

Re: [PATCH v2 2/7] drm/amdgpu: Implement mmap as GEM object function

2021-04-15 Thread Thomas Zimmermann
Hi Am 15.04.21 um 13:38 schrieb Christian König: Am 15.04.21 um 12:17 schrieb Thomas Zimmermann: Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. This change resolves several inconsistencies between regular mmap and

Re: [PATCH] drm/i915/gvt: Fix error code in intel_gvt_init_device()

2021-04-15 Thread Zhenyu Wang
On 2021.04.14 09:01:38 +0300, Dan Carpenter wrote: > The intel_gvt_init_vgpu_type_groups() function is only called from > intel_gvt_init_device(). If it fails then the intel_gvt_init_device() > prints the error code and propagates it back again. That's a bug > because false is zero/success. The

Re: [PATCH v2 08/10] drm/simpledrm: Acquire clocks from DT device node

2021-04-15 Thread maxime
On Thu, Apr 15, 2021 at 01:02:44PM +0200, Thomas Zimmermann wrote: > Hi > > Am 15.04.21 um 11:21 schrieb Maxime Ripard: > > Hi, > > > > On Thu, Apr 15, 2021 at 09:31:01AM +0200, Thomas Zimmermann wrote: > > > Am 08.04.21 um 10:13 schrieb Maxime Ripard: > > > > Hi, > > > > > > > > On Thu, Mar

Re: [PATCH 1/7] drm/nouveau: use bo->base.size instead of mem->num_pages

2021-04-15 Thread Christian König
Am 13.04.21 um 17:54 schrieb Matthew Auld: On Tue, 13 Apr 2021 at 14:52, Christian König wrote: Change a couple of cases where it makes more sense to use the base size instead of the number of pages in the resource. Signed-off-by: Christian König --- drivers/gpu/drm/nouveau/nouveau_bo.c

[PATCH] drm/kmb: remove unused function

2021-04-15 Thread Jiapeng Chong
Fix the following clang warning: drivers/gpu/drm/kmb/kmb_dsi.c:824:2: warning: unused function 'set_test_mode_src_osc_freq_target_hi_bits' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/kmb/kmb_dsi.c | 16 1 file changed, 16

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-15 Thread Matthew Auld
On Thu, 15 Apr 2021 at 09:21, Tvrtko Ursulin wrote: > > > On 14/04/2021 17:20, Matthew Auld wrote: > > On Wed, 14 Apr 2021 at 16:22, Tvrtko Ursulin > > wrote: > >> > >> > >> On 12/04/2021 10:05, Matthew Auld wrote: > >>> From: Venkata Sandeep Dhanalakota > >>> > >>> Determine the possible

[PATCH] drm/radeon/si: Fix inconsistent indenting

2021-04-15 Thread Yang Li
Kernel test robot throws below warning -> smatch warnings: drivers/gpu/drm/radeon/si.c:4514 si_vm_packet3_cp_dma_check() warn: inconsistent indenting Fixed the inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/gpu/drm/radeon/si.c | 2 +- 1 file changed, 1

[PATCH v2 1/7] drm/ttm: Don't override vm_ops callbacks, if set

2021-04-15 Thread Thomas Zimmermann
Drivers may want to set their own callbacks for a VM area. Only set TTM's callbacks if the vm_ops field is clear. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c

[PATCH v2 6/7] drm/vmwgfx: Inline vmw_verify_access()

2021-04-15 Thread Thomas Zimmermann
Vmwgfx is the only user of the TTM's verify_access callback. Inline the call and avoid the indirection through the function pointer. Signed-off-by: Thomas Zimmermann Reviewed-by: Zack Rusin --- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 9 - drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c

[PATCH v2 3/7] drm/radeon: Implement mmap as GEM object function

2021-04-15 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. This change also allows to support prime-based mmap via DRM's helper drm_gem_prime_mmap(). Permission checks are implemented by drm_gem_mmap(), with an additional check for

[PATCH v2 4/7] drm/nouveau: Implement mmap as GEM object function

2021-04-15 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The GEM object function is provided by GEM TTM helpers. Nouveau's implementation of verify_access is unused and has been removed. Access permissions are validated by the DRM

[PATCH v2 2/7] drm/amdgpu: Implement mmap as GEM object function

2021-04-15 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. This change resolves several inconsistencies between regular mmap and prime-based mmap. The vm_ops field in vma is now set for all mmap'ed areas. Previously it way only set for

[PATCH v2 5/7] drm/vmwgfx: Inline ttm_bo_mmap() into vmwgfx driver

2021-04-15 Thread Thomas Zimmermann
The vmwgfx driver is the only remaining user of ttm_bo_mmap(). Inline the code. The internal helper ttm_bo_vm_lookup() is now also part of vmwgfx as vmw_bo_vm_lookup(). v2: * replace pr_err() with drm_err() (Zack) Signed-off-by: Thomas Zimmermann Reviewed-by: Zack Rusin ---

[PATCH v2 7/7] drm/ttm: Remove ttm_bo_mmap() and friends

2021-04-15 Thread Thomas Zimmermann
The function ttm_bo_mmap is unused. Remove it and it's helpers; including the verify_access callback in struct ttm_device_funcs. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 53 -

[PATCH] efifb: Fix runtime pm calls for non PCI efifb device

2021-04-15 Thread Sudeep Holla
Commit a6c0fd3d5a8b ("efifb: Ensure graphics device for efifb stays at PCI D0") added runtime pm calls to probe and remove routines to ensure the PCI device for efifb stays in D0 state. However not ever efifb is based on PCI device and efifb_pci_dev can be NULL if that is the case. In such cases,

[PATCH] drm/tegra: Fix shift overflow in tegra_shared_plane_atomic_update

2021-04-15 Thread Nathan Chancellor
Clang warns: drivers/gpu/drm/tegra/hub.c:513:11: warning: shift count >= width of type [-Wshift-count-overflow] base |= BIT(39); ^~~ BIT is unsigned long, which is 32-bit on ARCH=arm, hence the overflow warning. Switch to BIT_ULL, which is 64-bit and

Re: [PATCH 4/4] drm: Remove DRM_KMS_FB_HELPER Kconfig option

2021-04-15 Thread Daniel Vetter
On Thu, Apr 15, 2021 at 01:00:40PM +0200, Thomas Zimmermann wrote: > It's only used by DRM_FBDEV_EMULATION, so inline it there. > > Signed-off-by: Thomas Zimmermann I'm not sure on patch 1, I'll leave that to Zack, but I think 2-4 would work alone too. On those: Acked-by: Daniel Vetter > ---

Re: [Intel-gfx] [PATCH v3 12/16] drm/i915/uapi: introduce drm_i915_gem_create_ext

2021-04-15 Thread Daniel Vetter
On Mon, Mar 29, 2021 at 12:58 AM Daniele Ceraolo Spurio wrote: > > From: Bommu Krishnaiah > > Same old gem_create but with now with extensions support. This is needed > to support various upcoming usecases. For now we use the extensions > mechanism to support PAVP. > > Signed-off-by: Bommu

Re: [PATCH v4 5/6] dt-bindings: display: add Unisoc's mipi dsi controller bindings

2021-04-15 Thread Maxime Ripard
On Fri, Apr 09, 2021 at 08:23:19AM +0800, Kevin Tang wrote: > Maxime Ripard 于2021年4月7日周三 下午6:46写道: > > > On Wed, Mar 31, 2021 at 09:49:14AM +0800, Kevin Tang wrote: > > > Hi Maxime, > > > > > > Maxime Ripard 于2021年3月24日周三 下午7:13写道: > > > > > > > On Mon, Feb 22, 2021 at 09:28:21PM +0800, Kevin

[PATCH 2/3] drm/panel: Add connector_type for some EDT displays

2021-04-15 Thread Stefan Riedmueller
The connector_type for following two EDT displays is missing: - EDT ETM0430G0DH6 - EDT ETM0700G0BDH6 Both are parallel displays thus add the corresponding connector_type. Signed-off-by: Stefan Riedmueller --- drivers/gpu/drm/panel/panel-simple.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH 3/3] drm/panel: Add bus_format and bus_flags for EDT ETM0430G0DH6

2021-04-15 Thread Stefan Riedmueller
Add corresponding bus_format and bus_flags for the EDT ETM0430G0DH6 display. Signed-off-by: Stefan Riedmueller --- drivers/gpu/drm/panel/panel-simple.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index

Re: [PATCH v2 08/10] drm/simpledrm: Acquire clocks from DT device node

2021-04-15 Thread Thomas Zimmermann
Hi Am 15.04.21 um 11:21 schrieb Maxime Ripard: Hi, On Thu, Apr 15, 2021 at 09:31:01AM +0200, Thomas Zimmermann wrote: Am 08.04.21 um 10:13 schrieb Maxime Ripard: Hi, On Thu, Mar 18, 2021 at 11:29:19AM +0100, Thomas Zimmermann wrote: Make sure required hardware clocks are enabled while the

Re: [PATCH 10/12] drm/tegra: Don't set allow_fb_modifiers explicitly

2021-04-15 Thread Daniel Vetter
On Tue, Apr 13, 2021 at 01:37:38PM +0200, Thierry Reding wrote: > On Tue, Apr 13, 2021 at 11:49:01AM +0200, Daniel Vetter wrote: > > Since > > > > commit 890880ddfdbe256083170866e49c87618b706ac7 > > Author: Paul Kocialkowski > > Date: Fri Jan 4 09:56:10 2019 +0100 > > > > drm: Auto-set

[PATCH 1/2] mm/vmscan: add sync_shrinkers function

2021-04-15 Thread Christian König
To be able to switch to a spinlock and reduce lock contention in the TTM shrinker we don't want to hold a mutex while unmapping and freeing pages from the pool. But then we somehow need to prevent a race between (for example) the shrinker trying to free pages and hotplug trying to remove the

[PATCH 2/2] drm/ttm: optimize the pool shrinker a bit v2

2021-04-15 Thread Christian König
Switch back to using a spinlock again by moving the IOMMU unmap outside of the locked region. v2: Add a comment explaining why we need sync_shrinkers(). Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_pool.c | 44 +- 1 file changed, 22 insertions(+),

Re: [PATCH] drm/radeon/si: Fix inconsistent indenting

2021-04-15 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Apr 15, 2021 at 5:30 AM Yang Li wrote: > > Kernel test robot throws below warning -> > > smatch warnings: > drivers/gpu/drm/radeon/si.c:4514 si_vm_packet3_cp_dma_check() warn: > inconsistent indenting > > Fixed the inconsistent indenting. > > Reported-by: Abaci

Re: [PATCH 6/7] drm/ttm: always initialize the full ttm_resource

2021-04-15 Thread Matthew Auld
On Tue, 13 Apr 2021 at 14:53, Christian König wrote: > > Init all fields in ttm_resource_alloc() when we create a new resource. > > Signed-off-by: Christian König Reviewed-by: Matthew Auld ___ dri-devel mailing list dri-devel@lists.freedesktop.org

Re: [PATCH] drm/tegra: Fix shift overflow in tegra_shared_plane_atomic_update

2021-04-15 Thread Thierry Reding
On Thu, Apr 15, 2021 at 08:29:14AM -0700, Nathan Chancellor wrote: > Clang warns: > > drivers/gpu/drm/tegra/hub.c:513:11: warning: shift count >= width of > type [-Wshift-count-overflow] > base |= BIT(39); > ^~~ > > BIT is unsigned long, which is

Re: [Linaro-mm-sig] [RFC] Cross-driver ww transaction lock lists

2021-04-15 Thread Daniel Vetter
On Thu, Apr 15, 2021 at 05:40:24PM +0200, Thomas Hellström (Intel) wrote: > > On 4/15/21 4:40 PM, Daniel Vetter wrote: > > On Thu, Apr 15, 2021 at 4:02 PM Thomas Hellström (Intel) > > wrote: > > > > > > On 4/15/21 3:37 PM, Daniel Vetter wrote: > > > > On Tue, Apr 13, 2021 at 09:57:06AM +0200,

[PATCH v3 1/4] drm/i915/uapi: hide kernel doc warnings

2021-04-15 Thread Matthew Auld
It's not properly formatted kernel doc, just nerf the warnings for now. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-...@lists.freedesktop.org ---

[PATCH v3 2/4] drm/i915/uapi: convert i915_user_extension to kernel doc

2021-04-15 Thread Matthew Auld
Add some example usage for the extension chaining also, which is quite nifty. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc:

[PATCH v3 4/4] drm/doc/rfc: i915 DG1 uAPI

2021-04-15 Thread Matthew Auld
Add an entry for the new uAPI needed for DG1. v2(Daniel): - include the overall upstreaming plan - add a note for mmap, there are differences here for TTM vs i915 - bunch of other suggestions from Daniel v3: (Daniel) - add a note for set/get caching stuff - add some more docs for

[PATCH v3 3/4] drm/i915/uapi: convert i915_query and friend to kernel doc

2021-04-15 Thread Matthew Auld
Add a note about the two-step process. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-...@lists.freedesktop.org ---

Re: [PATCH v2 3/3] drm/msm/dp: check main link status before start aux read

2021-04-15 Thread khsieh
On 2021-04-14 14:09, Stephen Boyd wrote: Quoting Kuogee Hsieh (2021-04-13 16:11:44) Make sure main link is in connection state before start aux read/write operation to avoid unnecessary long delay due to main link had been unplugged. Signed-off-by: Kuogee Hsieh ---

Re: [PATCH] drm/radeon/cik: remove set but not used variables

2021-04-15 Thread Alex Deucher
On Mon, Apr 12, 2021 at 11:26 PM Tian Tao wrote: > > The value of pipe_id and queue_id are not used under certain > circumstances, so just delete. > > Signed-off-by: Tian Tao Applied. Thanks! Alex > --- > drivers/gpu/drm/radeon/cik.c | 4 > 1 file changed, 4 deletions(-) > > diff

Re: [PATCH 2/4] drm/mxsfb: Don't select DRM_KMS_FB_HELPER

2021-04-15 Thread Stefan Agner
On 2021-04-15 13:00, Thomas Zimmermann wrote: > Selecting DRM_FBDEV_EMULATION will include the correct secttings for > fbdev emulation. Drivers should not override this. > > Signed-off-by: Thomas Zimmermann Acked-by: Stefan Agner -- Stefan > --- > drivers/gpu/drm/mxsfb/Kconfig | 1 - > 1

Re: [Linaro-mm-sig] [RFC] Cross-driver ww transaction lock lists

2021-04-15 Thread Intel
On 4/15/21 4:40 PM, Daniel Vetter wrote: On Thu, Apr 15, 2021 at 4:02 PM Thomas Hellström (Intel) wrote: On 4/15/21 3:37 PM, Daniel Vetter wrote: On Tue, Apr 13, 2021 at 09:57:06AM +0200, Christian König wrote: Am 13.04.21 um 09:50 schrieb Thomas Hellström: Hi! During the dma_resv

Re: [PATCH v2] drm/i915: Fix "mitigations" parsing if i915 is builtin

2021-04-15 Thread Ville Syrjälä
On Wed, Apr 14, 2021 at 02:06:43PM +0800, Jisheng Zhang wrote: > I met below error during boot with i915 builtin if pass > "i915.mitigations=off": > [0.015589] Booting kernel: `off' invalid for parameter `i915.mitigations' > > The reason is slab subsystem isn't ready at that time, so

Re: [PATCH v2] drm/amdgpu: fix an error code in init_pmu_entry_by_type_and_add()

2021-04-15 Thread Alex Deucher
On Wed, Apr 14, 2021 at 1:59 AM Dan Carpenter wrote: > > If the kmemdup() fails then this should return a negative error code > but it currently returns success > > Fixes: b4a7db71ea06 ("drm/amdgpu: add per device user friendly xgmi events > for vega20") > Signed-off-by: Dan Carpenter Applied.

Re: [PATCH 7/7] drm/ttm: rename bo->mem and make it a pointer

2021-04-15 Thread Matthew Auld
On Tue, 13 Apr 2021 at 14:53, Christian König wrote: > > When we want to decouble resource management from buffer management we need to > be able to handle resources separately. > > Add a resource pointer and rename bo->mem so that all code needs to > change to access the pointer instead. > > No

Re: [Intel-gfx] [PATCH v3 11/16] drm/i915/pxp: interface for marking contexts as using protected content

2021-04-15 Thread Daniel Vetter
On Mon, Mar 29, 2021 at 12:58 AM Daniele Ceraolo Spurio wrote: > > Extra tracking and checks around protected objects, coming in a follow-up > patch, will be enabled only for contexts that opt in. Contexts can only be > marked as using protected content at creation time and they must be both >

[PULL] drm-intel-fixes

2021-04-15 Thread Rodrigo Vivi
Hi Dave and Daniel, Here goes drm-intel-fixes-2021-04-15: Display panel & power related fixes: - Backlight fix (Lyude) - Display watermark fix (Ville) - VLV panel power fix (Hans) Thanks, Rodrigo. The following changes since commit d434405aaab7d0ebc516b68a8fc4100922d7f5ef: Linux 5.12-rc7

Re: [RFC] Cross-driver ww transaction lock lists

2021-04-15 Thread Daniel Vetter
On Tue, Apr 13, 2021 at 09:57:06AM +0200, Christian König wrote: > > > Am 13.04.21 um 09:50 schrieb Thomas Hellström: > > Hi! > > > > During the dma_resv conversion of the i915 driver, we've been using ww > > transaction lock lists to keep track of ww_mutexes that are locked > > during the

Re: [PATCH 2/2] drm/ttm: optimize the pool shrinker a bit v2

2021-04-15 Thread Huang Rui
On Thu, Apr 15, 2021 at 07:56:24PM +0800, Christian König wrote: > Switch back to using a spinlock again by moving the IOMMU unmap outside > of the locked region. > > v2: Add a comment explaining why we need sync_shrinkers(). > > Signed-off-by: Christian König Series look good for me as well.

Re: linux-next: manual merge of the vfio tree with the drm tree

2021-04-15 Thread Jason Gunthorpe
On Thu, Apr 15, 2021 at 04:47:34PM +1000, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the vfio tree got a conflict in: > > drivers/gpu/drm/i915/gvt/gvt.c > > between commit: > > 9ff06c385300 ("drm/i915/gvt: Remove references to struct drm_device.pdev") > > from the

Re: [PULL] drm-intel-fixes

2021-04-15 Thread Daniel Vetter
On Thu, Apr 15, 2021 at 08:59:11AM -0400, Rodrigo Vivi wrote: > Hi Dave and Daniel, > > Here goes drm-intel-fixes-2021-04-15: > > Display panel & power related fixes: > > - Backlight fix (Lyude) > - Display watermark fix (Ville) > - VLV panel power fix (Hans) > > Thanks, > Rodrigo. > > The

Re: [PATCH 9/9] drm/amdgpu: Lock the attached dmabuf in unpopulate

2021-04-15 Thread Felix Kuehling
Am 2021-04-15 um 3:41 a.m. schrieb Christian König: > > > Am 14.04.21 um 17:15 schrieb Felix Kuehling: >> Am 2021-04-14 um 3:33 a.m. schrieb Christian König: >>> Am 14.04.21 um 08:46 schrieb Felix Kuehling: amdgpu_ttm_tt_unpopulate can be called during bo_destroy. The dmabuf->resv

Re: [Linaro-mm-sig] [RFC] Cross-driver ww transaction lock lists

2021-04-15 Thread Daniel Vetter
On Thu, Apr 15, 2021 at 4:02 PM Thomas Hellström (Intel) wrote: > > > On 4/15/21 3:37 PM, Daniel Vetter wrote: > > On Tue, Apr 13, 2021 at 09:57:06AM +0200, Christian König wrote: > >> > >> Am 13.04.21 um 09:50 schrieb Thomas Hellström: > >>> Hi! > >>> > >>> During the dma_resv conversion of the

Re: [PATCH v2 1/7] drm/ttm: Don't override vm_ops callbacks, if set

2021-04-15 Thread Daniel Vetter
On Thu, Apr 15, 2021 at 12:17:34PM +0200, Thomas Zimmermann wrote: > Drivers may want to set their own callbacks for a VM area. Only set > TTM's callbacks if the vm_ops field is clear. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/ttm/ttm_bo_vm.c | 7

Re: [PATCH v2 04/10] drm/aperture: Add infrastructure for aperture ownership

2021-04-15 Thread Daniel Vetter
On Thu, Apr 15, 2021 at 08:56:20AM +0200, Thomas Zimmermann wrote: > Hi > > Am 09.04.21 um 11:22 schrieb Daniel Vetter: > > > Is it that easy? simepldrm's detach function has code to synchronize with > > > concurrent hotplug removals. If we can use drm_dev_unplug() for > > > everything, > > >

Re: [PATCH 1/2] mm/vmscan: add sync_shrinkers function

2021-04-15 Thread Daniel Vetter
On Thu, Apr 15, 2021 at 01:56:23PM +0200, Christian König wrote: > To be able to switch to a spinlock and reduce lock contention in the TTM > shrinker we don't want to hold a mutex while unmapping and freeing pages > from the pool. > > But then we somehow need to prevent a race between (for

Re: [Linaro-mm-sig] [RFC] Cross-driver ww transaction lock lists

2021-04-15 Thread Intel
On 4/15/21 3:37 PM, Daniel Vetter wrote: On Tue, Apr 13, 2021 at 09:57:06AM +0200, Christian König wrote: Am 13.04.21 um 09:50 schrieb Thomas Hellström: Hi! During the dma_resv conversion of the i915 driver, we've been using ww transaction lock lists to keep track of ww_mutexes that are

Re: [PATCH v3 01/12] drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable()

2021-04-15 Thread Doug Anderson
Hi, On Wed, Apr 14, 2021 at 6:56 PM Laurent Pinchart wrote: > > Hi Doug, > > On Wed, Apr 14, 2021 at 06:19:13PM -0700, Doug Anderson wrote: > > On Sun, Apr 4, 2021 at 5:50 PM Laurent Pinchart wrote: > > > On Fri, Apr 02, 2021 at 03:28:35PM -0700, Douglas Anderson wrote: > > > > The

Re: [PATCH v2 04/10] drm/aperture: Add infrastructure for aperture ownership

2021-04-15 Thread Thomas Zimmermann
Hi Am 15.04.21 um 14:57 schrieb Daniel Vetter: On Thu, Apr 15, 2021 at 08:56:20AM +0200, Thomas Zimmermann wrote: Hi Am 09.04.21 um 11:22 schrieb Daniel Vetter: Is it that easy? simepldrm's detach function has code to synchronize with concurrent hotplug removals. If we can use

Re: [PATCH 2/2] drm/ttm: optimize the pool shrinker a bit v2

2021-04-15 Thread Andrew Morton
On Thu, 15 Apr 2021 13:56:24 +0200 "Christian König" wrote: > @@ -530,6 +525,11 @@ void ttm_pool_fini(struct ttm_pool *pool) > for (j = 0; j < MAX_ORDER; ++j) > ttm_pool_type_fini(>caching[i].orders[j]); > } > + > + /* We removed the

[PATCH] drm: nouveau: nouveau_bo.c: Remove set but unused variables

2021-04-15 Thread Fabio M. De Francesco
Removed two variables set but unused. Signed-off-by: Fabio M. De Francesco --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 2d5d68fc15c2..d0eac5375533 100644 ---

  1   2   >