Re: [RFC v3 10/10] drm/dp: Extract i915's eDP backlight code into DRM helpers

2021-02-08 Thread Thomas Zimmermann
Hi Am 06.02.21 um 00:45 schrieb Lyude Paul: Since we're about to implement eDP backlight support in nouveau using the standard protocol from VESA, we might as well just take the code that's already written for this and move it into a set of shared DRM helpers. Note that these helpers are intend

Re: [PATCH] drm/amdgpu: fix potential integer overflow on shift of a int

2021-02-08 Thread Christian König
Am 08.02.21 um 00:07 schrieb Colin King: From: Colin Ian King The left shift of int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to an unsigned 64 bit integer. In the case where *frag is 32 or more this can lead to an oveflow. Avoid this by shifting 1ULL.

Re: [PATCH 2/2] dt-bindings: display: Add "disable-hpd" binding

2021-02-08 Thread Neil Armstrong
Hi, On 31/01/2021 10:57, Mykyta Poturai wrote: > Add the "disable-hpd" binding, used to disable hotplug detected > functionality in the driver. When it's enabled the driver assumes that > the connector is always connected and disables the hotplug detect > related IRQ. DT describes the hardware, n

Re: [PATCH 1/2] drm/bridge: dw-hdmi: Add DT binding to disable hotplug detect

2021-02-08 Thread Neil Armstrong
On 31/01/2021 10:55, Mykyta Poturai wrote: > Add "disable-hpd" boolean binding for the device tree. When this option > is turned on HPD-related IRQ is disabled and it is assumed that the HDMI > connector is connected all the time. This may be useful in systems where > it is impossible or undesirabl

Re: [PATCH v4 11/14] drm/amdgpu: Guard against write accesses after device removal

2021-02-08 Thread Christian König
Am 07.02.21 um 22:50 schrieb Daniel Vetter: [SNIP] Clarification - as far as I know there are no page fault handlers for kernel mappings. And we are talking about kernel mappings here, right ? If there were I could solve all those issues the same as I do for user mappings, by invalidating all e

Re: [RFC v3 2/3] virtio: Introduce Vdmabuf driver

2021-02-08 Thread Daniel Vetter
On Mon, Feb 08, 2021 at 08:57:48AM +0100, Gerd Hoffmann wrote: > Hi, > > > > +/* extract pages referenced by sgt */ > > > +static struct page **extr_pgs(struct sg_table *sgt, int *nents, int > > > *last_len) > > > > Nack, this doesn't work on dma-buf. And it'll blow up at runtime when you > >

Re: [PATCH v4 11/14] drm/amdgpu: Guard against write accesses after device removal

2021-02-08 Thread Daniel Vetter
On Mon, Feb 08, 2021 at 10:37:19AM +0100, Christian König wrote: > Am 07.02.21 um 22:50 schrieb Daniel Vetter: > > [SNIP] > > > Clarification - as far as I know there are no page fault handlers for > > > kernel > > > mappings. And we are talking about kernel mappings here, right ? If > > > there

