/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2013 Red Hat * Author: Rob Clark <robdclark@gmail.com>
*/
#ifndef __MDP5_KMS_H__ #define __MDP5_KMS_H__
#include"msm_drv.h" #include"msm_kms.h" #include"disp/mdp_kms.h" #include"mdp5_cfg.h"/* must be included before mdp5.xml.h */ #include"mdp5.xml.h" #include"mdp5_pipe.h" #include"mdp5_mixer.h" #include"mdp5_ctl.h" #include"mdp5_smp.h"
/* * lock to protect access to global resources: ie., following register: * - REG_MDP5_DISP_INTF_SEL
*/
spinlock_t resource_lock;
bool rpm_enabled;
struct mdp_irq error_handler;
int enable_count;
}; #define to_mdp5_kms(x) container_of(x, struct mdp5_kms, base)
/* Global private object state for tracking resources that are shared across * multiple kms objects (planes/crtcs/etc).
*/ #define to_mdp5_global_state(x) container_of(x, struct mdp5_global_state, base) struct mdp5_global_state { struct drm_private_state base;
/* Atomic plane state. Subclasses the base drm_plane_state in order to * track assigned hwpipe and hw specific state.
*/ struct mdp5_plane_state { struct drm_plane_state base;
struct mdp5_hw_pipe *hwpipe; struct mdp5_hw_pipe *r_hwpipe; /* right hwpipe */
/* assigned by crtc blender */ enum mdp_mixer_stage_id stage;
/* these are derivatives of intf/mixer state in mdp5_pipeline */
u32 vblank_irqmask;
u32 err_irqmask;
u32 pp_done_irqmask;
bool cmd_mode;
/* should we not write CTL[n].START register on flush? If the * encoder has changed this is set to true, since encoder->enable() * is called after crtc state is committed, but we only want to * write the CTL[n].START register once. This lets us defer * writing CTL[n].START until encoder->enable()
*/ bool defer_start;
}; #define to_mdp5_crtc_state(x) \
container_of(x, struct mdp5_crtc_state, base)
enum mdp5_intf_mode {
MDP5_INTF_MODE_NONE = 0,
/* Modes used for DSI interface (INTF_DSI type): */
MDP5_INTF_DSI_MODE_VIDEO,
MDP5_INTF_DSI_MODE_COMMAND,
/* Modes used for WB interface (INTF_WB type): */
MDP5_INTF_WB_MODE_BLOCK,
MDP5_INTF_WB_MODE_LINE,
};
struct mdp5_interface { int idx; int num; /* display interface number */ enum mdp5_intf_type type; enum mdp5_intf_mode mode;
};
staticinlineint pipe2nclients(enum mdp5_pipe pipe)
{ switch (pipe) { case SSPP_RGB0: case SSPP_RGB1: case SSPP_RGB2: case SSPP_RGB3: return 1; default: return 3;
}
}
staticinline uint32_t intf2err(int intf_num)
{ switch (intf_num) { case 0: return MDP5_IRQ_INTF0_UNDER_RUN; case 1: return MDP5_IRQ_INTF1_UNDER_RUN; case 2: return MDP5_IRQ_INTF2_UNDER_RUN; case 3: return MDP5_IRQ_INTF3_UNDER_RUN; default: return 0;
}
}
staticinline uint32_t intf2vblank(struct mdp5_hw_mixer *mixer, struct mdp5_interface *intf)
{ /* * In case of DSI Command Mode, the Ping Pong's read pointer IRQ * acts as a Vblank signal. The Ping Pong buffer used is bound to * layer mixer.
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.