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

Issue 763760 link

Starred by 3 users

Issue metadata

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

Blocking:
issue 772239



Sign in to add a comment

The DRM format modifier UAPI used in ChromeOS is incompatible with upstream

Project Member Reported by tfiga@chromium.org, Sep 11 2017

Issue description

It looks like the modifier API is already present in upstream headers, as per the libdrm commit below.

https://cgit.freedesktop.org/mesa/drm/commit/?id=7ec689a5406a4c5f468e126007c5aa9d72dd7f59

Moreover, it is binary-incompatible with the API used currently in ChromeOS, added in following CL.

https://chromium-review.googlesource.com/419833

We should switch to the upstream API to avoid compatibility problems with upstream libdrm and next ChromeOS kernels (which would contain the official API).
 

Comment 1 by tfiga@chromium.org, Sep 11 2017

Cc: bmgordon@chromium.org
FYI, this was found during investigation of  issue 763739 .

Comment 2 by tfiga@chromium.org, Sep 11 2017

A workaround reverting back to the old structure: crosreview.com/657791
Owner: hoegsberg@google.com
Yeah, that's my mess. Now that upstream has settled on the new API and Intel is using it for their compression, I'll update our RK3399 ioctl and userspace to use the plane blob instead of getplane2.
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 12 2017

Labels: merge-merged-chromeos-2.4.83
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/libdrm/+/8b82aa2cbd013ebe8027590974235170d6c63dc8

commit 8b82aa2cbd013ebe8027590974235170d6c63dc8
Author: Tomasz Figa <tfiga@chromium.org>
Date: Tue Sep 12 08:12:09 2017

HACK: Revert drm_format_modifier API back to the one used in our kernels

It looks like the modifier API is already present in upstream headers, as per
the libdrm commit below.

https://cgit.freedesktop.org/mesa/drm/commit/?id=7ec689a5406a4c5f468e126007c5aa9d72dd7f59

Moreover, it is binary-incompatible with the API used currently in ChromeOS,
added in following CL.

https://chromium-review.googlesource.com/419833

Since our kernels still use the old, incompatible API and transitioning
Chrome, one of the users, between incompatible interfaces have known to
introduce a lot of problems, let's temporarily revert back to the legacy
API.

BUG= chromium:763739 
BUG= chromium:763760 
TEST=test_that kevin video_VideoDecodeAccelerator

Change-Id: I1959d937cfda360f143f6ce3b7181f9686db29ef
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/657791
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Benjamin Gordon <bmgordon@chromium.org>

[modify] https://crrev.com/8b82aa2cbd013ebe8027590974235170d6c63dc8/include/drm/drm_mode.h

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/minigbm/+/bc8c5930f7db53ef0faa6c264c5da805fab2f17a

commit bc8c5930f7db53ef0faa6c264c5da805fab2f17a
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Thu Oct 26 18:30:36 2017

minigbm: Use more descriptive modifier names

DRM_FORMAT_MOD_NONE means that the buffer layout is "not modified", as
opposed to "no modifier present". In other words, linear, since the
assumption is that that's the starting point.  This was later
clarified by introducing the DRM_FORMAT_MOD_LINEAR as a alias for
DRM_FORMAT_MOD_NONE and DRM_FORMAT_MOD_INVALID as a NULL-like value
for modifiers.

This commit replaces DRM_FORMAT_MOD_NONE with DRM_FORMAT_MOD_LINEAR
where we mean linear (which is most places) and DRM_FORMAT_MOD_INVALID
where we want to indicate "no modifier" (in struct kms_item).

BUG= chromium:763760 
TEST=Intel GPU board boots and has X-tiled framebuffers.

Change-Id: I93e1419e1ab4c04ad6ef3d48ada19487b880886d
Reviewed-on: https://chromium-review.googlesource.com/737409
Commit-Ready: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

[modify] https://crrev.com/bc8c5930f7db53ef0faa6c264c5da805fab2f17a/amdgpu.c
[modify] https://crrev.com/bc8c5930f7db53ef0faa6c264c5da805fab2f17a/i915.c
[modify] https://crrev.com/bc8c5930f7db53ef0faa6c264c5da805fab2f17a/tegra.c
[modify] https://crrev.com/bc8c5930f7db53ef0faa6c264c5da805fab2f17a/rockchip.c
[modify] https://crrev.com/bc8c5930f7db53ef0faa6c264c5da805fab2f17a/helpers.c

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 26 2017

Labels: merge-merged-chromeos-2.4.85
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/libdrm/+/5718a17a0f5d74d98b9872898acc35df5528915c

commit 5718a17a0f5d74d98b9872898acc35df5528915c
Author: Nicolas Boichat <drinkcat@google.com>
Date: Wed Oct 25 05:04:46 2017

libdrm: Add PRESUBMIT.cfg

Prevent it from complaining about license information and tabs.

Old-BUG=b:26575005
Old-TEST=Submit patches, presubmit script does not complain.

Signed-off-by: Nicolas Boichat <drinkcat@google.com>
Reviewed-on: https://chromium-review.googlesource.com/324166
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
(rebased from chromeos-2.4.70)

Old-BUG=b:63153737
Old-TEST=Submit patches, presubmit script does not complain.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=Submit patches, presubmit script does not complain.

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=Submit patches, presubmit script does not complain.

Change-Id: Id8e95a5789e404bff3d16451726f7ebf3d301bcd
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[add] https://crrev.com/5718a17a0f5d74d98b9872898acc35df5528915c/PRESUBMIT.cfg

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 26 2017

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

commit d59b55ca236a19d18b800ca6c00c5d882f0ca89f
Author: Daniel Kurtz <djkurtz@chromium.org>
Date: Wed Oct 25 05:08:49 2017

CHROMIUM: Add Mediatek proprietary format

Add DRM_FORMAT_MT21 for Mediatek Properity video block format.

Old-BUG=chrome-os-partner:38394
Old-BUG=b:26575005
Old-TEST=oak: Boot to UI.

Signed-off-by: Chiawen Lee <chiawen.lee@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/324183
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
(rebased from chromeos-2.4.70)

Old-BUG=b:63153737
Old-TEST=oak: Boot to UI.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=oak: Boot to UI.

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=oak: Boot to UI.

Change-Id: Id84e21f0098b3091b1dc7f77003b252555c71d57
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/d59b55ca236a19d18b800ca6c00c5d882f0ca89f/include/drm/drm_fourcc.h

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 26 2017

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

commit 4dfc0a73830bd417e5a68c6af794c84944bb9147
Author: Zach Reizner <zachr@google.com>
Date: Wed Oct 25 05:09:29 2017

CHROMIUM: vgem: add DRM_IOCTL_VGEM_MODE_MAP_DUMB support

