linux icon indicating copy to clipboard operation
linux copied to clipboard

Visual DRM plane artifacts on vertical edges.

Open dividuum opened this issue 1 year ago • 5 comments

Describe the bug

While playing around in my software, I managed to come across a DRM plane layout that results in artifacts on vertical plane edges. Look at this screenshot:

screenshot

I'm playing three videos across two displays (separated by the white line in the screenshot). As a result my software splits the middle video into two planes (labeled '2' and '3'). To reduce overdraw, my software also removes the non-visible part of the plane '3' that's hidden behind the plane '4'.

The video is 560x360 pixel, DRM "YU12". The relevant output in /sys/kernel/debug/dri/1/state for plane '3' is:

    crtc-pos=360x848+0+124
    src-pos=65.000000x320.000000+280.000000+0.000000

For plane '4':

    crtc-pos=1560x1080+360+0
    src-pos=560.000000x320.000000+0.000000+0.000000

So plane '4' touches plane '3' at x=360. That edge has odd bleeding of pixels going on:

pixel

Steps to reproduce the behaviour

Not sure yet. That specific configuration doesn't work. Resizing the middle video (and thus plane '2' and '3') likely fixes the issue. Tested only on a Pi5 for now.

Device (s)

Raspberry Pi 5

System

My custom info-beamer OS. Using 6.6.33 kernel from https://github.com/raspberrypi/rpi-firmware:

Linux info-beamer-xxxxxxxxx 6.6.33-v8+ #1770 SMP PREEMPT Wed Jun 12 17:47:55 BST 2024 aarch64 GNU/Linux                                                                                                                                                                                                                                                                                                                                  
2024/06/05 16:41:49 
Copyright (c) 2012 Broadcom
version 6fe0b091 (release) (embedded)

Logs

No response

Additional context

No response

dividuum avatar Jul 11 '24 12:07 dividuum