Skip to content

Commit

Permalink
Revert "media/gpu/vaapi:Cleanup comment about use drm prime2"
Browse files Browse the repository at this point in the history
This reverts commit 402446d.

Reason for revert: b/284246987

Original change's description:
> media/gpu/vaapi:Cleanup comment about use drm prime2
>
> Since the buffer modifier has been plumbed for camera HW JPEG
> encoding and decoding case, so this CL cleanup the plumb modifier
> comment.
>
> Bug: b/236746283
> Change-Id: Ib63000ebb9c5a7d5fca2df42f8f479bbaeb33cc2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4380360
> Reviewed-by: Andres Calderon Jaramillo <andrescj@chromium.org>
> Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1147974}

(cherry picked from commit 83905e6)

Bug: b/236746283, b/284246987, b/285010844
Change-Id: Iecb911dba79a7b22722816335927c259379bbd95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4570123
Auto-Submit: Ricky Liang <jcliang@chromium.org>
Quick-Run: Ricky Liang <jcliang@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1149506}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4592870
Reviewed-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Commit-Queue: Kazuhiro Inaba <kinaba@chromium.org>
Cr-Commit-Position: refs/branch-heads/5790@{#433}
Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
  • Loading branch information
Zyta Szpak authored and Chromium LUCI CQ committed Jun 7, 2023
1 parent c608baf commit 1d37acc
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions media/gpu/vaapi/vaapi_wrapper.cc
Expand Up @@ -2453,21 +2453,16 @@ scoped_refptr<VASurface> VaapiWrapper::CreateVASurfaceForPixmap(
return nullptr;
}

if (GetImplementationType() == VAImplementation::kIntelIHD &&
pixmap->GetBufferFormatModifier() ==
gfx::NativePixmapHandle::kNoModifier) {
// Buffers imported into the iHD libva driver should always have a valid
// modifier.
return nullptr;
}

// TODO(b/233894465): use the DRM_PRIME_2 API with the Mesa Gallium driver
// when AMD supports it.
// TODO(b/233924862): use the DRM_PRIME_2 API with protected content.
// TODO(b/233929647): use the DRM_PRIME_2 API with the i965 driver.
// TODO(b/236746283): remove the kNoModifier check once the modifier is
// plumbed for JPEG decoding and encoding.
const bool use_drm_prime_2 =
GetImplementationType() == VAImplementation::kIntelIHD &&
!protected_content;
!protected_content &&
pixmap->GetBufferFormatModifier() != gfx::NativePixmapHandle::kNoModifier;

union {
VADRMPRIMESurfaceDescriptor descriptor;
Expand Down

0 comments on commit 1d37acc

Please sign in to comment.