This is the libdrm counterpart of the kernel patch in CL:263991:
DRM_IOCTL_MODE_MAP_DUMB is not allowable for use by render nodes, so we
add DRM_IOCTL_VGEM_MODE_MAP_DUMB, which behaves exactly the same as
DRM_IOCTL_MODE_MAP_DUMB, and is allowed on render nodes.

Old-TEST=the file /usr/include/libdrm/vgem_drm.h under the board's build
Old-BUG= chromium:469666 
Old-BUG=b:26575005

Signed-off-by: Zach Reizner <zachr@google.com>
(rebased from chromeos-2.4.70)

Old-BUG=b:63153737
Old-TEST=compile

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=compile

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=compile

Change-Id: I29a4cf18953c3b32c258ec28023ca413f31df5f4
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/4dfc0a73830bd417e5a68c6af794c84944bb9147/Makefile.sources
[add] https://crrev.com/4dfc0a73830bd417e5a68c6af794c84944bb9147/include/drm/vgem_drm.h

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 26 2017

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

commit f74f8ac16f61280f1c6885bfdb7ee125c6c4708f
Author: Mark Yao <mark.yao@rock-chips.com>
Date: Wed Oct 25 05:10:04 2017

CHROMIUM: libdrm: Add header for Rockchip DRM userspace interface

Add the header defining the interface exposed by Rockchip DRM.

Old-BUG=chrome-os-partner:32762
Old-BUG=b:26575005
Old-TEST=emerge-veyron libdrm; boot and display.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
(rebased from chromeos-2.4.70)
(stripped down to header alone)

Old-BUG=b:63153737
Old-TEST=emerge-veyron libdrm; boot and display.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=emerge-veyron libdrm; boot and display.

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=emerge-veyron libdrm; boot and display.

Change-Id: I0f5f1aade2cb91c82d1d68b57451cbfa3c814657
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/f74f8ac16f61280f1c6885bfdb7ee125c6c4708f/Makefile.sources
[add] https://crrev.com/f74f8ac16f61280f1c6885bfdb7ee125c6c4708f/include/drm/rockchip_drm.h

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/libdrm/+/521508153157538f899b9f4f117811421532b1b2

commit 521508153157538f899b9f4f117811421532b1b2
Author: JB Tsai <jb.tsai@mediatek.com>
Date: Wed Oct 25 05:11:06 2017

CHROMIUM: libdrm: Add header for Mediatek DRM userspace interface

Add a header defining the userspace interface exposed by Mediatek DRM
driver.

Old-BUG=chrome-os-partner:38389
Old-BUG=b:26575005
Old-TEST=Use kmstest on oak to verify

Signed-off-by: JB Tsai <jb.tsai@mediatek.com>
(rebased from chromeos-2.4.70)
(stripped down to the header alone)

Old-BUG=b:63153737
Old-TEST=Elm boots to UI

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=Elm boots to UI

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=Elm boots to UI

Change-Id: Ib4e0daa5466727502109b80261231cfe86c2ed8f
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/521508153157538f899b9f4f117811421532b1b2/Makefile.sources
[add] https://crrev.com/521508153157538f899b9f4f117811421532b1b2/include/drm/mediatek_drm.h

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/libdrm/+/311cae5e3516c89979d53caec8e4da4ce332ccc4

commit 311cae5e3516c89979d53caec8e4da4ce332ccc4
Author: Lukasz Spintzyk <lukasz.spintzyk@displaylink.com>
Date: Wed Oct 25 05:11:38 2017

CHROMIUM: drm/evdi: Add Evdi module userspace api file.

Old-BUG= chromium:579926 
Old-TEST=Build succeds, evdi_drm.h is installed.

Adding evdi module user space api header file.
Header file is necessary by libevdi library.
(review: https://chromium-review.googlesource.com/#/c/326670/)

Signed-off-by: Lukasz Spintzyk <lukasz.spintzyk@displaylink.com>
Reviewed-on: https://chromium-review.googlesource.com/327051
Commit-Ready: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Łukasz Spintzyk <lukasz.spintzyk@displaylink.com>
Reviewed-by: Haixia Shi <hshi@chromium.org>
(rebased from chromeos-2.4.70)

Old-BUG=b:63153737
Old-TEST=Build succeds, evdi_drm.h is installed.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=Build succeds, evdi_drm.h is installed.

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=Build succeds, evdi_drm.h is installed.

Change-Id: I7ab755073a0d948a6f4ea5bda2b084889b784d18
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/311cae5e3516c89979d53caec8e4da4ce332ccc4/Makefile.sources
[add] https://crrev.com/311cae5e3516c89979d53caec8e4da4ce332ccc4/include/drm/evdi_drm.h

Project Member

Comment 12 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/libdrm/+/16ffb1e6fce0fbd57f7a1e76021c575a40f6dc7a

commit 16ffb1e6fce0fbd57f7a1e76021c575a40f6dc7a
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Thu Oct 26 19:15:28 2017

CHROMIUM: drm_fourcc.h: Add Rockchip AFBC modifier

Old-BUG=chrome-os-partner:56407
Old-TEST=drm-tests null_platform_test with AFBC support

Reviewed-on: https://chromium-review.googlesource.com/387205
Commit-Ready: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Anders Pedersen <anders.pedersen@arm.com>
(rebased from chromeos-2.4.70)

Old-BUG=b:63153737
Old-TEST=Kevin boots to UI.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=Kevin boots to UI.

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

Added decoding of modifier to modetest.

BUG= chromium:763760 
TEST=Kevin boots to UI.

Change-Id: I5b82ea251b0703c3c5522caca37e4764590155f5
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/16ffb1e6fce0fbd57f7a1e76021c575a40f6dc7a/tests/modetest/modetest.c
[modify] https://crrev.com/16ffb1e6fce0fbd57f7a1e76021c575a40f6dc7a/include/drm/drm_fourcc.h

Project Member

Comment 13 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/minigbm/+/6061eab81238fddb26e09fe7a1a2f11d12b7904f

commit 6061eab81238fddb26e09fe7a1a2f11d12b7904f
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Thu Oct 26 20:45:03 2017

minigbm/i915: Implement bo_create_with_modifiers

This implements the bo_create_with_modifiers driver functions, which
enables the gbm_bo_create_with_modifiers() entry point. This will
allow ozone to allocate with the modifiers it queries from KMS.

BUG= chromium:763760 
TEST=Allocates Y-tiled scanout on SKL+

Change-Id: Id770e571a51aef4d753b30e12cd67d935c5228b7
Reviewed-on: https://chromium-review.googlesource.com/729279
Commit-Ready: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

[modify] https://crrev.com/6061eab81238fddb26e09fe7a1a2f11d12b7904f/i915.c
[modify] https://crrev.com/6061eab81238fddb26e09fe7a1a2f11d12b7904f/helpers.h
[modify] https://crrev.com/6061eab81238fddb26e09fe7a1a2f11d12b7904f/helpers.c

Project Member

Comment 14 by bugdroid1@chromium.org, Oct 26 2017

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

commit 5a58994da335e1a69b33daf48ce39bbccf62f85d
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Thu Oct 26 21:04:09 2017

ozone/drm: Roll back modifier support temporarily

This commit rolls back use of the ChromeOS downstream temporary
GETPLANE2 ioctl. This allows us to update libdrm in third_party and
ChromeOS to the upstream version with the new property based modifier
userspace API without breaking the build. Once that's in place, we'll
add back support for modifiers by reading the modifier property.

BUG= 763760 

Change-Id: I529f263e2a18802e5f67acb0a32a46a67403b369
Reviewed-on: https://chromium-review.googlesource.com/737471
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511958}
[modify] https://crrev.com/5a58994da335e1a69b33daf48ce39bbccf62f85d/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Oct 26 2017

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

