Files
android_kernel_samsung_sm86…/msm/sde/sde_hw_dsc.h
Narendra Muppalla 3709853456 Display drivers kernel project initial snapshot
This change brings msm display driver including sde,
dp, dsi, rotator, dsi pll and dp pll from base 4.19 kernel
project. It is first source code snapshot from base kernel project.

Change-Id: Iec864c064ce5ea04e170f24414c728684002f284
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2019-04-14 22:20:59 -07:00

104 baris
2.7 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2017-2019, 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"
#include "sde_hw_blk.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 base;
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;
};
/**
* sde_hw_dsc - convert base object sde_hw_base to container
* @hw: Pointer to base hardware block
* return: Pointer to hardware block container
*/
static inline struct sde_hw_dsc *to_sde_hw_dsc(struct sde_hw_blk *hw)
{
return container_of(hw, struct sde_hw_dsc, base);
}
/**
* 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_dsc *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
* @dsc: Pointer to dsc driver context returned by sde_hw_dsc_init
*/
void sde_hw_dsc_destroy(struct sde_hw_dsc *dsc);
#endif /*_SDE_HW_DSC_H */