All of lore.kernel.org
 help / color / mirror / Atom feed
From: <sunpeng.li@amd.com>
To: <dri-devel@lists.freedesktop.org>, <amd-gfx@lists.freedesktop.org>
Cc: "Joshua Ashton" <joshua@froggi.es>,
	"Michel Dänzer" <mdaenzer@redhat.com>,
	"Chao Guo" <chao.guo@nxp.com>,
	"Xaver Hugl" <xaver.hugl@gmail.com>,
	"Vikas Korjani" <Vikas.Korjani@amd.com>,
	"Robert Mader" <robert.mader@posteo.de>,
	"Pekka Paalanen" <pekka.paalanen@collabora.com>,
	"Sean Paul" <sean@poorly.run>, "Simon Ser" <contact@emersion.fr>,
	"Shashank Sharma" <shashank.sharma@amd.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Sebastian Wick" <sebastian.wick@redhat.com>,
	"Leo Li" <sunpeng.li@amd.com>
Subject: [PATCH 0/2] drm/amdgpu/display: Make multi-plane configurations more flexible
Date: Fri, 15 Mar 2024 13:09:56 -0400	[thread overview]
Message-ID: <20240315170959.165505-1-sunpeng.li@amd.com> (raw)

From: Leo Li <sunpeng.li@amd.com>

These patches aim to make the amdgpgu KMS driver play nicer with compositors
when building multi-plane scanout configurations. They do so by:

1. Making cursor behavior more sensible.
2. Allowing placement of DRM OVERLAY planes underneath the PRIMARY plane for
   'underlay' configurations (perhaps more of a RFC, see below).

Please see the commit messages for details.


For #2, the simplest way to accomplish this was to increase the value of the
immutable zpos property for the PRIMARY plane. This allowed OVERLAY planes with
a mutable zpos range of (0-254) to be positioned underneath the PRIMARY for an
underlay scanout configuration.

Technically speaking, DCN hardware does not have a concept of primary or overlay
planes - there are simply 4 general purpose hardware pipes that can be maped in
any configuration. So the immutable zpos restriction on the PRIMARY plane is
kind of arbitrary; it can have a mutable range of (0-254) just like the
OVERLAYs. The distinction between PRIMARY and OVERLAY planes is also somewhat
arbitrary. We can interpret PRIMARY as the first plane that should be enabled on
a CRTC, but beyond that, it doesn't mean much for amdgpu.

Therefore, I'm curious about how compositors devs understand KMS planes and
their zpos properties, and how we would like to use them. It isn't clear to me
how compositors wish to interpret and use the DRM zpos property, or
differentiate between OVERLAY and PRIMARY planes, when it comes to setting up
multi-plane scanout.

Ultimately, what I'd like to answer is "What can we do on the KMS driver and DRM
plane API side, that can make building multi-plane scanout configurations easier
for compositors?" I'm hoping we can converge on something, whether that be
updating the existing documentation to better define the usage, or update the
API to provide support for something that is lacking.

Thanks,
Leo


Some links to provide context and details:
* What is underlay?: https://gitlab.freedesktop.org/emersion/libliftoff/-/issues/76
* Discussion on how to implement underlay on Weston: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1258#note_2325164

Cc: Joshua Ashton <joshua@froggi.es>
Cc: Michel Dänzer <mdaenzer@redhat.com>
Cc: Chao Guo <chao.guo@nxp.com>
Cc: Xaver Hugl <xaver.hugl@gmail.com>
Cc: Vikas Korjani <Vikas.Korjani@amd.com>
Cc: Robert Mader <robert.mader@posteo.de>
Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Simon Ser <contact@emersion.fr>
Cc: Shashank Sharma <shashank.sharma@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Sebastian Wick <sebastian.wick@redhat.com>

Leo Li (2):
  drm/amd/display: Introduce overlay cursor mode
  drm/amd/display: Move PRIMARY plane zpos higher

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 405 ++++++++++++++++--
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |   7 +
 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    |   1 +
 .../amd/display/amdgpu_dm/amdgpu_dm_plane.c   |  28 +-
 4 files changed, 391 insertions(+), 50 deletions(-)

-- 
2.44.0


             reply	other threads:[~2024-03-15 17:11 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 17:09 sunpeng.li [this message]
2024-03-15 17:09 ` [PATCH 1/2] drm/amd/display: Introduce overlay cursor mode sunpeng.li
2024-03-16  8:38   ` kernel test robot
2024-03-21 21:39   ` Harry Wentland
2024-03-28 15:16   ` Pekka Paalanen
2024-03-28 15:48   ` Robert Mader
2024-03-28 15:52     ` Harry Wentland
2024-04-01 14:38       ` Leo Li
2024-03-15 17:09 ` [PATCH 2/2] drm/amd/display: Move PRIMARY plane zpos higher sunpeng.li
2024-03-21 21:36   ` Harry Wentland
2024-03-28 15:20   ` Pekka Paalanen
2024-03-28 14:33 ` [PATCH 0/2] drm/amdgpu/display: Make multi-plane configurations more flexible Pekka Paalanen
2024-04-03 21:32   ` Leo Li
2024-04-04 10:24     ` Pekka Paalanen
2024-04-04 13:59       ` Harry Wentland
2024-04-04 14:22         ` Marius Vlad
2024-04-11 20:33           ` Leo Li
2024-04-12  8:03             ` Pekka Paalanen
2024-04-12 14:28               ` Leo Li
2024-04-12 15:07                 ` Pekka Paalanen
2024-04-12 15:31                   ` Alex Deucher
2024-04-12 20:14                     ` Leo Li
2024-04-15  8:19                       ` Pekka Paalanen
2024-04-15 22:33                         ` Leo Li
2024-04-16  8:01                           ` Pekka Paalanen
2024-04-16 14:10                             ` Harry Wentland
2024-04-17 18:51                               ` Leo Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240315170959.165505-1-sunpeng.li@amd.com \
    --to=sunpeng.li@amd.com \
    --cc=Vikas.Korjani@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=chao.guo@nxp.com \
    --cc=contact@emersion.fr \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=joshua@froggi.es \
    --cc=mdaenzer@redhat.com \
    --cc=pekka.paalanen@collabora.com \
    --cc=robert.mader@posteo.de \
    --cc=sean@poorly.run \
    --cc=sebastian.wick@redhat.com \
    --cc=shashank.sharma@amd.com \
    --cc=xaver.hugl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.