linux/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h

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

#ifndef _DPU_HW_SSPP_H
#define _DPU_HW_SSPP_H

#include "dpu_hw_catalog.h"
#include "dpu_hw_mdss.h"
#include "dpu_hw_util.h"
#include "dpu_formats.h"

struct dpu_hw_sspp;

/**
 * Flags
 */
#define DPU_SSPP_FLIP_LR
#define DPU_SSPP_FLIP_UD
#define DPU_SSPP_SOURCE_ROTATED_90
#define DPU_SSPP_ROT_90
#define DPU_SSPP_SOLID_FILL

/**
 * Component indices
 */
enum {};

/**
 * DPU_SSPP_RECT_SOLO - multirect disabled
 * DPU_SSPP_RECT_0 - rect0 of a multirect pipe
 * DPU_SSPP_RECT_1 - rect1 of a multirect pipe
 *
 * Note: HW supports multirect with either RECT0 or
 * RECT1. Considering no benefit of such configs over
 * SOLO mode and to keep the plane management simple,
 * we dont support single rect multirect configs.
 */
enum dpu_sspp_multirect_index {};

enum dpu_sspp_multirect_mode {};

enum {};

enum dpu_hw_filter {};

enum dpu_hw_filter_alpa {};

enum dpu_hw_filter_yuv {};

struct dpu_hw_sharp_cfg {};

struct dpu_hw_pixel_ext {};

/**
 * struct dpu_sw_pipe_cfg : software pipe configuration
 * @src_rect:  src ROI, caller takes into account the different operations
 *             such as decimation, flip etc to program this field
 * @dest_rect: destination ROI.
 */
struct dpu_sw_pipe_cfg {};

/**
 * struct dpu_hw_pipe_ts_cfg - traffic shaper configuration
 * @size: size to prefill in bytes, or zero to disable
 * @time: time to prefill in usec, or zero to disable
 */
struct dpu_hw_pipe_ts_cfg {};

/**
 * struct dpu_sw_pipe - software pipe description
 * @sspp:      backing SSPP pipe
 * @index:     index of the rectangle of SSPP
 * @mode:      parallel or time multiplex multirect mode
 */
struct dpu_sw_pipe {};

/**
 * struct dpu_hw_sspp_ops - interface to the SSPP Hw driver functions
 * Caller must call the init function to get the pipe context for each pipe
 * Assumption is these functions will be called after clocks are enabled
 */
struct dpu_hw_sspp_ops {};

/**
 * struct dpu_hw_sspp - pipe description
 * @base: hardware block base structure
 * @hw: block hardware details
 * @ubwc: UBWC configuration data
 * @idx: pipe index
 * @cap: pointer to layer_cfg
 * @ops: pointer to operations possible for this pipe
 */
struct dpu_hw_sspp {};

struct dpu_kms;
/**
 * dpu_hw_sspp_init() - Initializes the sspp hw driver object.
 * Should be called once before accessing every pipe.
 * @dev:  Corresponding device for devres management
 * @cfg:  Pipe catalog entry for which driver object is required
 * @addr: Mapped register io address of MDP
 * @mdss_data: UBWC / MDSS configuration data
 * @mdss_rev: dpu core's major and minor versions
 */
struct dpu_hw_sspp *dpu_hw_sspp_init(struct drm_device *dev,
				     const struct dpu_sspp_cfg *cfg,
				     void __iomem *addr,
				     const struct msm_mdss_data *mdss_data,
				     const struct dpu_mdss_version *mdss_rev);

int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms,
			      struct dentry *entry);

#endif /*_DPU_HW_SSPP_H */