New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 792757 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 705611
issue 749250



Sign in to add a comment

Add support for KMS color transform matrix plane property.

Project Member Reported by dcasta...@chromium.org, Dec 7 2017

Issue description

Patches have been posted upstream to expose CTM property on Intel: http://www.spinics.net/lists/intel-gfx/msg140101.html.

We need to:
- Merge those patches to 4.4 and verify they work.
- Plumb the property from OverlayCandidates to KMS in Chromium.
- Figure out what to do with other platforms (mainly rockchip) that haven't exposed the property yet.
 
- Figure out if we can use the per-plane CSC matrix for night mode
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e876a33d7d1826b881d4e7e32debab731ff4a8d

commit 2e876a33d7d1826b881d4e7e32debab731ff4a8d
Author: Daniele Castagna <dcastagna@chromium.org>
Date: Thu Dec 07 05:59:09 2017

Add a TODO to track HW overlay plane CSC.

This CL just adds a TODO in the overlay candidate code, where we
currently reject HW overlays candidates if they have a color
transform matrix, since we should be able to handle those
once  crbug.com/792757  is addressed.


Bug:  792757 
TBR: reveman
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: If0211c553d82dfca212d6e9b52e0ebfd5f861dd1
Reviewed-on: https://chromium-review.googlesource.com/813062
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522356}
[modify] https://crrev.com/2e876a33d7d1826b881d4e7e32debab731ff4a8d/cc/output/overlay_candidate.cc

Cc: afakhry@chromium.org ovanieva@chromium.org
Labels: M-66
Patches from intel-gfx mailing list have been rebased (not landed) on 4.4 without issues: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/833194

Unfortunately they don't contain any implementation but just the proposed design.

As already discussed with ovanieva@, it makes sense to target m66 for this feature.
Blocking: 705611
Blocking: 749250
With https://crrev.com/c/871874 it is possible to set a per-plane 3X3 matrix on the primary plane and overlays on rk3399.

A drm test at https://crrev.com/c/871230
Project Member

Comment 8 by bugdroid1@chromium.org, Jan 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/drm-tests/+/4d527ab2ae035649d5f8645a6b887f337134efa9

commit 4d527ab2ae035649d5f8645a6b887f337134efa9
Author: Daniele Castagna <dcastagna@chromium.org>
Date: Sat Jan 20 04:35:45 2018

drm-tests: add 'plane_ctm' test.

This adds a test for the drm property 'PLANE_CTM' that allows
a client to set a per-plane color RGB to RGB transform matrix.
The property is a blob that is interepreted as a 3x3 matrix as
defined by drm_color_ctm.

BUG= chromium:792757 
TEST=atomictest -t plane_ctm on scarlet

Change-Id: Iad33e1ea044c429c9aca7d81eccd158099890cac
Reviewed-on: https://chromium-review.googlesource.com/871230
Commit-Ready: Daniele Castagna <dcastagna@chromium.org>
Tested-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

[modify] https://crrev.com/4d527ab2ae035649d5f8645a6b887f337134efa9/atomictest.c

Comment 9 by ovanieva@google.com, Feb 12 2018

Labels: -M-66 M-67
updating to 67 after conversation with dcastagna@, as more time needed to implement the changes upstream.  
Project Member

Comment 10 by bugdroid1@chromium.org, Mar 8 2018

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/6a53d275d91b51796448b093ee1b82e652ba7e55

commit 6a53d275d91b51796448b093ee1b82e652ba7e55
Author: Felix Monninger <felix.monninger@gmail.com>
Date: Thu Mar 08 00:54:53 2018

UPSTREAM: drm: Release reference from blob lookup after replacing property

drm_property_lookup_blob() returns a reference to the returned blob, and
drm_atomic_replace_property_blob() takes a references to the blob it
stores, so afterwards we are left owning a reference to the new_blob that
we never release, and thus leak memory every time we update a property
such as during drm_atomic_helper_legacy_gamma_set().

v2: update credentials, drm_property_unreference_blob() is NULL safe and
NULL is passed consistently to it throughout drm_atomic.c so do so here.

BUG= chromium:792757 
TEST=atomictest -t plane_ctm on scarlet

Reported-by: Felix Monninger <felix.monninger@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98420
Signed-off-by: Felix Monninger <felix.monninger@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
Fixes: 5488dc16fde7 ("drm: introduce pipe color correction properties")
Reviewed-by: Ville Syrjl <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161025212808.3908-1-chris@chris-wilson.co.uk
(cherry picked from commit cac5fcedaabdadf150c8a9be9fee76defc8ba444)
Signed-off-by: Daniele Castagna <dcastagna@chromium.org>

