[PATCH v2] drm/rockchip: remove existing generic drivers to take over the device

2021-05-16 Thread Javier Martinez Canillas
There are drivers that register framebuffer devices very early in the boot process and make use of the existing framebuffer as setup by the firmware. If one of those drivers has registered a fbdev, then the fallback fbdev of the DRM driver won't be bound to the framebuffer console. To avoid that,

[PATCH] drm/virtgpu: Fix a resource leak in an error handling path

2021-05-16 Thread Christophe JAILLET
If an error occurs after calling 'virtio_gpu_init()', 'virtio_gpu_deinit()' must be called as already done in the remove function. Fixes: d516e75c71c9 ("drm/virtio: Drop deprecated load/unload initialization") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/virtio/virtgpu_drv.c | 4 +++- 1

Re: [PATCH v2] drm/rockchip: remove existing generic drivers to take over the device

2021-05-16 Thread Thomas Zimmermann
Am 16.05.21 um 09:48 schrieb Javier Martinez Canillas: There are drivers that register framebuffer devices very early in the boot process and make use of the existing framebuffer as setup by the firmware. If one of those drivers has registered a fbdev, then the fallback fbdev of the DRM dri

[PATCH 0/4] drm: Finally retire struct drm_format_name_buf

2021-05-16 Thread Thomas Zimmermann
This is a cleanup patchset to remove drm_format_name_buf et al. There are two instances in drivers that need to be replaced with the %4cc printk format modifier. Patch 3 was left over back from an earlier patchset. [1] Patch 4 removes struct drm_format_name_buf. I built-tested with drm-tip. The pa

[PATCH 1/4] drm/amdgpu: Use %p4cc to print 4CC format

2021-05-16 Thread Thomas Zimmermann
Replace use of struct drm_format_name_buf with %p4cc for printing 4CC formats. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/dr

[PATCH 2/4] drm/simpledrm: Use %p4cc to print 4CC format

2021-05-16 Thread Thomas Zimmermann
Replace use of struct drm_format_name_buf with %p4cc for printing 4CC formats. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/simpledrm.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c index

[PATCH 4/4] drm/fourcc: Remove struct drm_format_buf_name

2021-05-16 Thread Thomas Zimmermann
The structure is unused. Remove it. Signed-off-by: Thomas Zimmermann --- include/drm/drm_fourcc.h | 8 1 file changed, 8 deletions(-) diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index 3ea17b8a79d3..3b138d4ae67e 100644 --- a/include/drm/drm_fourcc.h +++ b/include/dr

[PATCH 3/4] drm: Remove drm_get_format_name()

2021-05-16 Thread Thomas Zimmermann
From: Sakari Ailus The %p4cc printk format modifier was recently added to print fourcc codes, replacing drm_get_format_name(). The function is no longer needed, so remove it. Signed-off-by: Sakari Ailus Reviewed-by: Petr Mladek Reviewed-by: Andy Shevchenko --- drivers/gpu/drm/drm_fourcc.c |

Re: [PATCH] drm/msm/dp: remove most of usbpd-related remains

2021-05-16 Thread Dmitry Baryshkov
On Sun, 16 May 2021 at 08:41, Bjorn Andersson wrote: > > On Sat 15 May 14:56 CDT 2021, Dmitry Baryshkov wrote: > > > Remove most of remains of downstream usbpd code. Mainline kernel uses > > different approach for managing Type-C / USB-PD, so this remains unused. > > Do not touch usbpd callbacks f

Re: [PATCH 1/4] drm/amdgpu: Use %p4cc to print 4CC format

2021-05-16 Thread Christian König
Am 16.05.21 um 14:13 schrieb Thomas Zimmermann: Replace use of struct drm_format_name_buf with %p4cc for printing 4CC formats. Signed-off-by: Thomas Zimmermann Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 7 ++- 1 file changed, 2 insertions(+), 5 delet