Re: [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-08 Thread Daniel Vetter
On Fri, Feb 05, 2021 at 11:19:19PM +0200, Ville Syrjälä wrote: > On Fri, Feb 05, 2021 at 06:24:08PM +0200, Ville Syrjälä wrote: > > On Fri, Feb 05, 2021 at 04:46:27PM +0100, Daniel Vetter wrote: > > > On Thu, Feb 04, 2021 at 05:55:28PM +0200, Ville Syrjälä wrote: > > > > On Thu, Feb 04, 2021 at 04:

Re: [PATCH v4 11/14] drm/amdgpu: Guard against write accesses after device removal

2021-02-08 Thread Christian König
Am 08.02.21 um 10:48 schrieb Daniel Vetter: On Mon, Feb 08, 2021 at 10:37:19AM +0100, Christian König wrote: Am 07.02.21 um 22:50 schrieb Daniel Vetter: [SNIP] Clarification - as far as I know there are no page fault handlers for kernel mappings. And we are talking about kernel mappings here,

Re: [RFC][PATCH 2/2] dma-buf: heaps: Fix the name used when exporting dmabufs to be the actual heap name

2021-02-08 Thread Daniel Vetter
On Sat, Feb 06, 2021 at 05:47:48AM +, John Stultz wrote: > By default dma_buf_export() sets the exporter name to be > KBUILD_MODNAME. Unfortunately this may not be identical to the > string used as the heap name (ie: "system" vs "system_heap"). > > This can cause some minor confusion with tool

Re: [PATCH v4 11/14] drm/amdgpu: Guard against write accesses after device removal

2021-02-08 Thread Daniel Vetter
On Mon, Feb 08, 2021 at 11:03:15AM +0100, Christian König wrote: > Am 08.02.21 um 10:48 schrieb Daniel Vetter: > > On Mon, Feb 08, 2021 at 10:37:19AM +0100, Christian König wrote: > > > Am 07.02.21 um 22:50 schrieb Daniel Vetter: > > > > [SNIP] > > > > > Clarification - as far as I know there are n

[PATCH] drm/radeon: Simplify bool comparison

2021-02-08 Thread Jiapeng Chong
Fix the following coccicheck warning: ./drivers/gpu/drm/radeon/rs690.c:190:6-35: WARNING: Comparison to bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/radeon/rs690.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/rs69

Re: [PATCH] drm: bridge: convert sysfs sprintf/snprintf family to sysfs_emit

2021-02-08 Thread Robert Foss
Hey Jiapeng, Thanks for the patch. Feel free to add my r-b. Reviewed-by: Robert Foss On Sun, 7 Feb 2021 at 10:12, Jiapeng Chong wrote: > > Fix the following coccicheck warning: > > drivers/gpu/drm/bridge/lontium-lt9611uxc.c:858:8-16: WARNING: use > scnprintf or sprintf. > > Reported-by: Abaci R

[PATCH] drm/amd/display: Simplify bool comparison

2021-02-08 Thread Jiapeng Chong
Fix the following coccicheck warning: ./drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h:319:11-23: WARNING: Comparison to bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 4 ++-- 1 file changed, 2 insertions(+),

[PATCH] drm/qxl: properly handle device init failures

2021-02-08 Thread Gerd Hoffmann
Specifically do not try release resources which where not allocated in the first place. Cc: Tong Zhang Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 3 +++ drivers/gpu/drm/qxl/qxl_kms.c | 4 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_d

Patch "drm/dp/mst: Export drm_dp_get_vc_payload_bw()" has been added to the 5.10-stable tree

2021-02-08 Thread gregkh
This is a note to let you know that I've just added the patch titled drm/dp/mst: Export drm_dp_get_vc_payload_bw() to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-dp-m

Re: [PATCH 0/6] drm: Move vmap out of commit tail for SHMEM-based drivers

2021-02-08 Thread Gerd Hoffmann
On Sun, Feb 07, 2021 at 07:33:24PM +0100, Thomas Zimmermann wrote: > Hi > > Am 05.02.21 um 10:05 schrieb Gerd Hoffmann: > >Hi, > > > > > I smoke-tested the code by running fbdev, Xorg and weston with the > > > converted mgag200 driver. > > > > Looks sane to me. > > Survived cirrus smoke test

Re: [PATCH] drm: DRM_FOURCC_STANDALONE macro support

2021-02-08 Thread Simon Ser
Acked-by: Simon Ser ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/i915/gvt/kvmgt: Fix the build failure in kvmgt.

2021-02-08 Thread Yu Zhang
Previously, commit 531810caa9f4 ("KVM: x86/mmu: Use an rwlock for the x86 MMU") replaced KVM's mmu_lock with type rwlock_t. This will cause a build failure in kvmgt, which uses the same lock when trying to add/ remove some GFNs to/from the page tracker. Fix it with write_lock/unlocks in kvmgt. Rep

Re: [RFC v3 04/10] drm/i915/dpcd_bl: Handle drm_dpcd_read/write() return values correctly

2021-02-08 Thread Rodrigo Vivi
On Fri, Feb 05, 2021 at 06:45:08PM -0500, Lyude Paul wrote: > This is kind of an annoying aspect of DRM's DP helpers: > drm_dp_dpcd_readb/writeb() return the size of bytes read/written on > success, thus we want to check against that instead of checking if the > return value is less than 0. > > I'

Re: [RFC v3 06/10] drm/i915/dpcd_bl: Cache some backlight capabilities in intel_panel.backlight

2021-02-08 Thread Rodrigo Vivi
On Fri, Feb 05, 2021 at 06:45:10PM -0500, Lyude Paul wrote: > Since we're about to be moving this code into shared DRM helpers, we might > as well start to cache certain backlight capabilities that can be > determined from the EDP DPCD, and are likely to be relevant to the majority > of drivers usi

Re: [RFC v3 07/10] drm/i915/dpcd_bl: Move VESA backlight enabling code closer together

2021-02-08 Thread Rodrigo Vivi
On Fri, Feb 05, 2021 at 06:45:11PM -0500, Lyude Paul wrote: > No functional changes, just move set_vesa_backlight_enable() closer to it's > only caller: intel_dp_aux_vesa_enable_backlight(). > > Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi > --- > .../drm/i915/display/intel_dp_aux_back

AW: [PATCH] drm/amdgpu: fix potential integer overflow on shift of a int

2021-02-08 Thread Walter Harms
i am curious: what is the win to have a unsigned 64 bit integer in the first place ? re, wh Von: Christian König Gesendet: Montag, 8. Februar 2021 10:17:42 An: Colin King; Alex Deucher; David Airlie; Daniel Vetter; Huang Rui; Junwei Zhang; amd-...@lists.

Re: [PATCH 1/3] i915/display/intel_dp: Read PCON DSC ENC caps only for DPCD rev >= 1.4

2021-02-08 Thread Jani Nikula
On Thu, 04 Feb 2021, Ankit Nautiyal wrote: > DP-HDMI2.1 PCON has DSC encoder caps defined in registers 0x92-0x9E. > Do not read the registers if DPCD rev < 1.4. > > Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/2868 Please use Fixes: to reference commits that this patch fixes. Please

Re: Re: [linux-sunxi] [PATCH 4/5] drm/sun4i: Fix H6 HDMI PHY configuration

2021-02-08 Thread Jernej Škrabec
Dne petek, 05. februar 2021 ob 04:22:56 CET je Chen-Yu Tsai napisal(a): > On Fri, Feb 5, 2021 at 2:48 AM Jernej Skrabec wrote: > > > > cpce value for 594 MHz is set differently in BSP driver. Fix that. > > > > Fixes: c71c9b2fee17 ("drm/sun4i: Add support for Synopsys HDMI PHY") > > Tested-by: And

Re: [PATCH 0/6] drm: Move vmap out of commit tail for SHMEM-based drivers

2021-02-08 Thread Thomas Zimmermann
Hi Am 08.02.21 um 11:53 schrieb Gerd Hoffmann: On Sun, Feb 07, 2021 at 07:33:24PM +0100, Thomas Zimmermann wrote: Hi Am 05.02.21 um 10:05 schrieb Gerd Hoffmann: Hi, I smoke-tested the code by running fbdev, Xorg and weston with the converted mgag200 driver. Looks sane to me. Survived

Re: module loader dead code removal and cleanups v3

2021-02-08 Thread Jessica Yu
+++ Christoph Hellwig [02/02/21 13:13 +0100]: Hi all, this series removes support for long term unused export types and cleans up various loose ends in the module loader. Changes since v2: - clean up klp_find_object_symbol a bit - remove the now unused module_assert_mutex helper Changes since

Re: [PATCH 1/3] i915/display/intel_dp: Read PCON DSC ENC caps only for DPCD rev >= 1.4

2021-02-08 Thread Nautiyal, Ankit K
On 2/8/2021 4:45 PM, Jani Nikula wrote: On Thu, 04 Feb 2021, Ankit Nautiyal wrote: DP-HDMI2.1 PCON has DSC encoder caps defined in registers 0x92-0x9E. Do not read the registers if DPCD rev < 1.4. Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/2868 Please use Fixes: to reference c

Re: [PATCH] kernel: Expose SYS_kcmp by default

2021-02-08 Thread Michel Dänzer
On 2021-02-05 9:53 p.m., Daniel Vetter wrote: On Fri, Feb 5, 2021 at 7:37 PM Kees Cook wrote: On Fri, Feb 05, 2021 at 04:37:52PM +, Chris Wilson wrote: Userspace has discovered the functionality offered by SYS_kcmp and has started to depend upon it. In particular, Mesa uses SYS_kcmp for o

[PATCH v3 1/7] drm/simple-kms: Add plane-state helpers

2021-02-08 Thread Thomas Zimmermann
Just like regular plane-state helpers, drivers can use these new callbacks to create and destroy private plane state. v2: * make duplicate_state interface compatible with struct drm_plane_funcs Signed-off-by: Thomas Zimmermann Tested-by: Gerd Hoffmann Acked-by: Gerd Hoffmann

[PATCH v3 0/7] drm: Move vmap out of commit tail for SHMEM-based drivers

2021-02-08 Thread Thomas Zimmermann
Several SHMEM-based drivers use the BO as shadow buffer for the real framebuffer memory. Damage handling requires a vmap of the BO memory. But vmap/vunmap can acquire the dma-buf reservation lock, which is not allowed in commit tails. This patchset introduces a set of helpers that implement vmap/v

[PATCH v3 2/7] drm/gem: Export drm_gem_vmap() and drm_gem_vunmap()

2021-02-08 Thread Thomas Zimmermann
The symbols will be required by the upcoming helpers for shadow-buffered planes. Signed-off-by: Thomas Zimmermann Tested-by: Gerd Hoffmann Acked-by: Gerd Hoffmann Reported-by: kernel test robot --- drivers/gpu/drm/drm_gem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v3 3/7] drm: Add additional atomic helpers for shadow-buffered planes

