Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
gbm_mesa: add camera usage flags for DRM_FORMAT_YVU420_ANDROID & DRM_…
Browse files Browse the repository at this point in the history
…FORMAT_R8

* Needed for UVC USB webcams using external camera HAL
  https://source.android.com/devices/camera/external-usb-cameras
* DRM_FORMAT_YVU420_ANDROID needed for preview,
  DRM_FORMAT_R8 for capture.

Change-Id: I92b82e4f22c7957da6293eaf67537639eb2f6e7b
  • Loading branch information
KonstaT committed Dec 15, 2021
1 parent 152f877 commit f9d7925
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gbm_mesa_driver/gbm_mesa_internals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,16 @@ int gbm_mesa_driver_init(struct driver *drv)

drv_modify_combination(drv, DRM_FORMAT_NV12, &linear_metadata,
BO_USE_HW_VIDEO_ENCODER | BO_USE_HW_VIDEO_DECODER |
BO_USE_CAMERA_READ | BO_USE_CAMERA_WRITE);
BO_USE_CAMERA_READ | BO_USE_CAMERA_WRITE);

drv_modify_combination(drv, DRM_FORMAT_NV21, &linear_metadata, BO_USE_HW_VIDEO_ENCODER);

drv_modify_combination(drv, DRM_FORMAT_YVU420_ANDROID, &linear_metadata,
BO_USE_CAMERA_READ | BO_USE_CAMERA_WRITE);

drv_modify_combination(drv, DRM_FORMAT_R8, &linear_metadata,
BO_USE_CAMERA_READ | BO_USE_CAMERA_WRITE);

return drv_modify_linear_combinations(drv);
}

Expand Down

0 comments on commit f9d7925

Please sign in to comment.