Re: [PATCH v1 3/3] drm/msm/dpu: simplify interrupt managing

2021-05-16 Thread Dmitry Baryshkov
On Sun, 16 May 2021 at 08:24, Bjorn Andersson wrote: > > On Sun 11 Apr 19:09 CDT 2021, Dmitry Baryshkov wrote: > > > Change huge lookup table to contain just sensible entries. IRQ index is > > now not an index in the table, but just register id (multiplied by 32, > > the amount of IRQs in the regi

Re: [PATCH v2] drm/rockchip: remove existing generic drivers to take over the device

2021-05-16 Thread Javier Martinez Canillas
Hello Thomas, On 5/16/21 12:30 PM, Thomas Zimmermann wrote: > > > Am 16.05.21 um 09:48 schrieb Javier Martinez Canillas: >> There are drivers that register framebuffer devices very early in the boot >> process and make use of the existing framebuffer as setup by the firmware. >> >> If one of tho

[PATCH] drm/i915: only disable default vga device

2021-05-16 Thread Emil Velikov
From: Vivek Das Mohapatra This patch is to do with seamless handover, eg when the sequence is bootloader → plymouth → desktop. It switches the vga arbiter from the "other" GPU to the default one (intel in this case), so the driver can issue some io(). Signed-off-by: Vivek Das Mohapatra Signed-

[PATCH 1/3] drm/i915: Don't include drm_legacy.h

2021-05-16 Thread Thomas Zimmermann
i915 does not use DRM legacy code. Remove the rsp include statements. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/i915/gem/i915_gem_phys.c | 1 - drivers/gpu/drm/i915/i915_drv.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_phys.c b/dri

[PATCH 0/3] drm: Remove some includes of drm_legacy.h

2021-05-16 Thread Thomas Zimmermann
Remove include statements for DRM legacy headers. None of these dependencies is required. Built-tested w/o CONFIG_DRM_LEGACY set. These patches should probably go through drm-misc, like the rest of the legacy cleanups. Thomas Zimmermann (3): drm/i915: Don't include drm_legacy.h drm/nouveau: D

[PATCH 3/3] drm: Don't include drm_legacy.h in drm_lease.c

2021-05-16 Thread Thomas Zimmermann
DRM leases do not use DRM legacy code. Remove the rsp include statement. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_lease.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_lease.c index da4f085fc09e..00fb433bcef1 100644 --- a/dri

[PATCH 2/3] drm/nouveau: Don't include drm_legacy.h

2021-05-16 Thread Thomas Zimmermann
Nouveau does not use DRM legacy code. Remove the rsp. include statement. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index e8b506a668

[PATCH] drm: Remove unused branch in legacy PCI initialization

2021-05-16 Thread Thomas Zimmermann
The legacy PCI init code sets the drvdata for drivers with MODESET flag, but none of the old UMS drivers sets the flag. Remove the branch. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_pci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/

[PATCH] drm: Mark IRQ_BUSID ioctl as legacy

2021-05-16 Thread Thomas Zimmermann
The functionality is only implemented for legacy drivers. Mark the ioctl as legacy and move the code behind CONFIG_DRM_LEGACY. If legacy drivers are disabled, the ioctl call now returns -EINVAL instead of -EOPNOTSUPP. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_internal.h | 8 --

Re: [PATCH -next] drm: correct function name drm_legacy_ctxbitmap_flush()

2021-05-16 Thread Thomas Zimmermann
Hi Am 13.05.21 um 09:19 schrieb Yang Yingliang: Fix the following make W=1 kernel build warning: drivers/gpu/drm/drm_context.c:136: warning: expecting prototype for drm_ctxbitmap_flush(). Prototype was for drm_legacy_ctxbitmap_flush() instead Signed-off-by: Yang Yingliang Added to drm-m

Re: [PATCH] drm/msm/dpu: simplify dpu_core_irq_en/disable helpers

2021-05-16 Thread Dmitry Baryshkov
On 11/05/2021 17:15, Dmitry Baryshkov wrote: dpu_core_irq_en/disable helpers are always called with the irq_count equal to 1. Merge them with _dpu_core_en/disable functions and make them handle just one interrupt index at a time. Replacing this patch with the squashing enable/disable into regist

[PATCH v2 0/6] drm/msm/dpu: rework irq handling

2021-05-16 Thread Dmitry Baryshkov
Simplify IRQ handling. dpu_irq_map is a huge table consisting of all possible IRQ entries (including a plenty of 'reserved' = not existing IRQs). It is always used to lookup the interrupt index (in the table) and then to use this index to lookup related interrupt register and mask. For the long per

[PATCH v2 3/6] drm/msm/dpu: define interrupt register names

2021-05-16 Thread Dmitry Baryshkov
In order to make mdss_irqs readable (and error-prone) define names for interrupt register indices. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c| 45 --- .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h | 18 2 files changed, 58 insertio

[PATCH v2 1/6] drm/msm/dpu: merge dpu_hw_intr_get_interrupt_statuses into dpu_hw_intr_dispatch_irqs

2021-05-16 Thread Dmitry Baryshkov
There is little sense in reading interrupt statuses and right after that going after the array of statuses to dispatch them. Merge both loops into single function doing read and dispatch. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq

[PATCH v2 2/6] drm/msm/dpu: hw_intr: always call dpu_hw_intr_clear_intr_status_nolock

2021-05-16 Thread Dmitry Baryshkov
Always call dpu_hw_intr_clear_intr_status_nolock() from the dpu_hw_intr_dispatch_irqs(). This simplifies the callback function (which call clears the interrupts anyway) and enforces clearing the hw interrupt status. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson --- drivers/gpu/dr

[PATCH v2 5/6] drm/msm/dpu: drop remains of old irq lookup subsystem

2021-05-16 Thread Dmitry Baryshkov
There is no more need for the dpu_intr_type types, dpu_irq_map table, individual intr defines and obsolete_irq field. Drop all of them now. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h |2 - .../drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c |4 - .../drm/

[PATCH v2 4/6] drm/msm/dpu: replace IRQ lookup with the data in hw catalog

2021-05-16 Thread Dmitry Baryshkov
The IRQ table in the dpu_hw_interrupts.h is big, ugly, and hard to maintain. There are only few interrupts used from that table. Newer generations use different IRQ locations. Move this data to hw catalog. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c | 20 +-

[PATCH v2 6/6] drm/msm/dpu: simplify IRQ enabling/disabling

2021-05-16 Thread Dmitry Baryshkov
Merge dpu_core_irq_enable() into dpu_core_irq_register_callback() and dpu_core_irq_disable() into dpu_core_irq_unregister_callback(), because they are called in pairs. There is no need to have separate enable/disable pair, we can enable hardware IRQ when first callback is registered and when the la

Re: [PATCH v1 3/3] drm/msm/dpu: simplify interrupt managing

2021-05-16 Thread Dmitry Baryshkov
On 16/05/2021 08:24, Bjorn Andersson wrote: On Sun 11 Apr 19:09 CDT 2021, Dmitry Baryshkov wrote: Change huge lookup table to contain just sensible entries. IRQ index is now not an index in the table, but just register id (multiplied by 32, the amount of IRQs in the register) plus offset in the

Re: [PATCH] treewide: Remove leading spaces in Kconfig files

2021-05-16 Thread Greg KH
On Sun, May 16, 2021 at 03:22:09PM +0200, Juerg Haefliger wrote: > There are a few occurences of leading spaces before tabs in a couple of > Kconfig files. Remove them by running the following command: > > $ find . -name 'Kconfig*' | xargs sed -r -i 's/^[ ]+\t/\t/' > > Signed-off-by: Juerg Haef