commit ef44a1f72e225797a49e6856ca7e9180f0e5b7b5
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Thu Oct 26 22:49:07 2017

ozone/drm: Only pass in modifiers if DRM_MODE_FB_MODIFIERS is set

We only pass this flag for kernels that report format modifiers. On
kernels that don't report modifiers, specifically i915, we still
allocate non-linear buffers (X tiled) and then end up passing the X
tiled modifiers without the DRM_MODE_FB_MODIFIERS flag. This triggers
EINVAL from the kernel and we fail to create the KMS fb and GbmBuffer.

However gbm_bo_get_format_modifier() so far has returned 0 for bos
created with gbm_bo_create(), which is why this hasn't gotten us into
trouble so far.  We need to fix this so that we can fix minigbm to
accurately report the bo modifier.

BUG= 763760 

Change-Id: I92e303de1e39433cda419c311658ce07ba502b91
Reviewed-on: https://chromium-review.googlesource.com/737526
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511993}
[modify] https://crrev.com/ef44a1f72e225797a49e6856ca7e9180f0e5b7b5/ui/ozone/platform/drm/gpu/gbm_buffer.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 30 2017

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

commit 03ecc6d693f91d724bc3493021f23a8b9238e87b
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Mon Oct 30 23:53:36 2017

third_party/libdrm: Add -D_GNU_SOURCE_

Upstream configure.ac invokes AC_USE_SYSTEM_EXTENSIONS, which adds
this flag on Linux. We need this for the upcoming libdrm rebase
which starts using vasnprintf, which is only available when this
flag is passed.

BUG= 763760 

Change-Id: I296446c8493f56f6bea74925c4f85a95658f9e15
Reviewed-on: https://chromium-review.googlesource.com/737472
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512679}
[modify] https://crrev.com/03ecc6d693f91d724bc3493021f23a8b9238e87b/DEPS
[modify] https://crrev.com/03ecc6d693f91d724bc3493021f23a8b9238e87b/third_party/libdrm/BUILD.gn
[modify] https://crrev.com/03ecc6d693f91d724bc3493021f23a8b9238e87b/third_party/libdrm/README.chromium

Project Member

Comment 17 by bugdroid1@chromium.org, Oct 31 2017

Labels: merge-merged-chromeos-2.4.87
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/libdrm/+/f22a0c3bd79231bf3fafd03b98031896ec74e990

commit f22a0c3bd79231bf3fafd03b98031896ec74e990
Author: Nicolas Boichat <drinkcat@google.com>
Date: Tue Oct 31 17:10:50 2017

libdrm: Add PRESUBMIT.cfg

Prevent it from complaining about license information and tabs.

Old-BUG=b:26575005
Old-TEST=Submit patches, presubmit script does not complain.

Signed-off-by: Nicolas Boichat <drinkcat@google.com>
Reviewed-on: https://chromium-review.googlesource.com/324166
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
(rebased from chromeos-2.4.70)

Old-BUG=b:63153737
Old-TEST=Submit patches, presubmit script does not complain.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=Submit patches, presubmit script does not complain.

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=Submit patches, presubmit script does not complain.

Change-Id: Id8e95a5789e404bff3d16451726f7ebf3d301bcd
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[add] https://crrev.com/f22a0c3bd79231bf3fafd03b98031896ec74e990/PRESUBMIT.cfg

Project Member

Comment 18 by bugdroid1@chromium.org, Oct 31 2017

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

commit c11635032701cbca4995e0c68d52d29929c4cde3
Author: Daniel Kurtz <djkurtz@chromium.org>
Date: Tue Oct 31 17:10:50 2017

CHROMIUM: Add Mediatek proprietary format

Add DRM_FORMAT_MT21 for Mediatek Properity video block format.

Old-BUG=chrome-os-partner:38394
Old-BUG=b:26575005
Old-TEST=oak: Boot to UI.

Signed-off-by: Chiawen Lee <chiawen.lee@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/324183
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
(rebased from chromeos-2.4.70)

Old-BUG=b:63153737
Old-TEST=oak: Boot to UI.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=oak: Boot to UI.

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=oak: Boot to UI.

Change-Id: Id84e21f0098b3091b1dc7f77003b252555c71d57
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/c11635032701cbca4995e0c68d52d29929c4cde3/include/drm/drm_fourcc.h

Project Member

Comment 19 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/libdrm/+/20b980333c89a3b7c18265fb512d75e0a28cb471

commit 20b980333c89a3b7c18265fb512d75e0a28cb471
Author: Zach Reizner <zachr@google.com>
Date: Tue Oct 31 17:10:50 2017

CHROMIUM: vgem: add DRM_IOCTL_VGEM_MODE_MAP_DUMB support

This is the libdrm counterpart of the kernel patch in CL:263991:
DRM_IOCTL_MODE_MAP_DUMB is not allowable for use by render nodes, so we
add DRM_IOCTL_VGEM_MODE_MAP_DUMB, which behaves exactly the same as
DRM_IOCTL_MODE_MAP_DUMB, and is allowed on render nodes.

Old-TEST=the file /usr/include/libdrm/vgem_drm.h under the board's build
Old-BUG= chromium:469666 
Old-BUG=b:26575005

Signed-off-by: Zach Reizner <zachr@google.com>
(rebased from chromeos-2.4.70)

Old-BUG=b:63153737
Old-TEST=compile

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=compile

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=compile

Change-Id: I29a4cf18953c3b32c258ec28023ca413f31df5f4
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/20b980333c89a3b7c18265fb512d75e0a28cb471/Makefile.sources
[add] https://crrev.com/20b980333c89a3b7c18265fb512d75e0a28cb471/include/drm/vgem_drm.h

Project Member

Comment 20 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/libdrm/+/2f718685a39a7824580ac481165347d71553709c

