Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: Brian Starkey <Brian.Starkey@arm.com>,
	Matt Roper <matthew.d.roper@intel.com>
Cc: "wei.c.li@intel.com" <wei.c.li@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>, nd <nd@arm.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"harish.krupo.kps@intel.com" <harish.krupo.kps@intel.com>
Subject: Re: [PATCH v3 2/3] drm: Add CRTC background color property (v3)
Date: Thu, 27 Dec 2018 17:11:17 -0800	[thread overview]
Message-ID: <878t0a5ubu.fsf@anholt.net> (raw)
In-Reply-To: <20181119165222.GB22048@DESKTOP-E1NTVVP.localdomain>


[-- Attachment #1.1: Type: text/plain, Size: 3153 bytes --]

Brian Starkey <Brian.Starkey@arm.com> writes:

> Hi Matt,
>
> On Thu, Nov 15, 2018 at 02:13:45PM -0800, Matt Roper wrote:
>>Some display controllers can be programmed to present non-black colors
>>for pixels not covered by any plane (or pixels covered by the
>>transparent regions of higher planes).  Compositors that want a UI with
>>a solid color background can potentially save memory bandwidth by
>>setting the CRTC background property and using smaller planes to display
>>the rest of the content.
>>
>>To avoid confusion between different ways of encoding RGB data, we
>>define a standard 64-bit format that should be used for this property's
>>value.  Helper functions and macros are provided to generate and dissect
>>values in this standard format with varying component precision values.
>>
>>v2:
>> - Swap internal representation's blue and red bits to make it easier
>>   to read if printed out.  (Ville)
>> - Document bgcolor property in drm_blend.c.  (Sean Paul)
>> - s/background_color/bgcolor/ for consistency between property name and
>>   value storage field.  (Sean Paul)
>> - Add a convenience function to attach property to a given crtc.
>>
>>v3:
>> - Restructure ARGB component extraction macros to be easier to
>>   understand and enclose the parameters in () to avoid calculations
>>   if expressions are passed.  (Sean Paul)
>> - s/rgba/argb/ in helper function/macro names.  Even though the idea is
>>   to not worry about the internal representation of the u64, it can
>>   still be confusing to look at code that uses 'rgba' terminology, but
>>   stores values with argb ordering.  (Ville)
>>
>>Cc: dri-devel@lists.freedesktop.org
>>Cc: wei.c.li@intel.com
>>Cc: harish.krupo.kps@intel.com
>>Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>Cc: Sean Paul <sean@poorly.run>
>>Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
>>Reviewed-by(v2): Sean Paul <sean@poorly.run>
>>---

>
>>+ *	Background color is setup with drm_crtc_add_bgcolor_property().  It
>>+ *	controls the RGB color of a full-screen, fully-opaque layer that exists
>>+ *	below all planes.  This color will be used for pixels not covered by
>>+ *	any plane and may also be blended with plane contents as allowed by a
>>+ *	plane's alpha values.  The background color defaults to black, and is
>>+ *	assumed to be black for drivers that do not expose this property.
>
> Might be worth explicitly mentioning that this value is used as-is,
> without any gamma/gamut conversion before blending, i.e. it's assumed
> to already be in whatever blend-space the CRTC is using (at least I
> assume that's the case?). As we start making the color pipe more
> complicated/explicit, the details matter more.

Raspberry Pi should be able to do background color as well, but the
question of where this property is in the pipeline (particularly for CTM
and gamma) also came up for me.  My background color would apply at the
same stage as plane composition, so before gamma and CTM.

FWIW, my background color on the writeback connector (the only one where
the value would be relevant) can have alpha.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-12-28  1:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 22:13 [PATCH v3 0/3] CRTC background color Matt Roper
2018-11-15 22:13 ` [PATCH v3 1/3] drm/i915: Force background color to black for gen9+ (v2) Matt Roper
2018-11-15 22:13 ` [PATCH v3 2/3] drm: Add CRTC background color property (v2) Matt Roper
2018-11-15 22:13 ` [PATCH v3 2/3] drm: Add CRTC background color property (v3) Matt Roper
2018-11-19 16:52   ` [Intel-gfx] " Brian Starkey
2018-12-28  1:11     ` Eric Anholt [this message]
2018-11-15 22:13 ` [PATCH v3 3/3] drm/i915/gen9+: Add support for pipe background color (v3) Matt Roper
2018-11-15 22:15 ` [PATCH i-g-t v3] tests/kms_crtc_background_color: overhaul for latest ABI proposal (v3) Matt Roper
2018-11-15 22:25 ` ✗ Fi.CI.CHECKPATCH: warning for CRTC background color (rev3) Patchwork
2018-11-15 22:42 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-16  1:36 ` ✓ Fi.CI.IGT: " Patchwork
2018-12-27 23:26 ` [Intel-gfx] [PATCH v3 0/3] CRTC background color Stéphane Marchesin
2018-12-27 23:49   ` Li, Wei C
2018-12-28  0:22     ` Stéphane Marchesin
2018-12-28  0:45       ` Matt Roper
2018-12-28  1:09         ` [Intel-gfx] " Stéphane Marchesin
2018-12-28 11:53           ` Daniel Vetter
2018-12-28 16:35             ` Matt Roper
2018-12-28 17:14               ` Daniel Vetter
2018-12-28 17:19                 ` [Intel-gfx] " Matt Roper
2018-12-28 21:00                   ` Daniel Vetter

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=878t0a5ubu.fsf@anholt.net \
    --to=eric@anholt.net \
    --cc=Brian.Starkey@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harish.krupo.kps@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    --cc=nd@arm.com \
    --cc=wei.c.li@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox