Skip to content

Commit

Permalink
Only set scanout flag for display buffer
Browse files Browse the repository at this point in the history
Tracked-On: OAM-125304
Signed-off-by: He, Yue <yue.he@intel.com>
  • Loading branch information
yhe39 committed Sep 26, 2024
1 parent 650e7fc commit 832bd61
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cros_gralloc/cros_gralloc_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
/* Define to match AIDL PixelFormat::R_8. */
#define HAL_PIXEL_FORMAT_R8 0x38

/* Define to match BufferUsage::GRALLOC_USAGE_PRIVATE_1. */
#define GRALLOC_USAGE_PRIVATE_1 (1 << 29)

const char *drmFormat2Str(int drm_format)
{
static char buf[5];
Expand Down Expand Up @@ -138,8 +141,8 @@ uint64_t cros_gralloc_convert_usage(uint64_t usage)
handle_usage(&usage, GRALLOC_USAGE_HW_RENDER, &use_flags, BO_USE_RENDERING);
handle_usage(&usage, GRALLOC_USAGE_HW_2D, &use_flags, BO_USE_RENDERING);
/* HWC wants to use display hardware, but can defer to OpenGL. */
handle_usage(&usage, GRALLOC_USAGE_HW_COMPOSER, &use_flags,
BO_USE_SCANOUT | BO_USE_TEXTURE);
handle_usage(&usage, GRALLOC_USAGE_HW_COMPOSER, &use_flags, BO_USE_TEXTURE);
handle_usage(&usage, GRALLOC_USAGE_PRIVATE_1, &use_flags, BO_USE_SCANOUT);
handle_usage(&usage, GRALLOC_USAGE_HW_FB, &use_flags, BO_USE_NONE);
/*
* This flag potentially covers external display for the normal drivers (i915/rockchip) and
Expand Down

0 comments on commit 832bd61

Please sign in to comment.