Change-Id: I9889eb1698f2385e1be7393ea36f2a65975b1b70
Reviewed-on: https://chromium-review.googlesource.com/946634
Commit-Ready: Daniele Castagna <dcastagna@chromium.org>
Tested-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/6a53d275d91b51796448b093ee1b82e652ba7e55/drivers/gpu/drm/drm_atomic.c

Project Member

Comment 11 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/939f5f50233ffd563fcce7b068cf3e16aa91930b

commit 939f5f50233ffd563fcce7b068cf3e16aa91930b
Author: Jyri Sarha <jsarha@ti.com>
Date: Thu Mar 08 00:54:55 2018

UPSTREAM: drm: Make drm_atomic_replace_property_blob_from_id() more generic

Change drm_atomic_replace_property_blob_from_id()'s first parameter
from drm_crtc to drm_device, so that the function can be used for other
drm_mode_objects too.

BUG= chromium:792757 
TEST=atomictest -t plane_ctm on scarlet

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/851b8504c7f294a10645ba6f6d391ac9764068b7.1492768073.git.jsarha@ti.com
(cherry picked from commit dafee60d4801a1f4e0e396c91ea0dab3073f9263)
Signed-off-by: Daniele Castagna <dcastagna@chromium.org>

Change-Id: I9e888c00c185ad416167732cb63e277d2bdacb20
Reviewed-on: https://chromium-review.googlesource.com/946635
Commit-Ready: Daniele Castagna <dcastagna@chromium.org>
Tested-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/939f5f50233ffd563fcce7b068cf3e16aa91930b/drivers/gpu/drm/drm_atomic.c

Project Member

Comment 12 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e1eff689f44a71320d4bed8bcf5c6bb564bec366

commit e1eff689f44a71320d4bed8bcf5c6bb564bec366
Author: Uma Shankar <uma.shankar@intel.com>
Date: Thu Mar 08 03:46:55 2018

CHROMIUM: drm: Add Plane CTM property

Add a blob property for plane CSC usage.