2021-02-08 Thread Thomas Zimmermann
Several drivers use GEM buffer objects as shadow buffers for the actual framebuffer memory. Right now, drivers do these vmap operations in their commit tail, which is actually not allowed by the locking rules for the dma-buf reservation lock. The involved BO has to be vmapped in the plane's prepare

[PATCH v3 4/7] drm/mgag200: Move vmap out of commit tail

2021-02-08 Thread Thomas Zimmermann
Vmap operations may acquire the dmabuf reservation lock, which is not allowed within atomic commit-tail functions. Therefore move vmap and vunmap from the damage handler into prepare_fb and cleanup_fb callbacks. The mapping is provided as GEM shadow-buffered plane. The functions in the commit tail

[PATCH v3 5/7] drm/cirrus: Move vmap out of commit tail

2021-02-08 Thread Thomas Zimmermann
Vmap operations may acquire the dmabuf reservation lock, which is not allowed within atomic commit-tail functions. Therefore move vmap and vunmap from the damage handler into prepare_fb and cleanup_fb callbacks. The mapping is provided as GEM shadow-buffered plane. The functions in the commit tail

[PATCH v3 6/7] drm/gm12u320: Move vmap out of commit tail

2021-02-08 Thread Thomas Zimmermann
Vmap operations may acquire the dmabuf reservation lock, which is not allowed within atomic commit-tail functions. Therefore move vmap and vunmap from the damage handler into prepare_fb and cleanup_fb callbacks. The mapping is provided as GEM shadow-buffered plane. The functions in the commit tail

[PATCH v3 7/7] drm/udl: Move vmap out of commit tail

2021-02-08 Thread Thomas Zimmermann
Vmap operations may acquire the dmabuf reservation lock, which is not allowed within atomic commit-tail functions. Therefore move vmap and vunmap from the damage handler into prepare_fb and cleanup_fb callbacks. The mapping is provided as GEM shadow-buffered plane. The functions in the commit tail

Re: [PATCH] drm/amdgpu: fix potential integer overflow on shift of a int

2021-02-08 Thread Christian König
For start and end?  The hardware has 48 bit address space and that won't fit into 32bits. Only the fragment handling can't do more than 2GB at the same time. Christian. Am 08.02.21 um 12:05 schrieb Walter Harms: i am curious: what is the win to have a unsigned 64 bit integer in the first plac

[PATCH v2 0/5] sunxi: fix H6 HDMI related issues