commit 2f718685a39a7824580ac481165347d71553709c
Author: Mark Yao <mark.yao@rock-chips.com>
Date: Tue Oct 31 17:10:50 2017

CHROMIUM: libdrm: Add header for Rockchip DRM userspace interface

Add the header defining the interface exposed by Rockchip DRM.

Old-BUG=chrome-os-partner:32762
Old-BUG=b:26575005
Old-TEST=emerge-veyron libdrm; boot and display.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
(rebased from chromeos-2.4.70)
(stripped down to header alone)

Old-BUG=b:63153737
Old-TEST=emerge-veyron libdrm; boot and display.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=emerge-veyron libdrm; boot and display.

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=emerge-veyron libdrm; boot and display.

Change-Id: I0f5f1aade2cb91c82d1d68b57451cbfa3c814657
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/2f718685a39a7824580ac481165347d71553709c/Makefile.sources
[add] https://crrev.com/2f718685a39a7824580ac481165347d71553709c/include/drm/rockchip_drm.h

Project Member

Comment 21 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/libdrm/+/50a2f345ab1b3f1c9489772add06dba924f22826

commit 50a2f345ab1b3f1c9489772add06dba924f22826
Author: JB Tsai <jb.tsai@mediatek.com>
Date: Tue Oct 31 17:10:50 2017

CHROMIUM: libdrm: Add header for Mediatek DRM userspace interface

Add a header defining the userspace interface exposed by Mediatek DRM
driver.

Old-BUG=chrome-os-partner:38389
Old-BUG=b:26575005
Old-TEST=Use kmstest on oak to verify

Signed-off-by: JB Tsai <jb.tsai@mediatek.com>
(rebased from chromeos-2.4.70)
(stripped down to the header alone)

Old-BUG=b:63153737
Old-TEST=Elm boots to UI

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=Elm boots to UI

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=Elm boots to UI

Change-Id: Ib4e0daa5466727502109b80261231cfe86c2ed8f
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/50a2f345ab1b3f1c9489772add06dba924f22826/Makefile.sources
[add] https://crrev.com/50a2f345ab1b3f1c9489772add06dba924f22826/include/drm/mediatek_drm.h

Project Member

Comment 22 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/libdrm/+/30232abeaa66d4ed7b1ad3de950fdef8dc331bf6

commit 30232abeaa66d4ed7b1ad3de950fdef8dc331bf6
Author: Lukasz Spintzyk <lukasz.spintzyk@displaylink.com>
Date: Tue Oct 31 17:10:50 2017

CHROMIUM: drm/evdi: Add Evdi module userspace api file.

Old-BUG= chromium:579926 
Old-TEST=Build succeds, evdi_drm.h is installed.

Adding evdi module user space api header file.
Header file is necessary by libevdi library.
(review: https://chromium-review.googlesource.com/#/c/326670/)

Signed-off-by: Lukasz Spintzyk <lukasz.spintzyk@displaylink.com>
Reviewed-on: https://chromium-review.googlesource.com/327051
Commit-Ready: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Łukasz Spintzyk <lukasz.spintzyk@displaylink.com>
Reviewed-by: Haixia Shi <hshi@chromium.org>
(rebased from chromeos-2.4.70)

Old-BUG=b:63153737
Old-TEST=Build succeds, evdi_drm.h is installed.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=Build succeds, evdi_drm.h is installed.

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

BUG= chromium:763760 
TEST=Build succeds, evdi_drm.h is installed.

Change-Id: I7ab755073a0d948a6f4ea5bda2b084889b784d18
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/30232abeaa66d4ed7b1ad3de950fdef8dc331bf6/Makefile.sources
[add] https://crrev.com/30232abeaa66d4ed7b1ad3de950fdef8dc331bf6/include/drm/evdi_drm.h

Project Member

Comment 23 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/libdrm/+/4767403bc6195063ef96c1b01fdb44c785318c65

commit 4767403bc6195063ef96c1b01fdb44c785318c65
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Tue Oct 31 17:10:50 2017

CHROMIUM: drm_fourcc.h: Add Rockchip AFBC modifier

Old-BUG=chrome-os-partner:56407
Old-TEST=drm-tests null_platform_test with AFBC support

Reviewed-on: https://chromium-review.googlesource.com/387205
Commit-Ready: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Anders Pedersen <anders.pedersen@arm.com>
(rebased from chromeos-2.4.70)

Old-BUG=b:63153737
Old-TEST=Kevin boots to UI.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(rebased from chromeos-2.4.81)

Old-BUG=b:65285754
Old-TEST=Kevin boots to UI.

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
(rebased from chromeos-2.4.83)

Added decoding of modifier to modetest.

BUG= chromium:763760 
TEST=Kevin boots to UI.

Change-Id: I5b82ea251b0703c3c5522caca37e4764590155f5
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/4767403bc6195063ef96c1b01fdb44c785318c65/tests/modetest/modetest.c
[modify] https://crrev.com/4767403bc6195063ef96c1b01fdb44c785318c65/include/drm/drm_fourcc.h

Project Member

Comment 24 by bugdroid1@chromium.org, Oct 31 2017

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

commit abc63d4202f8272bca109e773f2591fc3e7b3c9b
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Tue Oct 31 22:15:21 2017

drm-tests: Remove use of drmModePlane modifiers fields

This was a ChromeOS downstream change that we're rolling back as we
upgrade to new libdrm.

BUG= chromium:763760 
TEST=compiles with new libdrm

Change-Id: I6506c8e31b32e0632f1df8178bd512aba6258a84
Reviewed-on: https://chromium-review.googlesource.com/746987
Commit-Ready: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

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

Project Member

Comment 25 by bugdroid1@chromium.org, Nov 1 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/manifest-internal/+/56734aac1c18c8704d552564e41394fa4ffedf1b

commit 56734aac1c18c8704d552564e41394fa4ffedf1b
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Wed Nov 01 00:31:02 2017

Project Member

Comment 26 by bugdroid1@chromium.org, Nov 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/manifest/+/2f16a85ea816ab678290d489c60eda455fc69d19

commit 2f16a85ea816ab678290d489c60eda455fc69d19
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Wed Nov 01 00:31:02 2017

libdrm: Move to branch chromeos-2.4.87

Update the manifest to point to the new libdrm branch based on upstream
2.4.87.

CQ-DEPEND=CL:*490592
BUG= chromium:763760 
TEST=repo sync

Change-Id: Ieea01dab7790391729f8653c28973df88d3af670
Reviewed-on: https://chromium-review.googlesource.com/741267
Commit-Ready: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>

[modify] https://crrev.com/2f16a85ea816ab678290d489c60eda455fc69d19/full.xml

Project Member

Comment 27 by bugdroid1@chromium.org, Nov 3 2017

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

commit f93b2ec55bb0d2d6aab74bf94384bdf7b35bbf77
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Fri Nov 03 01:12:14 2017

ozone/drm: Get modifier info from plane IN_FORMATS property

This adds logic to extract the format and modifier information
from the new IN_FORMATS plane property.

BUG= 763760 

Change-Id: Ie106d0ac0c32024ac5d4d225fbbf93548a6237ef
Reviewed-on: https://chromium-review.googlesource.com/737473
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513644}
[modify] https://crrev.com/f93b2ec55bb0d2d6aab74bf94384bdf7b35bbf77/ui/ozone/platform/drm/gpu/hardware_display_plane.cc
[modify] https://crrev.com/f93b2ec55bb0d2d6aab74bf94384bdf7b35bbf77/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc

Project Member

Comment 28 by bugdroid1@chromium.org, Nov 7 2017

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

commit 292bf53104cbcf4b9b8867abdc54877a1a25fd77
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Tue Nov 07 01:25:19 2017

UPSTREAM: drm/i915: Move nv12 chroma plane handling into intel_surf_alignment()

Let's try to keep the alignment requirements in one place, and so
towards that end let's move the AUX_DIST alignment handling into
intel_surf_alignment() alongside the main surface alignment stuff.

Signed-off-by: Ville Syrjl <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170307194210.13400-3-ville.syrjala@linux.intel.com
(cherry picked from commit b90c1ee17b9e57a3fef241c2ebb26b5db7cc1937)

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: I400f6b7b4f8333ae7924d851321b29e25f56aeb3
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/602460
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/292bf53104cbcf4b9b8867abdc54877a1a25fd77/drivers/gpu/drm/i915/intel_display.c

Project Member

Comment 29 by bugdroid1@chromium.org, Nov 7 2017

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

commit a5ef34d3c3f6c2d65907dfc8a57f6d6fc32aaadc
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Tue Nov 07 01:25:18 2017

BACKPORT: drm/i915: Plumb drm_framebuffer into more places

Now that framebuffers can be used even before calling
drm_framebuffer_init() we can start to plumb them into more places,
instead of passing individual pieces for fb metadata.

Signed-off-by: Ville Syrjl <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170307194210.13400-2-ville.syrjala@linux.intel.com
(cherry picked from commit d88c4afddc5519d49ee621e0437abb9c6a25fafb)

Conflicts:
	struct drm_i915_private vs struct drm_device argument to
	intel_fb_align_height

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: I309dc4e0f19b20fdbccec7a1c30a7e7b9d207f06
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727240
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/a5ef34d3c3f6c2d65907dfc8a57f6d6fc32aaadc/drivers/gpu/drm/i915/intel_display.c
[modify] https://crrev.com/a5ef34d3c3f6c2d65907dfc8a57f6d6fc32aaadc/drivers/gpu/drm/i915/intel_fbdev.c
[modify] https://crrev.com/a5ef34d3c3f6c2d65907dfc8a57f6d6fc32aaadc/drivers/gpu/drm/i915/intel_drv.h

Project Member

Comment 30 by bugdroid1@chromium.org, Nov 7 2017

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

commit 9f4baafeff854f3af2e254bec9158710e7b8bb88
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Tue Nov 07 01:25:21 2017

UPSTREAM: drm/i915: Avoid div-by-zero when computing aux_stride w/o an aux plane

To make life easier let's allow skl_plane_stride() to be called for the
AUX surface even when there is no AUX surface. Avoids special cases in
the callers.

Signed-off-by: Ville Syrjl <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170307194210.13400-4-ville.syrjala@linux.intel.com
(cherry picked from commit 1b500535c513ac57fff89e917bda5863739636ad)

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: Ifb7fd155904eef6eb651dc469684cd630f628885
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727241
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/9f4baafeff854f3af2e254bec9158710e7b8bb88/drivers/gpu/drm/i915/intel_display.c

Project Member

Comment 31 by bugdroid1@chromium.org, Nov 7 2017

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

commit ec83e045d43d75299998d5ef74f9b1a5be6bb692
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Tue Nov 07 01:25:22 2017

UPSTREAM: drm/i915: Pass the correct plane index to _intel_compute_tile_offset()

intel_fill_fb_info() should pass the correct plane index to
_intel_compute_tile_offset() once we start to care about the AUX
surface.

Signed-off-by: Ville Syrjl <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170307194210.13400-5-ville.syrjala@linux.intel.com
(cherry picked from commit 3ca46c0a22a7a0873d599e977c5a80b753ac69ce)

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: I724f6cab5d7b35adfd392d592d979226487a9a94
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727242
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/ec83e045d43d75299998d5ef74f9b1a5be6bb692/drivers/gpu/drm/i915/intel_display.c

Project Member

Comment 32 by bugdroid1@chromium.org, Nov 7 2017

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

commit 9e35963c518136eb89367536b9253fc39350f6a8
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Tue Nov 07 01:25:23 2017

UPSTREAM: drm: Share the code to compute color plane dimesions

framebuffer_check() has some hand rolled code to compute the color plane
dimensions based on the subsampled information. Let's share the code
between framebuffer_check() and drm_framebuffer_plane_{width,height}().

Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Ville Syrjl <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170321181218.10042-2-ville.syrjala@linux.intel.com
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
(cherry picked from commit 568c5e453666fd8e0a8b11b440291f59e4da28c8)

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: Ic942a0c54164df8137849da06301f3bf26a3d814
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727243
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/9e35963c518136eb89367536b9253fc39350f6a8/drivers/gpu/drm/drm_framebuffer.c

Project Member

Comment 33 by bugdroid1@chromium.org, Nov 7 2017

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

commit 0fe9c71684487dd51af63d162306c659a35c2250
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Tue Nov 07 01:25:25 2017

UPSTREAM: drm: Remove fb hsub/vsub alignment requirement

Allow framebuffers dimesions to be misaligned w.r.t. the subsampling
factors. No real reason the core should have to enforce this, and
it definitely starts to cause us issues with the i915 CCS support.
So let's just lift the restriction.

Let's start to round up when computing the color plane dimesions
so that we'll not end up with too low an estimate for the memory
requirements and whatnot.

Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Ville Syrjl <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170321181218.10042-3-ville.syrjala@linux.intel.com
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
(cherry picked from commit 33f673aa55e96ee37bb85200a24e4da12ba4d3f2)

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: I8fccda76a9df67eb709dafc7b5c1a3ee59f75ce8
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727244
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/0fe9c71684487dd51af63d162306c659a35c2250/drivers/gpu/drm/drm_framebuffer.c

Project Member

Comment 34 by bugdroid1@chromium.org, Nov 7 2017

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

commit b3f679383200768fe3fad7c0ee1139dd7270892a
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Tue Nov 07 01:25:26 2017

UPSTREAM: drm: Add mode_config .get_format_info() hook

Allow drivers to return a custom drm_format_info structure for special
fb layouts. We'll use this for the compression control surface in i915.

