linux/drivers/gpu/drm/arm/malidp_hw.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * (C) COPYRIGHT 2016 ARM Limited. All rights reserved.
 * Author: Liviu Dudau <[email protected]>
 *
 * ARM Mali DP500/DP550/DP650 hardware manipulation routines. This is where
 * the difference between various versions of the hardware is being dealt with
 * in an attempt to provide to the rest of the driver code a unified view
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/types.h>
#include <linux/io.h>

#include <video/videomode.h>
#include <video/display_timing.h>

#include <drm/drm_fourcc.h>
#include <drm/drm_vblank.h>
#include <drm/drm_print.h>

#include "malidp_drv.h"
#include "malidp_hw.h"
#include "malidp_mw.h"

enum {};

static const struct malidp_format_id malidp500_de_formats[] =;

#define MALIDP_ID(__group, __format)

#define AFBC_YUV_422_FORMAT_ID

#define MALIDP_COMMON_FORMATS

static const struct malidp_format_id malidp550_de_formats[] =;

static const struct malidp_format_id malidp650_de_formats[] =;

static const struct malidp_layer malidp500_layers[] =;

static const struct malidp_layer malidp550_layers[] =;

static const struct malidp_layer malidp650_layers[] =;

const u64 malidp_format_modifiers[] =;

#define SE_N_SCALING_COEFFS
static const u16 dp500_se_scaling_coeffs[][SE_N_SCALING_COEFFS] =;

#define MALIDP_DE_DEFAULT_PREFETCH_START

static int malidp500_query_hw(struct malidp_hw_device *hwdev)
{}

static void malidp500_enter_config_mode(struct malidp_hw_device *hwdev)
{}

static void malidp500_leave_config_mode(struct malidp_hw_device *hwdev)
{}

static bool malidp500_in_config_mode(struct malidp_hw_device *hwdev)
{}

static void malidp500_set_config_valid(struct malidp_hw_device *hwdev, u8 value)
{}

static void malidp500_modeset(struct malidp_hw_device *hwdev, struct videomode *mode)
{}

int malidp_format_get_bpp(u32 fmt)
{}

static int malidp500_rotmem_required(struct malidp_hw_device *hwdev, u16 w,
				     u16 h, u32 fmt, bool has_modifier)
{}

static void malidp500_se_write_pp_coefftab(struct malidp_hw_device *hwdev,
					   u32 direction,
					   u16 addr,
					   u8 coeffs_id)
{}

static int malidp500_se_set_scaling_coeffs(struct malidp_hw_device *hwdev,
					   struct malidp_se_config *se_config,
					   struct malidp_se_config *old_config)
{}

static long malidp500_se_calc_mclk(struct malidp_hw_device *hwdev,
				   struct malidp_se_config *se_config,
				   struct videomode *vm)
{}

static int malidp500_enable_memwrite(struct malidp_hw_device *hwdev,
				     dma_addr_t *addrs, s32 *pitches,
				     int num_planes, u16 w, u16 h, u32 fmt_id,
				     const s16 *rgb2yuv_coeffs)
{}

static void malidp500_disable_memwrite(struct malidp_hw_device *hwdev)
{}

static int malidp550_query_hw(struct malidp_hw_device *hwdev)
{}

static void malidp550_enter_config_mode(struct malidp_hw_device *hwdev)
{}

static void malidp550_leave_config_mode(struct malidp_hw_device *hwdev)
{}

static bool malidp550_in_config_mode(struct malidp_hw_device *hwdev)
{}

static void malidp550_set_config_valid(struct malidp_hw_device *hwdev, u8 value)
{}

static void malidp550_modeset(struct malidp_hw_device *hwdev, struct videomode *mode)
{}

static int malidpx50_get_bytes_per_column(u32 fmt)
{}

static int malidp550_rotmem_required(struct malidp_hw_device *hwdev, u16 w,
				     u16 h, u32 fmt, bool has_modifier)
{}

static int malidp650_rotmem_required(struct malidp_hw_device *hwdev, u16 w,
				     u16 h, u32 fmt, bool has_modifier)
{}

static int malidp550_se_set_scaling_coeffs(struct malidp_hw_device *hwdev,
					   struct malidp_se_config *se_config,
					   struct malidp_se_config *old_config)
{}

static long malidp550_se_calc_mclk(struct malidp_hw_device *hwdev,
				   struct malidp_se_config *se_config,
				   struct videomode *vm)
{}

static int malidp550_enable_memwrite(struct malidp_hw_device *hwdev,
				     dma_addr_t *addrs, s32 *pitches,
				     int num_planes, u16 w, u16 h, u32 fmt_id,
				     const s16 *rgb2yuv_coeffs)
{}

static void malidp550_disable_memwrite(struct malidp_hw_device *hwdev)
{}

static int malidp650_query_hw(struct malidp_hw_device *hwdev)
{}

const struct malidp_hw malidp_device[MALIDP_MAX_DEVICES] =;

u8 malidp_hw_get_format_id(const struct malidp_hw_regmap *map,
			   u8 layer_id, u32 format, bool has_modifier)
{}

bool malidp_hw_format_is_linear_only(u32 format)
{}

bool malidp_hw_format_is_afbc_only(u32 format)
{}

static void malidp_hw_clear_irq(struct malidp_hw_device *hwdev, u8 block, u32 irq)
{}

static irqreturn_t malidp_de_irq(int irq, void *arg)
{}

static irqreturn_t malidp_de_irq_thread_handler(int irq, void *arg)
{}

void malidp_de_irq_hw_init(struct malidp_hw_device *hwdev)
{}

int malidp_de_irq_init(struct drm_device *drm, int irq)
{}

void malidp_de_irq_fini(struct malidp_hw_device *hwdev)
{}

static irqreturn_t malidp_se_irq(int irq, void *arg)
{}

void malidp_se_irq_hw_init(struct malidp_hw_device *hwdev)
{}

static irqreturn_t malidp_se_irq_thread_handler(int irq, void *arg)
{}

int malidp_se_irq_init(struct drm_device *drm, int irq)
{}

void malidp_se_irq_fini(struct malidp_hw_device *hwdev)
{}