Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit 08c92fb

Browse files
Aakash-Sarkarsysopenci
authored andcommitted
anv/android: Add support for missing AHB Format
This patch adds the support for AHB to Vulkan format conversion for the pixel format: HAL_PIXEL_FORMAT_NV12_LINEAR_CAMERA_INTEL (271). It is needed to fix the video playback crash seen while enabling ANGLE as the OpenGL ES driver with Vulkan as the backend. Crash Log: 501 517 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 517 (RenderEngine), pid 501 (surfaceflinger) 2774 2774 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 2774 2774 F DEBUG : Build fingerprint: 'intel/caas/caas:15/AP3A.241005.015.A2/eng.celado.00000000.000000:userdebug/test-keys' 2774 2774 F DEBUG : Revision: '0' 2774 2774 F DEBUG : ABI: 'x86_64' 2774 2774 F DEBUG : Timestamp: 2024-12-10 09:23:54.284397411+0000 2774 2774 F DEBUG : Process uptime: 208s 2774 2774 F DEBUG : Cmdline: /system/bin/surfaceflinger 2774 2774 F DEBUG : pid: 501, tid: 517, name: RenderEngine >>> /system/bin/surfaceflinger <<< 2774 2774 F DEBUG : uid: 1000 2774 2774 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- 2774 2774 F DEBUG : Abort message: 'Failed to create a valid texture. [0x71010801e090]:[848,480] isProtected:0 isWriteable:0 format:271' 2774 2774 F DEBUG : rax 0000000000000000 rbx 0000710087a941e8 rcx 0000710318a66b4e rdx 0000000000000006 2774 2774 F DEBUG : r8 0000710087a94f40 r9 0000710087a94f40 r10 0000710087a941f0 r11 0000000000000207 2774 2774 F DEBUG : r12 0000710087a94810 r13 0000000000000000 r14 00000000000001f5 r15 0000000000000205 2774 2774 F DEBUG : rdi 00000000000001f5 rsi 0000000000000205 2774 2774 F DEBUG : rbp 0000000000000000 rsp 0000710087a941e0 rip 0000710318a66b4e Tests done: - Android boot with angle and vulkan as backend - Video playback working correctly - Gallery app is not showing any visual artifacts Tracked-On: OAM-126014 Signed-off-by: Aakash Sarkar <Aakash.Deep.Sarkar@intel.com>
1 parent e8a8be0 commit 08c92fb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/intel/vulkan/anv_android.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ anv_hal_close(struct hw_device_t *dev)
104104
#include <vndk/hardware_buffer.h>
105105
/* See i915_private_android_types.h in minigbm. */
106106
#define HAL_PIXEL_FORMAT_NV12_Y_TILED_INTEL 0x100
107+
#define HAL_PIXEL_FORMAT_NV12_LINEAR_CAMERA_INTEL 0x10F
107108

108109
enum {
109110
/* Usage bit equal to GRALLOC_USAGE_HW_CAMERA_MASK */
@@ -116,6 +117,7 @@ vk_format_from_android(unsigned android_format, unsigned android_usage)
116117
switch (android_format) {
117118
case AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420:
118119
case HAL_PIXEL_FORMAT_NV12_Y_TILED_INTEL:
120+
case HAL_PIXEL_FORMAT_NV12_LINEAR_CAMERA_INTEL:
119121
return VK_FORMAT_G8_B8R8_2PLANE_420_UNORM;
120122
case AHARDWAREBUFFER_FORMAT_YV12:
121123
return VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM;

0 commit comments

Comments
 (0)