2021-02-08 Thread Jernej Skrabec
Over the year I got plenty of reports of troubles with H6 HDMI signal. Sometimes monitor flickers, sometimes there was no image at all and sometimes it didn't play well with AVR. It turns out there are multiple issues. Patch 1 fixes clock issue, which didn't adjust parent rate, even if it is allow

[PATCH v2 1/5] clk: sunxi-ng: mp: fix parent rate change flag check

2021-02-08 Thread Jernej Skrabec
CLK_SET_RATE_PARENT flag is checked on parent clock instead of current one. Fix that. Fixes: 3f790433c3cb ("clk: sunxi-ng: Adjust MP clock parent rate when allowed") Reviewed-by: Chen-Yu Tsai Tested-by: Andre Heider Signed-off-by: Jernej Skrabec --- drivers/clk/sunxi-ng/ccu_mp.c | 2 +- 1 file

[PATCH v2 2/5] drm/sun4i: tcon: set sync polarity for tcon1 channel

2021-02-08 Thread Jernej Skrabec
Channel 1 has polarity bits for vsync and hsync signals but driver never sets them. It turns out that with pre-HDMI2 controllers seemingly there is no issue if polarity is not set. However, with HDMI2 controllers (H6) there often comes to de-synchronization due to phase shift. This causes flickerin

[PATCH v2 3/5] drm/sun4i: dw-hdmi: always set clock rate

