Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Issue 2743403005: ozone: Add an opaque fb to ScanoutBuffer for primary planes. (Closed)

Created:
3 years, 9 months ago by Daniele Castagna
Modified:
3 years, 9 months ago
CC:
chromium-reviews, kalyank, ozone-reviews_chromium.org, piman+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ozone: Add an opaque fb to ScanoutBuffer for primary planes. While all planes on rockchip support alpha, scanning out a primary plane with an fb that was created with a format with alpha will result in black pixels. This patch adds an additional fb to a ScanoutBuffer to be used for the primary plane. When a buffer is created with a format that has alpha (e.g: RGBA), an additional fb with a format without alpha (e.g. RGBX) will be added for the same buffer. In this way, when the buffer is scheduled for scanout as primary plane we can use the fb added with a format without alpha and actually see colors on the screen, instead of having everything black. BUG=695296 Review-Url: https://codereview.chromium.org/2743403005 Cr-Commit-Position: refs/heads/master@{#457482} Committed: https://chromium.googlesource.com/chromium/src/+/9d7a8aef95959ab06d2b565fe129fd27ed42b963

Patch Set 1 #

Patch Set 2 : Make legacy pageflip use primary plane fb. #

Patch Set 3 : Fix DrmOverlayValidatorTest unittests. #

Patch Set 4 : Replace PrimaryPlane with Opaque. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -13 lines) Patch
M ui/ozone/platform/drm/common/drm_util.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/ozone/platform/drm/common/drm_util.cc View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_buffer.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_buffer.cc View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_overlay_validator.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_buffer_base.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_buffer_base.cc View 1 2 3 4 chunks +18 lines, -5 lines 0 comments Download
M ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/ozone/platform/drm/gpu/mock_scanout_buffer.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/mock_scanout_buffer.cc View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/scanout_buffer.h View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/screen_manager.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 29 (18 generated)
Daniele Castagna
3 years, 9 months ago (2017-03-15 16:20:11 UTC) #5
hoegsberg1
This looks good to me, though I'd suggest calling it OpaqueFramebuffer instead of PrimaryPlaneFramebuffer throughout.
3 years, 9 months ago (2017-03-15 18:05:29 UTC) #11
reveman
On 2017/03/15 at 18:05:29, hoegsberg wrote: > This looks good to me, though I'd suggest ...
3 years, 9 months ago (2017-03-15 18:21:46 UTC) #12
Daniele Castagna
Replaced PrimaryPlane with Opaque. PTAL.
3 years, 9 months ago (2017-03-15 21:56:26 UTC) #14
reveman
lgtm
3 years, 9 months ago (2017-03-15 21:58:50 UTC) #17
Daniele Castagna
+dnicoara for ownership.
3 years, 9 months ago (2017-03-15 21:59:32 UTC) #19
dnicoara
lgtm For clarity, is this a quirk in the driver (ie: rockchip)? This is what ...
3 years, 9 months ago (2017-03-16 17:24:14 UTC) #22
hoegsberg1
On 2017/03/16 17:24:14, dnicoara wrote: > lgtm > > For clarity, is this a quirk ...
3 years, 9 months ago (2017-03-16 17:29:41 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2743403005/60001
3 years, 9 months ago (2017-03-16 17:39:34 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/9d7a8aef95959ab06d2b565fe129fd27ed42b963
3 years, 9 months ago (2017-03-16 17:45:50 UTC) #28
dnicoara
3 years, 9 months ago (2017-03-16 17:47:49 UTC) #29
Message was sent while issue was closed.
On 2017/03/16 17:29:41, hoegsberg1 wrote:
> On 2017/03/16 17:24:14, dnicoara wrote:
> > lgtm
> > 
> > For clarity, is this a quirk in the driver (ie: rockchip)? This is what I
> gather
> > from the comment in drm_util.cc. Or is is a composition issue in Chrome
where
> > the alpha isn't set correctly?
> 
> It's not so much a quirk - it if is it would be in the KMS API. There's no way
> to tell KMS to not blend a buffer if you've created the KMS fb with a format
> that has alpha channel. Alternatively, there is, and the way you do it is this
-
> create a KMS fb without the alpha channel format. (ie XRGB for ARGB).

Thanks, Daniele gave me more details as well.

Powered by Google App Engine
This is Rietveld 408576698