v2: Fix drm_get_format_info() kernel doc (Laurent)
    Don't pass 'dev' to the new hook (Laurent)
v3: s/compresssion/compression/ (Ben)

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Ville Syrjl <ville.syrjala@linux.intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170321181218.10042-4-ville.syrjala@linux.intel.com
(cherry picked from commit 6a0f9ebfc5e753bb948c13353615324462d73795)

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: Ifab5f69ff2a957be84d17a0df2f997b0d4ad0b30
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727245
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/b3f679383200768fe3fad7c0ee1139dd7270892a/include/drm/drm_mode_config.h
[modify] https://crrev.com/b3f679383200768fe3fad7c0ee1139dd7270892a/include/drm/drm_fourcc.h
[modify] https://crrev.com/b3f679383200768fe3fad7c0ee1139dd7270892a/drivers/gpu/drm/drm_fourcc.c
[modify] https://crrev.com/b3f679383200768fe3fad7c0ee1139dd7270892a/drivers/gpu/drm/drm_modeset_helper.c
[modify] https://crrev.com/b3f679383200768fe3fad7c0ee1139dd7270892a/drivers/gpu/drm/drm_framebuffer.c
[modify] https://crrev.com/b3f679383200768fe3fad7c0ee1139dd7270892a/drivers/gpu/drm/drm_fb_cma_helper.c

Project Member

Comment 35 by bugdroid1@chromium.org, Nov 7 2017

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

commit 99e5c16b62dbe13750c608e6284ec624110de9cb
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Tue Nov 07 01:25:27 2017

UPSTREAM: drm/i915: Implement .get_format_info() hook for CCS

SKL+ display engine can scan out certain kinds of compressed surfaces
produced by the render engine. This involved telling the display engine
the location of the color control surfae (CCS) which describes which
parts of the main surface are compressed and which are not. The location
of CCS is provided by userspace as just another plane with its own offset.

By providing our own format information for the CCS formats, we should
be able to make framebuffer_check() do the right thing for the CCS
surface as well.

Note that we'll return the same format info for both Y and Yf tiled
format as that's what happens with the non-CCS Y vs. Yf as well. If
desired, we could potentially return a unique pointer for each
pixel_format+tiling+ccs combination, in which case we immediately be
able to tell if any of that stuff changed by just comparing the
pointers. But that does sound a bit wasteful space wise.

v2: Drop the 'dev' argument from the hook
v3: Include the description of the CCS surface layout
v4: Pretend CCS tiles are regular 128 byte wide Y tiles (Jason)
v5: Re-drop 'dev', fix commit message, add missing drm_fourcc.h
    description of CCS layout. (daniels)

Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net> (v3)
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Ville Syrj <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit bbfb6ce86c9889a5d434e2e603d41e0ce5b552e2)

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: I0f70ff16942835d9e7d87e189be29083b82ab345
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727246
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/99e5c16b62dbe13750c608e6284ec624110de9cb/drivers/gpu/drm/i915/intel_display.c
[modify] https://crrev.com/99e5c16b62dbe13750c608e6284ec624110de9cb/include/uapi/drm/drm_fourcc.h

Project Member

Comment 36 by bugdroid1@chromium.org, Nov 7 2017

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

commit beaed24e3cad0aef8f8ea2b455201e030b64cd39
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Tue Nov 07 01:25:29 2017

BACKPORT: drm/i915: Add render decompression support

SKL+ display engine can scan out certain kinds of compressed surfaces
produced by the render engine. This involved telling the display engine
the location of the color control surfae (CCS) which describes
which parts of the main surface are compressed and which are not. The
location of CCS is provided by userspace as just another plane with its
own offset.

Add the required stuff to validate the user provided AUX plane metadata
and convert the user provided linear offset into something the hardware
can consume.

Due to hardware limitations we require that the main surface and
the AUX surface (CCS) be part of the same bo. The hardware also
makes life hard by not allowing you to provide separate x/y offsets
for the main and AUX surfaces (excpet with NV12), so finding suitable
offsets for both requires a bit of work. Assuming we still want keep
playing tricks with the offsets. I've just gone with a dumb "search
backward for suitable offsets" approach, which is far from optimal,
but it works.

Also not all planes will be capable of scanning out compressed surfaces,
and eg. 90/270 degree rotation is not supported in combination with
decompression either.

This patch may contain work from at least the following people:
* Vandana Kannan <vandana.kannan@intel.com>
* Daniel Vetter <daniel@ffwll.ch>
* Ben Widawsky <ben@bwidawsk.net>

v2: Deal with display workarounds 0390, 0531, 1125 (Paulo)
v3: Pretend CCS tiles are regular 128 byte wide Y tiles (Jason)
    Put the AUX register defines to the correct place
    Fix up the slightly bogus rotation check
v4: Use I915_WRITE_FW() due to plane update locking changes
    s/return -EINVAL/goto err/ in intel_framebuffer_init()
    Eliminate a bunch hardcoded numbers in CCS code

v5: (By Ben)
conflict resolution +
-               res_blocks += fixed_16_16_to_u32_round_up(y_tile_minimum);
+               res_blocks += fixed16_to_u32_round_up(y_tile_minimum);

v6: (daniels) Fix botched commit message.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Ville Syrj <ville.syrjala@linux.intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net> (v1)
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170801165817.7063-1-ben@bwidawsk.net
(cherry picked from commit 2e2adb05736c3101a0b301e39bf5adabb8b5fb22)

Conflicts:
	ROTATE rename.
	Use I915_WRITE instead of I915_WRITE_FW
	dev_priv vs dev arguments.
	goto vs return error handling in intel_framebuffer_init().
	fixed_16_16_to_u32_round_up rename.

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: I8990d92443bca4eb1fee70dff01ede6804e3126f
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727247
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/beaed24e3cad0aef8f8ea2b455201e030b64cd39/drivers/gpu/drm/i915/intel_display.c
[modify] https://crrev.com/beaed24e3cad0aef8f8ea2b455201e030b64cd39/drivers/gpu/drm/i915/intel_sprite.c
[modify] https://crrev.com/beaed24e3cad0aef8f8ea2b455201e030b64cd39/drivers/gpu/drm/i915/intel_pm.c
[modify] https://crrev.com/beaed24e3cad0aef8f8ea2b455201e030b64cd39/drivers/gpu/drm/i915/i915_reg.h

Project Member

Comment 37 by bugdroid1@chromium.org, Nov 7 2017

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

commit 1d230ef13a1e07315461e3992c8cae36064b1eb7
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Tue Nov 07 01:25:30 2017

BACKPORT: drm/i915: Treat fb->offsets[] as a raw byte offset instead of a linear offset

