文件
android_kernel_samsung_sm86…/msm/sde/sde_hw_dsc.h
Steve Cohen d9794d82cd disp: msm: sde: remove sde_hw_blk
The sde_hw_blk was meant to be a generic base object for all
SDE HW blocks, however, it enforces using a common set of ops
which is not practical when blocks have different capabilities.
Since this object was never used as intended and is not doing
anything functional today, remove the dead weight.

Change-Id: If76006c1ae5c62e8d7d77b100837dbaf6c661bd3
Signed-off-by: Steve Cohen <quic_cohens@quicinc.com>
2021-10-26 11:34:59 -07:00

102 行
2.6 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2017-2019, 2021, The Linux Foundation. All rights reserved.
*/
#ifndef _SDE_HW_DSC_H
#define _SDE_HW_DSC_H
#include "sde_hw_catalog.h"
#include "sde_hw_mdss.h"
#include "sde_hw_util.h"
struct sde_hw_dsc;
struct msm_display_dsc_info;
#define DSC_MODE_SPLIT_PANEL BIT(0)
#define DSC_MODE_MULTIPLEX BIT(1)
#define DSC_MODE_VIDEO BIT(2)
/**
* struct sde_hw_dsc_ops - interface to the dsc hardware driver functions
* Assumption is these functions will be called after clocks are enabled
*/
struct sde_hw_dsc_ops {
/**
* dsc_disable - disable dsc
* @hw_dsc: Pointer to dsc context
*/
void (*dsc_disable)(struct sde_hw_dsc *hw_dsc);
/**
* dsc_config - configures dsc encoder
* @hw_dsc: Pointer to dsc context
* @dsc: panel dsc parameters
* @mode: dsc topology mode to be set
* @ich_reset_override: option to reset ich
*/
void (*dsc_config)(struct sde_hw_dsc *hw_dsc,
struct msm_display_dsc_info *dsc,
u32 mode, bool ich_reset_override);
/**
* dsc_config_thresh - programs panel thresholds
* @hw_dsc: Pointer to dsc context
* @dsc: panel dsc parameters
*/
void (*dsc_config_thresh)(struct sde_hw_dsc *hw_dsc,
struct msm_display_dsc_info *dsc);
/**
* bind_pingpong_blk - enable/disable the connection with pp
* @hw_dsc: Pointer to dsc context
* @enable: enable/disable connection
* @pp: pingpong blk id
*/
void (*bind_pingpong_blk)(struct sde_hw_dsc *hw_dsc,
bool enable,
const enum sde_pingpong pp);
};
struct sde_hw_dsc {
struct sde_hw_blk_reg_map hw;
/* dsc */
enum sde_dsc idx;
const struct sde_dsc_cfg *caps;
/* ops */
struct sde_hw_dsc_ops ops;
};
/**
* to_sde_hw_dsc - convert base hw object to sde_hw_dsc container
* @hw: Pointer to hardware block register map object
* return: Pointer to hardware block container
*/
static inline struct sde_hw_dsc *to_sde_hw_dsc(struct sde_hw_blk_reg_map *hw)
{
return container_of(hw, struct sde_hw_dsc, hw);
}
/**
* sde_hw_dsc_init - initializes the dsc block for the passed
* dsc idx.
* @idx: DSC index for which driver object is required
* @addr: Mapped register io address of MDP
* @m: Pointer to mdss catalog data
* Returns: Error code or allocated sde_hw_dsc context
*/
struct sde_hw_blk_reg_map *sde_hw_dsc_init(enum sde_dsc idx,
void __iomem *addr,
struct sde_mdss_cfg *m);
/**
* sde_hw_dsc_destroy - destroys dsc driver context
* should be called to free the context
* @hw: Pointer to hardware block register map object
*/
void sde_hw_dsc_destroy(struct sde_hw_blk_reg_map *hw);
#endif /*_SDE_HW_DSC_H */