linux/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c

// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt)

#include <uapi/drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>

#include "msm_media_info.h"
#include "dpu_kms.h"
#include "dpu_formats.h"

#define DPU_UBWC_PLANE_SIZE_ALIGNMENT

#define DPU_MAX_IMG_WIDTH
#define DPU_MAX_IMG_HEIGHT

/*
 * struct dpu_media_color_map - maps drm format to media format
 * @format: DRM base pixel format
 * @color: Media API color related to DRM format
 */
struct dpu_media_color_map {};

/* _dpu_get_v_h_subsample_rate - Get subsample rates for all formats we support
 *   Note: Not using the drm_format_*_subsampling since we have formats
 */
static void _dpu_get_v_h_subsample_rate(
	enum mdp_chroma_samp_type chroma_sample,
	uint32_t *v_sample,
	uint32_t *h_sample)
{}

static int _dpu_format_get_media_color_ubwc(const struct msm_format *fmt)
{}

static int _dpu_format_get_plane_sizes_ubwc(
		const struct msm_format *fmt,
		const uint32_t width,
		const uint32_t height,
		struct dpu_hw_fmt_layout *layout)
{}

static int _dpu_format_get_plane_sizes_linear(
		const struct msm_format *fmt,
		const uint32_t width,
		const uint32_t height,
		struct dpu_hw_fmt_layout *layout,
		const uint32_t *pitches)
{}

static int dpu_format_get_plane_sizes(
		const struct msm_format *fmt,
		const uint32_t w,
		const uint32_t h,
		struct dpu_hw_fmt_layout *layout,
		const uint32_t *pitches)
{}

static int _dpu_format_populate_addrs_ubwc(
		struct msm_gem_address_space *aspace,
		struct drm_framebuffer *fb,
		struct dpu_hw_fmt_layout *layout)
{}

static int _dpu_format_populate_addrs_linear(
		struct msm_gem_address_space *aspace,
		struct drm_framebuffer *fb,
		struct dpu_hw_fmt_layout *layout)
{}

int dpu_format_populate_layout(
		struct msm_gem_address_space *aspace,
		struct drm_framebuffer *fb,
		struct dpu_hw_fmt_layout *layout)
{}

int dpu_format_check_modified_format(
		const struct msm_kms *kms,
		const struct msm_format *fmt,
		const struct drm_mode_fb_cmd2 *cmd,
		struct drm_gem_object **bos)
{}