2021-02-08 Thread Jernej Skrabec
As expected, HDMI controller clock should always match pixel clock. In the past, changing HDMI controller rate would seemingly worsen situation. However, that was the result of other bugs which are now fixed. Fix that by removing set_rate quirk and always set clock rate. Fixes: 40bb9d3147b2 ("drm

[PATCH v2 4/5] drm/sun4i: Fix H6 HDMI PHY configuration

2021-02-08 Thread Jernej Skrabec
As it turns out, vendor HDMI PHY driver for H6 has a pretty big table of predefined values for various pixel clocks. However, most of them are not useful/tested because they come from reference driver code. Vendor PHY driver is concerned with only few of those, namely 27 MHz, 74.25 MHz, 148.5 MHz,

[PATCH v2 5/5] drm/sun4i: dw-hdmi: Fix max. frequency for H6

2021-02-08 Thread Jernej Skrabec
It turns out that reasoning for lowering max. supported frequency is wrong. Scrambling works just fine. Several now fixed bugs prevented proper functioning, even with rates lower than 340 MHz. Issues were just more pronounced with higher frequencies. Fix that by allowing max. supported frequency i

linux-next: build warning after merge of the drm-misc tree

2021-02-08 Thread Stephen Rothwell
Hi all, After merging the drm-misc tree, today's linux-next build (htmldocs) produced this warning: include/drm/gpu_scheduler.h:304: warning: Function parameter or member '_score' not described in 'drm_gpu_scheduler' Introduced by commit f2f12eb9c32b ("drm/scheduler: provide scheduler score

Re: [PATCH] kernel: Expose SYS_kcmp by default

2021-02-08 Thread Michel Dänzer
On 2021-02-08 12:49 p.m., Michel Dänzer wrote: On 2021-02-05 9:53 p.m., Daniel Vetter wrote: On Fri, Feb 5, 2021 at 7:37 PM Kees Cook wrote: On Fri, Feb 05, 2021 at 04:37:52PM +, Chris Wilson wrote: Userspace has discovered the functionality offered by SYS_kcmp and has started to depend

Re: linux-firmware for Qualcomm SM8250 platforms

2021-02-08 Thread Josh Boyer
Pulled and pushed out. josh On Fri, Jan 22, 2021 at 5:12 PM Dmitry Baryshkov wrote: > > Hello linux-firmware maintainers, > > We'd like to submit firmware for Qualcomm SM8250-based platforms. > Firmware successfully tested on Qualcomm Robotics RB5 platform. > > The following changes since commit

[PATCH 1/3] drm/ttm: rework ttm_tt page limit v4

2021-02-08 Thread Christian König
TTM implements a rather extensive accounting of allocated memory. There are two reasons for this: 1. It tries to block userspace allocating a huge number of very small BOs without accounting for the kmalloced memory. 2. Make sure we don't over allocate and run into an OOM situation during s

[PATCH 2/3] drm/ttm: move memory accounting into vmwgfx v4

2021-02-08 Thread Christian König
This is just another feature which is only used by VMWGFX, so move it into the driver instead. I've tried to add the accounting sysfs file to the kobject of the drm minor, but I'm not 100% sure if this works as expected. v2: fix typo in KFD and avoid 64bit divide v3: fix init order in VMWGFX v4:

[PATCH 3/3] drm/ttm: drop sysfs directory

2021-02-08 Thread Christian König
Not used any more. Signed-off-by: Christian König Reviewed-by: Daniel Vetter --- drivers/gpu/drm/ttm/ttm_module.c | 50 drivers/gpu/drm/ttm/ttm_module.h | 2 -- 2 files changed, 52 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_module.c b/drivers/gpu/drm/tt

Re: [PATCH] kernel: Expose SYS_kcmp by default

2021-02-08 Thread Daniel Vetter
On Mon, Feb 8, 2021 at 12:49 PM Michel Dänzer wrote: > > On 2021-02-05 9:53 p.m., Daniel Vetter wrote: > > On Fri, Feb 5, 2021 at 7:37 PM Kees Cook wrote: > >> > >> On Fri, Feb 05, 2021 at 04:37:52PM +, Chris Wilson wrote: > >>> Userspace has discovered the functionality offered by SYS_kcmp a

Re: [Linux-graphics-maintainer] [PATCH 2/3] drm/ttm: move memory accounting into vmwgfx v3

2021-02-08 Thread Christian König
Hi Zack, ok we figured out how to do this correctly. Basically using the pdev->kobj instead of the drm->primary->kdev->kobj pointer worked quite well. I've just send the latest patches to the mailing list. If you don't have any objections I will commit that tomorrow with your and Daniels rb.

Re: [Linux-graphics-maintainer] [PATCH 2/3] drm/ttm: move memory accounting into vmwgfx v3

2021-02-08 Thread Daniel Vetter
On Mon, Feb 8, 2021 at 2:35 PM Christian König wrote: > > Hi Zack, > > ok we figured out how to do this correctly. > > Basically using the pdev->kobj instead of the drm->primary->kdev->kobj > pointer worked quite well. Note drm_device->pdev is gone, so make sure everything still compiles. You nee

Re: [PATCH] kernel: Expose SYS_kcmp by default

2021-02-08 Thread Michel Dänzer
On 2021-02-08 2:34 p.m., Daniel Vetter wrote: On Mon, Feb 8, 2021 at 12:49 PM Michel Dänzer wrote: On 2021-02-05 9:53 p.m., Daniel Vetter wrote: On Fri, Feb 5, 2021 at 7:37 PM Kees Cook wrote: On Fri, Feb 05, 2021 at 04:37:52PM +, Chris Wilson wrote: Userspace has discovered the funct

[PATCH v2 0/2] drm/vboxvideo: Use struct drm_shadow_plane_state for cursor plane

2021-02-08 Thread Thomas Zimmermann
(was: drm/vboxvideo: Vmap/vunmap cursor BO in prepare_fb and cleanup_fb) Functions in the atomic commit tail are not allowed to acquire the dmabuf's reservation lock. So we cannot legally call the GEM object's vmap functionality in atomic_update. But, much better, we can use drm_shadow_plane_stat

[PATCH v2 1/2] drm/gem: Export helpers for shadow-buffered planes

2021-02-08 Thread Thomas Zimmermann
Export the helpers for shadow-buffered planes. These will be used by several drivers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem_atomic_helper.c | 148 +++- include/drm/drm_gem_atomic_helper.h | 32 + 2 files changed, 174 insertions(+), 6 deletions(

[PATCH v2 2/2] drm/vboxvideo: Implement cursor plane with struct drm_shadow_plane_state

2021-02-08 Thread Thomas Zimmermann
Functions in the atomic commit tail are not allowed to acquire the dmabuf's reservation lock. So we cannot legally call the GEM object's vmap functionality in atomic_update. Instead use struct drm_shadow_plane_state and friends. It vmaps the framebuffer BOs in prepare_fb and vunmaps them in cleanu

Re: [PATCH] drm/vboxvideo: Vmap/vunmap cursor BO in prepare_fb and cleanup_fb

2021-02-08 Thread Thomas Zimmermann
Hi Hans Am 03.02.21 um 12:50 schrieb Hans de Goede: If I understand things correctly, there is some memory corruption introduced by this patch, so there will be a v2 fixing this ? The reason why I'm asking is because I always try to test vboxvideo patches inside a vbox vm, but if a v2 is coming

Re: [PATCH v4 11/14] drm/amdgpu: Guard against write accesses after device removal

2021-02-08 Thread Christian König
Am 08.02.21 um 11:11 schrieb Daniel Vetter: On Mon, Feb 08, 2021 at 11:03:15AM +0100, Christian König wrote: Am 08.02.21 um 10:48 schrieb Daniel Vetter: On Mon, Feb 08, 2021 at 10:37:19AM +0100, Christian König wrote: Am 07.02.21 um 22:50 schrieb Daniel Vetter: [SNIP] Clarification - as far

RE: [PATCH 1/2] drm/amd/display: Fix the brightness read via aux

2021-02-08 Thread Deucher, Alexander
[AMD Public Use] > -Original Message- > From: Takashi Iwai > Sent: Saturday, February 6, 2021 7:29 AM > To: Alex Deucher > Cc: Deucher, Alexander ; Koenig, Christian > ; Li, Sun peng (Leo) ; > Wentland, Harry ; Maling list - DRI developers > ; amd-gfx list g...@lists.freedesktop.org> >

Re: [PATCH 3/3] drm/amd/display: Skip modeset for front porch change

2021-02-08 Thread Kazlauskas, Nicholas
On 2021-01-24 11:00 p.m., Aurabindo Pillai wrote: On 2021-01-21 2:05 p.m., Kazlauskas, Nicholas wrote: On 2021-01-19 10:50 a.m., Aurabindo Pillai wrote: [Why] A seamless transition between modes can be performed if the new incoming mode has the same timing parameters as the optimized mode on

[PATCH 5.10 078/120] drm/dp/mst: Export drm_dp_get_vc_payload_bw()

2021-02-08 Thread Greg Kroah-Hartman
From: Imre Deak commit 83404d581471775f37f85e5261ec0d09407d8bed upstream. This function will be needed by the next patch where the driver calculates the BW based on driver specific parameters, so export it. At the same time sanitize the function params, passing the more natural link rate instea

AW: [PATCH] drm/amdgpu: fix potential integer overflow on shift of a int

2021-02-08 Thread Walter Harms
thx for info Von: Christian König Gesendet: Montag, 8. Februar 2021 13:14:49 An: Walter Harms; Colin King; Alex Deucher; David Airlie; Daniel Vetter; Huang Rui; Junwei Zhang; amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org Cc: kernel-janit.

Re: [PATCH v4 11/14] drm/amdgpu: Guard against write accesses after device removal

2021-02-08 Thread Daniel Vetter
On Mon, Feb 8, 2021 at 3:00 PM Christian König wrote: > > Am 08.02.21 um 11:11 schrieb Daniel Vetter: > > On Mon, Feb 08, 2021 at 11:03:15AM +0100, Christian König wrote: > >> Am 08.02.21 um 10:48 schrieb Daniel Vetter: > >>> On Mon, Feb 08, 2021 at 10:37:19AM +0100, Christian König wrote: >

[PATCH v2] drm: DRM_FOURCC_STANDALONE macro support

2021-02-08 Thread James Park
Use DRM_FOURCC_STANDALONE to include drm_fourcc.h without drm.h. Copy type definitions from drm.h to drm_fourcc.h, and wrap with DRM_BASIC_TYPED_DEFINED to avoid redundant inclusion. This will allow code to avoid unnecessary definitions. Signed-off-by: James Park Acked-by: Simon Ser --- Add Ac

Re: [PATCH 2/3] drm/ttm: move memory accounting into vmwgfx v4

2021-02-08 Thread Nirmoy
Hi Christian, On 2/8/21 2:32 PM, Christian König wrote: This is just another feature which is only used by VMWGFX, so move it into the driver instead. I've tried to add the accounting sysfs file to the kobject of the drm minor, but I'm not 100% sure if this works as expected. v2: fix typo in

[RFC PATCH 0/8] Host1x context isolation support

2021-02-08 Thread Mikko Perttunen
Hi all, this series adds support for Host1x 'context isolation'. Since when programming engines through Host1x, userspace can program in any addresses it wants, we need some way to isolate the engines' memory spaces. Traditionally this has either been done imperfectly with a single shared IOMMU do

[RFC PATCH 2/8] gpu: host1x: Add context bus

2021-02-08 Thread Mikko Perttunen
The context bus is a "dummy" bus that contains struct devices that correspond to IOMMU contexts assigned through Host1x to processes. Even when host1x itself is built as a module, the bus is registered in built-in code so that the built-in ARM SMMU driver is able to reference it. Signed-off-by: M

[RFC PATCH 4/8] gpu: host1x: Program context stream ID on submission

2021-02-08 Thread Mikko Perttunen
Add code to do stream ID switching at the beginning of a job. The stream ID is switched to the stream ID specified by the context passed in the job structure. Before switching the stream ID, an OP_DONE wait is done on the channel's engine to ensure that there is no residual ongoing work that might

[RFC PATCH 8/8] drm/tegra: vic: Implement get_streamid_offset

2021-02-08 Thread Mikko Perttunen
Implement the get_streamid_offset required for supporting context isolation. Since old firmware cannot support context isolation without hacks that we don't want to implement, check the firmware binary to see if context isolation should be enabled. Signed-off-by: Mikko Perttunen --- drivers/gpu/

[RFC PATCH 1/8] of/device: Allow specifying a custom iommu_spec to of_dma_configure

2021-02-08 Thread Mikko Perttunen
To allow for more customized device tree bindings that point to IOMMUs, allow manual specification of iommu_spec to of_dma_configure. The initial use case for this is with Host1x, where the driver manages a set of device tree-defined IOMMU contexts that are dynamically allocated to various users.

[RFC PATCH 5/8] iommu/arm-smmu: Attach to host1x context device bus

2021-02-08 Thread Mikko Perttunen
Set itself as the IOMMU for the host1x context device bus, containing "dummy" devices used for Host1x context isolation. Signed-off-by: Mikko Perttunen --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu

[RFC PATCH 7/8] drm/tegra: Support context isolation

2021-02-08 Thread Mikko Perttunen
For engines that support context isolation, allocate a context when opening a channel, and set up stream ID offset and context fields when submitting a job. Signed-off-by: Mikko Perttunen --- drivers/gpu/drm/tegra/drm.h | 1 + drivers/gpu/drm/tegra/uapi.h| 1 + drivers/gpu/drm/

[RFC PATCH 3/8] gpu: host1x: Add context device management code

2021-02-08 Thread Mikko Perttunen
Add code to register context devices from device tree, allocate them out and manage their refcounts. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/Makefile | 1 + drivers/gpu/host1x/context.c | 161 +++ drivers/gpu/host1x/context.h | 27 ++ drivers

[RFC PATCH 6/8] arm64: tegra: Add Host1x context stream IDs on Tegra186+

2021-02-08 Thread Mikko Perttunen
Add Host1x context stream IDs on systems that support Host1x context isolation. Host1x and attached engines can use these stream IDs to allow isolation between memory used by different processes. The specified stream IDs must match those configured by the hypervisor, if one is present. Signed-off

Re: [RFC PATCH 1/8] of/device: Allow specifying a custom iommu_spec to of_dma_configure

2021-02-08 Thread Mikko Perttunen
On 2/8/21 6:38 PM, Mikko Perttunen wrote: ... -static int of_iommu_xlate(struct device *dev, - struct of_phandle_args *iommu_spec) +int of_iommu_xlate(struct device *dev, struct of_phandle_args *iommu_spec) ... +EXPORT_SYMBOL_GPL(of_iommu_xlate); These two chunks shou

Re: [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-08 Thread Ville Syrjälä
On Mon, Feb 08, 2021 at 10:56:36AM +0100, Daniel Vetter wrote: > On Fri, Feb 05, 2021 at 11:19:19PM +0200, Ville Syrjälä wrote: > > On Fri, Feb 05, 2021 at 06:24:08PM +0200, Ville Syrjälä wrote: > > > On Fri, Feb 05, 2021 at 04:46:27PM +0100, Daniel Vetter wrote: > > > > On Thu, Feb 04, 2021 at 05:

Re: [PATCH] drm/qxl: properly handle device init failures

2021-02-08 Thread Tong Zhang
Does this patch fix an issue raised previously? Or should they be used together? https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2466541.html IMHO using this patch alone won’t fix the issue -- Best, - Tong

Re: [PATCH] drm/qxl: properly handle device init failures

2021-02-08 Thread Tong Zhang
Does this patch fix an issue raised previously? Or should they be used together? https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2466541.html IMHO using this patch alone won’t fix the issue -- Best, - Tong > On Feb 8, 2021, at 5:41 AM, Gerd Hoffmann wrote: > > Specifically do not

Re: [PATCH v2 0/2] drm/vboxvideo: Use struct drm_shadow_plane_state for cursor plane

2021-02-08 Thread Hans de Goede
Hi, On 2/8/21 2:50 PM, Thomas Zimmermann wrote: > (was: drm/vboxvideo: Vmap/vunmap cursor BO in prepare_fb and cleanup_fb) > > Functions in the atomic commit tail are not allowed to acquire the > dmabuf's reservation lock. So we cannot legally call the GEM object's > vmap functionality in atomic_

Re: [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-08 Thread Daniel Vetter
On Mon, Feb 8, 2021 at 5:58 PM Ville Syrjälä wrote: > > On Mon, Feb 08, 2021 at 10:56:36AM +0100, Daniel Vetter wrote: > > On Fri, Feb 05, 2021 at 11:19:19PM +0200, Ville Syrjälä wrote: > > > On Fri, Feb 05, 2021 at 06:24:08PM +0200, Ville Syrjälä wrote: > > > > On Fri, Feb 05, 2021 at 04:46:27PM

[PATCH v4] drm/panel: simple: add SGD GKTW70SDAD1SD

2021-02-08 Thread Oliver Graute
Add support for the Solomon Goldentek Display Model: GKTW70SDAD1SD to panel-simple. The panel spec from Variscite can be found at: https://www.variscite.com/wp-content/uploads/2017/12/VLCD-CAP-GLD-RGB.pdf Signed-off-by: Oliver Graute Reviewed-by: Marco Felsch Reviewed-by: Fabio Estevam --- v4

[PATCH AUTOSEL 5.10 20/36] drm/amd/display: Fix DPCD translation for LTTPR AUX_RD_INTERVAL

2021-02-08 Thread Sasha Levin
From: George Shen [ Upstream commit 2b6b7ab4b1cabfbee1af5d818efcab5d51d62c7e ] [Why] The translation between the DPCD value and the specified AUX_RD_INTERVAL in the DP spec do not match. [How] Update values to match the spec. Signed-off-by: George Shen Reviewed-by: Wenjing Liu Acked-by: Anso

[PATCH AUTOSEL 5.10 21/36] drm/amd/display: Add more Clock Sources to DCN2.1

2021-02-08 Thread Sasha Levin
From: Sung Lee [ Upstream commit 1622711beebe887e4f0f8237fea1f09bb48e9a51 ] [WHY] When enabling HDMI on ComboPHY, there are not enough clock sources to complete display detection. [HOW] Initialize more clock sources. Signed-off-by: Sung Lee Reviewed-by: Tony Cheng Acked-by: Anson Jacob Test

[PATCH AUTOSEL 5.10 22/36] drm/amd/display: Release DSC before acquiring

2021-02-08 Thread Sasha Levin
From: Mikita Lipski [ Upstream commit 58180a0cc0c57fe62a799a112f95b60f6935bd96 ] [why] Need to unassign DSC from pipes that are not using it so other pipes can acquire it. That is needed for asic's that have unmatching number of DSC engines from the number of pipes. [how] Before acquiring dsc t

[PATCH AUTOSEL 5.10 23/36] drm/amd/display: Fix dc_sink kref count in emulated_link_detect

2021-02-08 Thread Sasha Levin
From: Victor Lu [ Upstream commit 3ddc818d9bb877c64f5c649beab97af86c403702 ] [why] prev_sink is not used anywhere else in the function and the reference to it from dc_link is replaced with a new dc_sink. [how] Change dc_sink_retain(prev_sink) to dc_sink_release(prev_sink). Signed-off-by: Victo

[PATCH AUTOSEL 5.10 24/36] drm/amd/display: Free atomic state after drm_atomic_commit

2021-02-08 Thread Sasha Levin
From: Victor Lu [ Upstream commit 2abaa323d744011982b20b8f3886184d56d23946 ] [why] drm_atomic_commit was changed so that the caller must free their drm_atomic_state reference on successes. [how] Add drm_atomic_commit_put after drm_atomic_commit call in dm_force_atomic_commit. Signed-off-by: Vi

[PATCH AUTOSEL 5.10 25/36] drm/amd/display: Decrement refcount of dc_sink before reassignment

2021-02-08 Thread Sasha Levin
From: Victor Lu [ Upstream commit 8e92bb0fa75bca9a57e4aba2e36f67d8016a3053 ] [why] An old dc_sink state is causing a memory leak because it is missing a dc_sink_release before a new dc_sink is assigned back to aconnector->dc_sink. [how] Decrement the dc_sink refcount before reassigning it to a

[PATCH AUTOSEL 5.4 10/19] drm/amd/display: Add more Clock Sources to DCN2.1

2021-02-08 Thread Sasha Levin
From: Sung Lee [ Upstream commit 1622711beebe887e4f0f8237fea1f09bb48e9a51 ] [WHY] When enabling HDMI on ComboPHY, there are not enough clock sources to complete display detection. [HOW] Initialize more clock sources. Signed-off-by: Sung Lee Reviewed-by: Tony Cheng Acked-by: Anson Jacob Test

[PATCH AUTOSEL 5.4 11/19] drm/amd/display: Fix dc_sink kref count in emulated_link_detect

2021-02-08 Thread Sasha Levin
From: Victor Lu [ Upstream commit 3ddc818d9bb877c64f5c649beab97af86c403702 ] [why] prev_sink is not used anywhere else in the function and the reference to it from dc_link is replaced with a new dc_sink. [how] Change dc_sink_retain(prev_sink) to dc_sink_release(prev_sink). Signed-off-by: Victo

[PATCH AUTOSEL 5.4 12/19] drm/amd/display: Free atomic state after drm_atomic_commit

2021-02-08 Thread Sasha Levin
From: Victor Lu [ Upstream commit 2abaa323d744011982b20b8f3886184d56d23946 ] [why] drm_atomic_commit was changed so that the caller must free their drm_atomic_state reference on successes. [how] Add drm_atomic_commit_put after drm_atomic_commit call in dm_force_atomic_commit. Signed-off-by: Vi

[PATCH AUTOSEL 5.4 13/19] drm/amd/display: Decrement refcount of dc_sink before reassignment

2021-02-08 Thread Sasha Levin
From: Victor Lu [ Upstream commit 8e92bb0fa75bca9a57e4aba2e36f67d8016a3053 ] [why] An old dc_sink state is causing a memory leak because it is missing a dc_sink_release before a new dc_sink is assigned back to aconnector->dc_sink. [how] Decrement the dc_sink refcount before reassigning it to a

[PATCH AUTOSEL 4.19 07/14] drm/amd/display: Fix dc_sink kref count in emulated_link_detect

2021-02-08 Thread Sasha Levin
From: Victor Lu [ Upstream commit 3ddc818d9bb877c64f5c649beab97af86c403702 ] [why] prev_sink is not used anywhere else in the function and the reference to it from dc_link is replaced with a new dc_sink. [how] Change dc_sink_retain(prev_sink) to dc_sink_release(prev_sink). Signed-off-by: Victo

[PATCH AUTOSEL 4.19 08/14] drm/amd/display: Free atomic state after drm_atomic_commit

2021-02-08 Thread Sasha Levin
From: Victor Lu [ Upstream commit 2abaa323d744011982b20b8f3886184d56d23946 ] [why] drm_atomic_commit was changed so that the caller must free their drm_atomic_state reference on successes. [how] Add drm_atomic_commit_put after drm_atomic_commit call in dm_force_atomic_commit. Signed-off-by: Vi

Re: [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-08 Thread Ville Syrjälä
On Mon, Feb 08, 2021 at 06:43:53PM +0100, Daniel Vetter wrote: > On Mon, Feb 8, 2021 at 5:58 PM Ville Syrjälä > wrote: > > > > On Mon, Feb 08, 2021 at 10:56:36AM +0100, Daniel Vetter wrote: > > > On Fri, Feb 05, 2021 at 11:19:19PM +0200, Ville Syrjälä wrote: > > > > On Fri, Feb 05, 2021 at 06:24:0

[Bug 202043] amdgpu: Vega 56 SCLK drops to 700 Mhz when undervolting

2021-02-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=202043 Bruno Jacquet (maxi...@free.fr) changed: What|Removed |Added CC||maxi...@free.fr --- Com

Re: [PATCH v4 24/80] drm/omap: dsi: move TE GPIO handling into core

2021-02-08 Thread Tony Lindgren
Hi, * Tomi Valkeinen [201124 12:47]: > From: Sebastian Reichel > > In preparation for removing custom DSS calls from the DSI > panel driver, this moves support for external tearing event > GPIOs into the DSI host driver. This way tearing events are > always handled in the core resulting in simp

Re: [PATCH] drm/msm/dp: Add a missing semi-colon

2021-02-08 Thread Stephen Boyd
Quoting Joe Perches (2021-02-06 21:06:54) > On Sat, 2021-02-06 at 20:18 -0800, Stephen Boyd wrote: > > A missing semicolon here causes my external display to stop working. > > Indeed, missing the semicolon on the return statement leads to > > dp_panel_update_tu_timings() not existing because the co

[PATCH] drm/msm: fix a6xx_gmu_clear_oob

2021-02-08 Thread Jonathan Marek
The cleanup patch broke a6xx_gmu_clear_oob, fix it by adding the missing bitshift operation. Fixes: 555c50a4a19b ("drm/msm: Clean up GMU OOB set/clear handling") Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

Re: [PATCH v2 1/5] clk: sunxi-ng: mp: fix parent rate change flag check

2021-02-08 Thread Stephen Boyd
Quoting Jernej Skrabec (2021-02-08 04:17:48) > CLK_SET_RATE_PARENT flag is checked on parent clock instead of current > one. Fix that. > > Fixes: 3f790433c3cb ("clk: sunxi-ng: Adjust MP clock parent rate when > allowed") > Reviewed-by: Chen-Yu Tsai > Tested-by: Andre Heider > Signed-off-by: Jer

  1   2   >