Skip to content

Commit

Permalink
Resolve dgpu video color disorder issue
Browse files Browse the repository at this point in the history
Tracked-On: OAM-113247
Signed-off-by: ZhuChenyanX <[email protected]>
  • Loading branch information
ZhuChenyanX authored and chenyanxzhu committed Nov 23, 2023
1 parent 096c694 commit c4e4be0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
20 changes: 0 additions & 20 deletions i915.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,27 +377,7 @@ static int i915_align_dimensions(struct bo *bo, uint32_t tiling, uint32_t *strid
vertical_alignment = 32;
break;
}
if (i915->genx10 >= 125) {
/*
* The alignment calculated above is based on the full size luma plane and to have
* chroma
* planes properly aligned with subsampled formats, we need to multiply luma
* alignment by
* subsampling factor.
*/
switch (bo->meta.format) {
case DRM_FORMAT_YVU420_ANDROID:
case DRM_FORMAT_YVU420:
horizontal_alignment *= 2;

/* Fall through */

case DRM_FORMAT_NV12:
vertical_alignment *= 2;
break;
}
i915_private_align_dimensions(bo->meta.format, &vertical_alignment);
}
*aligned_height = ALIGN(*aligned_height, vertical_alignment);

#ifdef USE_GRALLOC1
Expand Down
9 changes: 0 additions & 9 deletions i915_private.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,6 @@ int i915_private_add_combinations(struct driver *drv)
return 0;
}

void i915_private_align_dimensions(uint32_t format, uint32_t *vertical_alignment)
{
switch (format) {
case DRM_FORMAT_NV12_Y_TILED_INTEL:
*vertical_alignment = 64;
break;
}
}

uint32_t i915_private_bpp_from_format(uint32_t format, size_t plane)
{
assert(plane < drv_num_planes_from_format(format));
Expand Down
2 changes: 0 additions & 2 deletions i915_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ int i915_private_init(struct driver *drv, uint64_t *cursor_width, uint64_t *curs

int i915_private_add_combinations(struct driver *drv);

void i915_private_align_dimensions(uint32_t format, uint32_t *vertical_alignment);

uint32_t i915_private_bpp_from_format(uint32_t format, size_t plane);

void i915_private_vertical_subsampling_from_format(uint32_t *vertical_subsampling, uint32_t format,
Expand Down

0 comments on commit c4e4be0

Please sign in to comment.