BUG= chromium:792757 
TEST=atomictest -t plane_ctm on scarlet
(Original am from https://patchwork.kernel.org/patch/9971339/)

Change-Id: I735f2e8c9e058266286a8a843f5afbe6ae737a10
Signed-off-by: Uma Shankar <uma.shankar at intel.com>
Reviewed-on: https://chromium-review.googlesource.com/833190
Commit-Ready: Daniele Castagna <dcastagna@chromium.org>
Tested-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/e1eff689f44a71320d4bed8bcf5c6bb564bec366/drivers/gpu/drm/drm_atomic.c
[modify] https://crrev.com/e1eff689f44a71320d4bed8bcf5c6bb564bec366/include/drm/drm_plane.h
[modify] https://crrev.com/e1eff689f44a71320d4bed8bcf5c6bb564bec366/drivers/gpu/drm/drm_atomic_helper.c

Project Member

Comment 13 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/099eb37f12fab8cf31db059d5fee9fd5c55a00f5

commit 099eb37f12fab8cf31db059d5fee9fd5c55a00f5
Author: Uma Shankar <uma.shankar@intel.com>
Date: Thu Mar 08 06:08:00 2018

CHROMIUM: drm: Define helper function for plane color enabling

Define helper function to enable Plane color features
to attach plane color properties to plane structure.

BUG= chromium:792757 
TEST=atomictest -t plane_ctm on scarlet
(Original am from https://patchwork.kernel.org/patch/9971333/)

Change-Id: I3568b6e83a4b3ae2486ff9267560f1095bd73553
Signed-off-by: Uma Shankar <uma.shankar at intel.com>
Reviewed-on: https://chromium-review.googlesource.com/833192
Commit-Ready: Daniele Castagna <dcastagna@chromium.org>
Tested-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>

[modify] https://crrev.com/099eb37f12fab8cf31db059d5fee9fd5c55a00f5/include/drm/drm_color_mgmt.h
[modify] https://crrev.com/099eb37f12fab8cf31db059d5fee9fd5c55a00f5/drivers/gpu/drm/drm_plane.c

Project Member

Comment 14 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/bfef071d365a3d42e6526748829b828a3500b794

commit bfef071d365a3d42e6526748829b828a3500b794
Author: Daniele Castagna <dcastagna@chromium.org>
Date: Thu Mar 08 06:08:02 2018

CHROMIUM: rockchip: Implement drm plane->ctm property.

This patch adds YUV2YUV registers to enable and control per-plane
RGB2RGB color space conversion matrix and wires them to be used
with PLANE_CTM matrix drm property.

BUG= chromium:792757 
TEST=atomictest -t plane_ctm on scarlet
(Discusson on dri-devel:
https://lists.freedesktop.org/archives/dri-devel/2018-February/165928.html)

Change-Id: Idf48b2c1e29d6cc4f65fbf061f60feb3cbb96130
Reviewed-on: https://chromium-review.googlesource.com/871873
Commit-Ready: Daniele Castagna <dcastagna@chromium.org>
Tested-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>

[modify] https://crrev.com/bfef071d365a3d42e6526748829b828a3500b794/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
[modify] https://crrev.com/bfef071d365a3d42e6526748829b828a3500b794/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
[modify] https://crrev.com/bfef071d365a3d42e6526748829b828a3500b794/drivers/gpu/drm/rockchip/rockchip_drm_vop.c

Project Member

Comment 15 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/4d29ab10ef66fd69782dd035da3b0aa39dfb4f24

commit 4d29ab10ef66fd69782dd035da3b0aa39dfb4f24
Author: Daniele Castagna <dcastagna@chromium.org>
Date: Thu Mar 08 06:08:04 2018

CHROMIUM: rockchip: Enable 'PLANE_CTM' drm property.

Enable and expose 'PLANE_CTM' matrix on every planes.
The property can be use to set a RGB to RGB 3X3 color conversion
matrix that will be applied to planes at scanout.

BUG= chromium:792757 
TEST=atomictest -t plane_ctm on scarlet
(Discussion on from dri-devel:
https://lists.freedesktop.org/archives/dri-devel/2018-February/165928.html)

Change-Id: Iefc4e5dc10127fb577889858b165b908f82ca405
Reviewed-on: https://chromium-review.googlesource.com/871874
Commit-Ready: Daniele Castagna <dcastagna@chromium.org>
Tested-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/4d29ab10ef66fd69782dd035da3b0aa39dfb4f24/drivers/gpu/drm/rockchip/rockchip_drm_vop.c

Status: Fixed (was: Assigned)
Project Member

Comment 17 by bugdroid1@chromium.org, May 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/drm-tests/+/c9a2a3d449d899da6aabb8f8cdb3cd0910f27b67

commit c9a2a3d449d899da6aabb8f8cdb3cd0910f27b67
Author: Daniel Nicoara <dnicoara@chromium.org>
Date: Fri May 04 10:02:19 2018

drm-tests: Add test for CRTC CTM property

This adds a test for the drm property 'CTM' that allows
a client to set the CRTC color RGB to RGB transform matrix.
The property is a blob that is interepreted as a 3x3 matrix as
defined by drm_color_ctm.

BUG= chromium:792757 
TEST='atomictest -t crtc_ctm' on eve
Change-Id: I946ea2dc527c9666380ac4f7366977f241b43809
Reviewed-on: https://chromium-review.googlesource.com/1026310
Commit-Ready: Daniel Nicoara <dnicoara@chromium.org>
Tested-by: Daniel Nicoara <dnicoara@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

[modify] https://crrev.com/c9a2a3d449d899da6aabb8f8cdb3cd0910f27b67/atomictest.c

Project Member

Comment 18 by bugdroid1@chromium.org, May 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/drm-tests/+/a2cb16743a968cda6ae0b3a1dd740e43da1d4c77

commit a2cb16743a968cda6ae0b3a1dd740e43da1d4c77
Author: Daniel Nicoara <dnicoara@chromium.org>
Date: Sat May 05 03:38:04 2018

drm-tests: Add test for CRTC GAMMA_LUT property

This adds a test for the drm property 'GAMMA_LUT' that allows
a client to set the CRTC gamma lookup table.

The property is a blob that is interpreted as an array of
drm_color_lut structs of the size specified by the 'GAMMA_LUT_SIZE'
property. Use a linear gamma function and a step function to test
functionality.

BUG= chromium:792757 
TEST='atomictest -t crtc_gamma' on eve

Change-Id: I04b481b24aaf2fdecef82f797ec8c0458940f893
Reviewed-on: https://chromium-review.googlesource.com/1030620
Commit-Ready: Daniel Nicoara <dnicoara@chromium.org>
Tested-by: Daniel Nicoara <dnicoara@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

[modify] https://crrev.com/a2cb16743a968cda6ae0b3a1dd740e43da1d4c77/atomictest.c

Sign in to add a comment