This reverts commit
292da5365a373a8e1eed603fc3aa16e3595d8252.
Reason for revert: The Android framework uses successful allocation of HAL_PIXEL_FORMAT_RGBA_FP16 to test for wide-gamut capabilities. We don't want to advertise this, so let's revert.
android.graphics.cts.BitmapColorSpaceTest#test16bitHardware
can pass if the framework falls back to RGBA8888, as is the plan.
Original change's description:
> minigbm: add support for HAL_PIXEL_FORMAT_RGBA_FP16
>
> This is needed to support the following CTS test:
>
> android.graphics.cts.BitmapColorSpaceTest#test16bitHardware
>
> There have been some rumblings about adding 64-bit formats to <drm_fourcc.h>:
>
> https://lists.freedesktop.org/archives/intel-gvt-dev/2017-July/001469.html
>
> However, nothing has landed, so let's just define our own format
> for the time being.
>
> BUG=b:
77973662
> TEST=Compile for kevin and kevin-arcnext
> Unfortunately, my P setup refuses to work, so let the lab
> test.
>
> Change-Id: I1fea16400ba6632a8ef17105e27bc7799d2af515
> Reviewed-on: https://chromium-review.googlesource.com/
1029355
> Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Bug: b:
77973662
Change-Id: I9e4b79b06dd565189a2e783e8453f08af173d84c
Reviewed-on: https://chromium-review.googlesource.com/
1045805
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
int drm_version;
};
-const static uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_RGB565, DRM_FORMAT_XBGR8888,
- DRM_FORMAT_XBGR16161616, DRM_FORMAT_XRGB8888 };
+const static uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_RGB565, DRM_FORMAT_XBGR8888,
+ DRM_FORMAT_XRGB8888 };
const static uint32_t texture_source_formats[] = { DRM_FORMAT_GR88, DRM_FORMAT_R8, DRM_FORMAT_NV21,
DRM_FORMAT_NV12, DRM_FORMAT_YVU420_ANDROID };
return DRM_FORMAT_RGB888;
case HAL_PIXEL_FORMAT_RGBA_8888:
return DRM_FORMAT_ABGR8888;
- case HAL_PIXEL_FORMAT_RGBA_FP16:
- return DRM_FORMAT_XBGR16161616;
case HAL_PIXEL_FORMAT_RGBX_8888:
return DRM_FORMAT_XBGR8888;
case HAL_PIXEL_FORMAT_YCbCr_420_888:
#include <system/graphics.h>
#include <system/window.h>
-#if ANDROID_VERSION < 0x0900
-#define HAL_PIXEL_FORMAT_RGBA_FP16 0x16
-#endif
-
constexpr uint32_t cros_gralloc_magic = 0xABCDDCBA;
constexpr uint32_t handle_data_size =
((sizeof(struct cros_gralloc_handle) - offsetof(cros_gralloc_handle, fds[0])) / sizeof(int));
*/
#define DRM_FORMAT_NONE fourcc_code('0', '0', '0', '0')
-#define DRM_FORMAT_XBGR16161616 fourcc_code('9', '9', '9', '6')
#define DRM_FORMAT_YVU420_ANDROID fourcc_code('9', '9', '9', '7')
#define DRM_FORMAT_FLEX_IMPLEMENTATION_DEFINED fourcc_code('9', '9', '9', '8')
#define DRM_FORMAT_FLEX_YCbCr_420_888 fourcc_code('9', '9', '9', '9')
.bytes_per_pixel = { 4 }
};
-static const struct planar_layout packed_8bpp_layout = {
- .num_planes = 1,
- .horizontal_subsampling = { 1 },
- .vertical_subsampling = { 1 },
- .bytes_per_pixel = { 8 }
-};
-
static const struct planar_layout biplanar_yuv_420_layout = {
.num_planes = 2,
.horizontal_subsampling = { 1, 2 },
case DRM_FORMAT_XRGB8888:
return &packed_4bpp_layout;
- case DRM_FORMAT_XBGR16161616:
- return &packed_8bpp_layout;
-
default:
drv_log("UNKNOWN FORMAT %d\n", format);
return NULL;
const struct planar_layout *layout = layout_from_format(format);
assert(plane < layout->num_planes);
- uint32_t plane_width = DIV_ROUND_UP(width, layout->horizontal_subsampling[plane]);
+ uint32_t plane_width =
+ DIV_ROUND_UP(width, layout->horizontal_subsampling[plane]);
uint32_t stride = plane_width * layout->bytes_per_pixel[plane];
/*
#define I915_CACHELINE_SIZE 64
#define I915_CACHELINE_MASK (I915_CACHELINE_SIZE - 1)
-static const uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB1555,
- DRM_FORMAT_ARGB8888, DRM_FORMAT_RGB565,
- DRM_FORMAT_XBGR2101010, DRM_FORMAT_XBGR8888,
- DRM_FORMAT_XBGR16161616, DRM_FORMAT_XRGB1555,
- DRM_FORMAT_XRGB2101010, DRM_FORMAT_XRGB8888 };
+static const uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB1555,
+ DRM_FORMAT_ARGB8888, DRM_FORMAT_RGB565,
+ DRM_FORMAT_XBGR2101010, DRM_FORMAT_XBGR8888,
+ DRM_FORMAT_XRGB1555, DRM_FORMAT_XRGB2101010,
+ DRM_FORMAT_XRGB8888 };
static const uint32_t tileable_texture_source_formats[] = { DRM_FORMAT_GR88, DRM_FORMAT_R8,
DRM_FORMAT_UYVY, DRM_FORMAT_YUYV };
void *gem_addr;
};
-static const uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_RGB565, DRM_FORMAT_XBGR8888,
- DRM_FORMAT_XBGR16161616, DRM_FORMAT_XRGB8888 };
+static const uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_RGB565, DRM_FORMAT_XBGR8888,
+ DRM_FORMAT_XRGB8888 };
static const uint32_t texture_source_formats[] = { DRM_FORMAT_R8, DRM_FORMAT_YVU420,
DRM_FORMAT_YVU420_ANDROID };
void *gem_addr;
};
-static const uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_RGB565, DRM_FORMAT_XBGR8888,
- DRM_FORMAT_XBGR16161616, DRM_FORMAT_XRGB8888 };
+static const uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_RGB565, DRM_FORMAT_XBGR8888,
+ DRM_FORMAT_XRGB8888 };
static const uint32_t texture_source_formats[] = { DRM_FORMAT_R8, DRM_FORMAT_NV12,
DRM_FORMAT_YVU420, DRM_FORMAT_YVU420_ANDROID };