Userspace wants to treat fb->offsets[] as raw byte offsets into the gem
bo. Adjust the kernel code to match.

Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Daniel Stone <daniels@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170824191100.10949-2-ville.syrjala@linux.intel.com
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Fixes: 2e2adb05736c ("drm/i915: Add render decompression support")
Signed-off-by: Ville Syrjl <ville.syrjala@linux.intel.com>
(cherry picked from commit e8837d98d268792ab4c5a488368acd908458bcc0)

Conflicts:
	Fix up s/DRM_FORMAT_MOD_LINEAR/DRM_FORMAT_MOD_NON/ and
	s/DRM_MODE_ROTATE_0/DRM_ROTATE_0 renames.

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: Iaa7fad03f3570deac40b838c357a72339879c949
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727248
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/1d230ef13a1e07315461e3992c8cae36064b1eb7/drivers/gpu/drm/i915/intel_display.c

Project Member

Comment 38 by bugdroid1@chromium.org, Nov 7 2017

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

commit 382c34e5be680aa2ecaa80a3aa534f971568653a
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Tue Nov 07 01:25:32 2017

UPSTREAM: drm/i915: Skip fence alignemnt check for the CCS plane

The CCS won't have the same stride as the main surface anyway so trying
to guard against the fence stride not matching the CCS stride is
not sensible. Just skip the fence vs. fb alignment check for the aux
plane.

Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Daniel Stone <daniels@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170824191100.10949-3-ville.syrjala@linux.intel.com
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Fixes: 2e2adb05736c ("drm/i915: Add render decompression support")
Signed-off-by: Ville Syrjl <ville.syrjala@linux.intel.com>
(cherry picked from commit 18db229d30cd19c987885b79b90344ae061e870e)

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: I7ff32334629611be825537f0eb53ca3b1cb3fc23
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727249
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/382c34e5be680aa2ecaa80a3aa534f971568653a/drivers/gpu/drm/i915/intel_display.c

Project Member

Comment 39 by bugdroid1@chromium.org, Nov 7 2017

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

commit 8cb5c3ab473b8fe42bbdf48497d0bad98b058bb5
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Tue Nov 07 01:25:33 2017

UPSTREAM: drm_fourcc: Document linear modifier

Not setting the fb modifiers flag is something different from setting
the fb modifiers to 0 (which means explicitly linear). We kinda failed
to document that properly. Spotted by Kristian.

Cc: hoegsberg@google.com
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1478694996-4200-1-git-send-email-daniel.vetter@ffwll.ch
(cherry picked from commit b9fb2a21ac8058965a6b3fcae736cfa7f411d6eb)

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: I0b8aa604d2da98071caca69123468cd8044e60c2
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727250
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/8cb5c3ab473b8fe42bbdf48497d0bad98b058bb5/include/uapi/drm/drm_fourcc.h

Project Member

Comment 40 by bugdroid1@chromium.org, Nov 7 2017

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

commit 4acb8ce511e103778e04014e6f41a326009ad427
Author: Kristian Kristensen <hoegsberg@hawkmoon.pdx.corp.google.com>
Date: Tue Nov 07 01:25:34 2017

Revert "drm: Add new DRM_IOCTL_MODE_GETPLANE2"

This reverts commit 4d350e05a74f9903cfab5231fffebb9a4dd77eba. We've
been using a down-stream ioctl for querying supported format modifiers
for planes. In the meantime, upstream decided to go with the slightly
more flexible approach of just putting this info in a plane blob
property. Revert our down-stream ioctl first so we can land the
upstream patches.

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: I317ea7a70b5ed7b261d3f70dc03a37714de97b13
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727251
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/drm_modeset_helper.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/mediatek/mtk_drm_plane.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/sti/sti_cursor.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/sti/sti_gdp.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/rcar-du/rcar_du_plane.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/tegra/dc.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/drm_plane.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/include/uapi/drm/drm_mode.h
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/armada/armada_overlay.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/include/uapi/drm/drm.h
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/include/drm/drm_plane.h
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/drm_ioctl.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/omapdrm/omap_plane.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/armada/armada_crtc.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/drm_simple_kms_helper.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/i915/intel_sprite.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/vc4/vc4_plane.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/imx/ipuv3-plane.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/i915/intel_display.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/exynos/exynos_drm_plane.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/arm/hdlcd_crtc.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/virtio/virtgpu_plane.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/sti/sti_hqvdp.c
[modify] https://crrev.com/4acb8ce511e103778e04014e6f41a326009ad427/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c

Project Member

Comment 41 by bugdroid1@chromium.org, Nov 7 2017

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

commit 46a31b26c0373b790a7b9a4194757313d6b5484f
Author: Ben Widawsky <ben@bwidawsk.net>
Date: Tue Nov 07 01:25:36 2017

BACKPORT: drm: Plumb modifiers through plane init

This is the plumbing for supporting fb modifiers on planes. Modifiers
have already been introduced to some extent, but this series will extend
this to allow querying modifiers per plane. Based on this, the client to
enable optimal modifications for framebuffers.

This patch simply allows the DRM drivers to initialize their list of
supported modifiers upon initializing the plane.

v2: A minor addition from Daniel

v3:
* Updated commit message
* s/INVALID/DRM_FORMAT_MOD_INVALID (Liviu)
* Remove some excess newlines (Liviu)
* Update comment for > 64 modifiers (Liviu)

v4: Minor comment adjustments (Liviu)

v5: Some new platforms added due to rebase

v6: Add some missed plane inits (or maybe they're new - who knows at
this point) (Daniel)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Daniel Stone <daniels@collabora.com> (v2)
Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit e6fc3b68558e4c6d8d160b5daf2511b99afa8814)

Conflicts:
	Edit plane inits we only have downstream, drop plane inits
	that are only upstream. Misc whitespace differences between
	upstream and downstream calls to plane init for some drivers.

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: I26ff81aa0524fabaa4b7699761d4ed8a90eee7bb
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727252
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/drm_modeset_helper.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/mediatek/mtk_drm_plane.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/sti/sti_cursor.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/sti/sti_gdp.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/rcar-du/rcar_du_plane.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/tegra/dc.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/drm_plane.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/include/drm/drm_simple_kms_helper.h
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/armada/armada_overlay.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/include/drm/drm_plane.h
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/drm_simple_kms_helper.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/omapdrm/omap_plane.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/armada/armada_crtc.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/i915/intel_sprite.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/vc4/vc4_plane.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/imx/ipuv3-plane.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/i915/intel_display.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/include/uapi/drm/drm_fourcc.h
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/exynos/exynos_drm_plane.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/arm/hdlcd_crtc.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/evdi/evdi_modeset.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/virtio/virtgpu_plane.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/sti/sti_hqvdp.c
[modify] https://crrev.com/46a31b26c0373b790a7b9a4194757313d6b5484f/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c

Project Member

