File Index
Files and directories
Sign in
FILE

dpu_formats.h

File preview with syntax highlighting.

linux-6.19.14/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h C
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 3 */
 4
 5#ifndef _DPU_FORMATS_H
 6#define _DPU_FORMATS_H
 7
 8#include <drm/drm_fourcc.h>
 9#include "msm_gem.h"
10#include "dpu_hw_mdss.h"
11
12/**
13 * dpu_find_format - validate if the pixel format is supported
14 * @format:		dpu format
15 * @supported_formats:	supported formats by dpu HW
16 * @num_formatss:	total number of formats
17 *
18 * Return: false if not valid format, true on success
19 */
20static inline bool dpu_find_format(u32 format, const u32 *supported_formats,
21					size_t num_formats)
22{
23	int i;
24
25	for (i = 0; i < num_formats; i++) {
26		/* check for valid formats supported */
27		if (format == supported_formats[i])
28			return true;
29	}
30
31	return false;
32}
33
34void dpu_format_populate_addrs(struct drm_framebuffer *fb,
35			       struct dpu_hw_fmt_layout *layout);
36
37int dpu_format_populate_plane_sizes(
38		struct drm_framebuffer *fb,
39		struct dpu_hw_fmt_layout *layout);
40
41#endif /*_DPU_FORMATS_H */
~/ Read-only file preview.