amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Simon Ser <contact@emersion.fr>
To: Harry Wentland <harry.wentland@amd.com>
Cc: "Kazlauskas, Nicholas" <nicholas.kazlauskas@amd.com>,
	Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>,
	amd-gfx@lists.freedesktop.org, Sean Paul <seanpaul@chromium.org>,
	Hersen Wu <hersenxs.wu@amd.com>, Louis Li <Ching-shih.Li@amd.com>
Subject: Re: [PATCH v2] drm/amd/display: Fix two cursor duplication when using overlay
Date: Fri, 27 Aug 2021 13:53:51 +0000	[thread overview]
Message-ID: <v7wPXeGl1gSs2otq7y-EJar0E_NLb4b6YxLZvzleaUPOy5jFuCOpuVFqTRWdGVJ7CP561cBXhfYy-TlQgIlX5vhxtqE64mBtt_cvtIyytXw=@emersion.fr> (raw)
In-Reply-To: <7a1d1909-cead-16ef-7b22-b2adc0cf3ee2@amd.com>

On Tuesday, August 24th, 2021 at 18:48, Harry Wentland <harry.wentland@amd.com> wrote:

> To elaborate on this a bit more, each HW plane's scanout engine
> has the ability to scan out a cursor, in addition to the plane's
> framebuffer. This cursor is drawn onto the plane at the scanout
> phase. Any further scaling, color processing, or other operation
> on the pipe will equally apply to the cursor as to the framebuffer
> itself.
>
> Our driver will look at the cursor position and place the cursor
> with the topmost HW plane at that position.

Ah. I may have missed something in my previous email then. With the
scenario I've described:

┌────────────────────────────┐
│Primary                     │
│                            │
│                            │
│        ┌───────┐           │
│        │Cursor │           │
│        │       │           │
│        │   ┌───┼────────┐  │
│        └───┼───┘        │  │
│            │            │  │
│            │            │  │
│            │     Overlay│  │
│            └────────────┘  │
│                            │
└────────────────────────────┘

Is it possible to draw the cursor only on the overlay pipe (not on the primary
pipe), even though the overlay pipe doesn't cover the whole CRTC?

Or will the overlay pipe crop the cursor image?

> If I understood Simon right the primary plane (bottom-most,
> game plane) might not cover the entire screen, which is fine.

Yes.

> Is the Steam overlay always the size of the crtc, or does it
> match the size of the game plane, or is it unrelated to either?

The overlay may not cover the whole CRTC. The usual case is some kind of
notification bubble showing in a corner. See the drawing above.

> >>>>> Basically, we cannot draw the cursor at the same size and position on
> >>>>> two separated pipes since it uses extra bandwidth and DML only run
> >>>>> with one cursor.
> >>>>
> >>>> I don't understand this limitation. Why would it be necessary to draw the
> >>>> cursor on two separate pipes? Isn't it only necessary to draw it once on
> >>>> the overlay pipe, and not draw it on the primary pipe?
> >>>
> >>> I will try to provide some background. Harry and Nick, feel free to
> >>> correct me or add extra information.
> >>>
> >>> In the amdgpu driver and from the DRM perspective, we expose cursors as
> >>> a plane, but we don't have a real plane dedicated to cursors from the
> >>> hardware perspective. We have part of our HUPB handling cursors (see
> >>> commit "drm/amd/display: Add DCN3.1 DCHHUB" for a hardware block
> >>> overview), which requires a different way to deal with the cursor plane
> >>> since they are not planes in the hardware.
> >>
> >> What are DCHUBBUB and MMHUBBUB responsible for? Is one handling the primary
> >> plane and the other handling the overlay plane? Or something else entirely?
>
> MMHUBBUB > DCHUBBUB > HUBP (for each pipe)
>
> MMHUBBUB is irrelevant if DWB (display writeback) is not used. DWB is not
> enabled in the driver.
>
> DCHUBBUB is the overall scanout engine for all DC pipes and includes a
> HUBP per pipe.
>
> HUBP will have requestors for the primary framebuffer, DCC meta, dynamic
> metadata (for things like Dolby HDR, though it's not fully implemented),
> and cursor data.

I see. Thanks!

  reply	other threads:[~2021-08-27 13:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14  0:06 [PATCH v2] drm/amd/display: Fix two cursor duplication when using overlay Rodrigo Siqueira
2021-04-14 13:29 ` Harry Wentland
2021-05-10  2:20 ` youling257
2021-05-11  0:37   ` Rodrigo Siqueira
2021-05-11  1:47     ` youling 257
2021-08-18 10:48 ` Simon Ser
2021-08-18 13:18   ` Rodrigo Siqueira
2021-08-24 13:59     ` Simon Ser
2021-08-24 14:56       ` Kazlauskas, Nicholas
2021-08-24 16:48         ` Harry Wentland
2021-08-27 13:53           ` Simon Ser [this message]
2021-08-27 14:04             ` Harry Wentland
2021-08-27 14:12               ` Simon Ser
2021-08-27 13:47         ` Simon Ser

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='v7wPXeGl1gSs2otq7y-EJar0E_NLb4b6YxLZvzleaUPOy5jFuCOpuVFqTRWdGVJ7CP561cBXhfYy-TlQgIlX5vhxtqE64mBtt_cvtIyytXw=@emersion.fr' \
    --to=contact@emersion.fr \
    --cc=Ching-shih.Li@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=hersenxs.wu@amd.com \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=seanpaul@chromium.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).