Comment 42 by bugdroid1@chromium.org, Nov 7 2017

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

commit ddaa724757cec3cf443fe6285d1679c6889e7694
Author: Ben Widawsky <ben@bwidawsk.net>
Date: Tue Nov 07 01:25:37 2017

UPSTREAM: drm: Create a format/modifier blob

Updated blob layout (Rob, Daniel, Kristian, xerpi)

v2:
* Removed __packed, and alignment (.+)
* Fix indent in drm_format_modifier fields (Liviu)
* Remove duplicated modifier > 64 check (Liviu)
* Change comment about modifier (Liviu)
* Remove arguments to blob creation, use plane instead (Liviu)
* Fix data types (Ben)
* Make the blob part of uapi (Daniel)

v3:
Remove unused ret field.
Change i, and j to unsigned int (Emil)

v4:
Use plane->modifier_count instead of recounting (Daniel)

v5:
Rename modifiers to modifiers_property (Ville)
Use sizeof(__u32) instead to reflect UAPI nature (Ville)
Make BUILD_BUG_ON for blob header size

Cc: Rob Clark <robdclark@gmail.com>
Cc: Kristian H. Kristensen <hoegsberg@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Daniel Stone <daniels@collabora.com> (v2)
Reviewed-by: Liviu Dudau <liviu@dudau.co.uk> (v2)
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (v3)
Signed-off-by: Daniel Stone <daniels@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170724034641.13369-2-ben@bwidawsk.net
(cherry picked from commit db1689aa61bd1efb5ce9b896e7aa860a85b7f1b6)

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: Icd6de986437bc44ca209fe5eaa80aaa9e27e8806
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727253
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/ddaa724757cec3cf443fe6285d1679c6889e7694/drivers/gpu/drm/drm_mode_config.c
[modify] https://crrev.com/ddaa724757cec3cf443fe6285d1679c6889e7694/drivers/gpu/drm/drm_plane.c
[modify] https://crrev.com/ddaa724757cec3cf443fe6285d1679c6889e7694/include/drm/drm_mode_config.h
[modify] https://crrev.com/ddaa724757cec3cf443fe6285d1679c6889e7694/include/uapi/drm/drm_mode.h

Project Member

Comment 43 by bugdroid1@chromium.org, Nov 7 2017

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

commit 0a472cb8ac1cd0ff9c9cc98091e71e5741a07621
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue Nov 07 01:25:38 2017

UPSTREAM: drm: Shift wrap bug in create_in_format_blob()

"plane->format_count" can go up to 64.  (It's capped in
drm_universal_plane_init().)  So we should be using ULL type instead of
int here to prevent shift wrapping.

Fixes: db1689aa61bd ("drm: Create a format/modifier blob")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170809111906.4rv3hzritctfktv3@mwanda
(cherry picked from commit aadd41485bb227a16f964833a4fd55c091f4a729)

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: If18638fff9b79c65a802f25514077b5bca73d4f0
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727254
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/0a472cb8ac1cd0ff9c9cc98091e71e5741a07621/drivers/gpu/drm/drm_plane.c

Blocking: 772239
Project Member

Comment 45 by bugdroid1@chromium.org, Nov 10 2017

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

commit 10d5f23e8e3a29e6b4f9a7bd2de20f12dcee5df6
Author: Ben Widawsky <ben@bwidawsk.net>
Date: Fri Nov 10 03:16:35 2017

BACKPORT: drm/i915: Add format modifiers for Intel

This was based on a patch originally by Kristian. It has been modified
pretty heavily to use the new callbacks from the previous patch.

v2:
  - Add LINEAR and Yf modifiers to list (Ville)
  - Combine i8xx and i965 into one list of formats (Ville)
  - Allow 1010102 formats for Y/Yf tiled (Ville)

v3:
  - Handle cursor formats (Ville)
  - Put handling for LINEAR in the mod_support functions (Ville)

v4:
  - List each modifier explicitly in supported modifiers (Ville)
  - Handle the CURSOR plane (Ville)

v5:
  - Split out cursor and sprite handling (Ville)

v6:
  - Actually use the sprite funcs (Emil)
  - Use unreachable (Emil)

v7:
  - Only allow Intel modifiers and LINEAR (Ben)

v8
  - Fix spite assert introduced in v6 (Daniel)

v9
  - Change vendor check logic to avoid magic 56 (Emil)
  - Reorder skl_mod_support (Ville)
  - make intel_plane_funcs static, could be done as of v5 (Ville)
  - rename local variable intel_format_modifiers to modifiers (Ville)
    - actually use sprite modifiers
  - split out modifier/formats by platform (Ville)

v10:
  - Undo vendor check from v9

v11:
  - Squash CCS advertisement into this patch (daniels)
  - Don't advertise CCS on higher sprite planes (daniels)

v12:
  - Don't advertise Y-tiled or CCS on any sprite planes, since we don't
    allocate enough DDB space for it to work. (daniels)

Cc: Ville Syrjl <ville.syrjala@linux.intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (v8)
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit 714244e280de0e4ec00ff18b641f48be3936d920)

Conflicts:
	Remove GEN10 chunks from upstream commit, we don't have any
	GEN10 support in this branch.

BUG= 763760 
TEST=run modetest to verify i915 exposes modifiers and chrome uses Y
  tiled framebuffers

Change-Id: I223e883ce9b697cdf28da34684902aab0d8f06c5
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727255
Reviewed-by: Sean Paul <seanpaul@google.com>

[modify] https://crrev.com/10d5f23e8e3a29e6b4f9a7bd2de20f12dcee5df6/drivers/gpu/drm/i915/intel_display.c
[modify] https://crrev.com/10d5f23e8e3a29e6b4f9a7bd2de20f12dcee5df6/drivers/gpu/drm/i915/intel_sprite.c
[modify] https://crrev.com/10d5f23e8e3a29e6b4f9a7bd2de20f12dcee5df6/drivers/gpu/drm/i915/intel_drv.h

Project Member

Comment 46 by bugdroid1@chromium.org, Nov 10 2017

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

commit 4ceb0a94732dfc6b145a9da64768931b9c34b411
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Fri Nov 10 19:30:17 2017

CHROMIUM: drm/rockchip: Expose rockchip AFBC using plane property

This commit changes the way we expose the Rockchip AFBC compression
format modifier to use the new upstream per-plane IN_FORMATS property.

BUG= chromium:763760 
TEST=run modetest to verify rk3399 exposes modifiers and chrome uses AFBC
  framebuffers

Change-Id: Ifbc3be8a5a8b78b50ab0f7f3548d2cb2cbe3963e
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/740861
Reviewed-by: Sean Paul <seanpaul@google.com>

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

Status: Fixed (was: Untriaged)
And with the AFBC rewrite landed, we can close this bug.

Comment 48 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 49 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment