drm/rockchip: Add vop output interface id

Before vop 2.0, the display sub system only
support one RGB/LVDS/eDP/HDMI/MIPI connector
for one vop, so we can find which output interface
should be enabled by output_type(DPI/LVDS/HDMI).

But for the VOP 2.0 display subsystem, we may
have two connector (LVDS/eDP/HDMI/MIPI) of the
same output_type(HDMI0,HDMI1) enabled at same time,
so the output_type is not enough to give the interface
information, we need to know HDMI0 or HDMI1, eDP0 or eDP1
should be enabled.

So we add output interface id here, every connector
driver should set it correctlly to tell vop driver
to enable the corresponding output interface.

Change-Id: Ic22863f0f18f160b0df7d8f4c3b71b17ef987ea9
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2020-10-22 16:12:02 +08:00
committed by Tao Huang
parent 07d5225f75
commit 647ef72a42

View File

@@ -97,6 +97,21 @@ struct rockchip_hdr_state {
bool hdr2sdr_en;
struct rockchip_sdr2hdr_state sdr2hdr_state;
};
#define VOP_OUTPUT_IF_RGB BIT(0)
#define VOP_OUTPUT_IF_BT1120 BIT(1)
#define VOP_OUTPUT_IF_BT656 BIT(2)
#define VOP_OUTPUT_IF_LVDS0 BIT(3)
#define VOP_OUTPUT_IF_LVDS1 BIT(4)
#define VOP_OUTPUT_IF_MIPI0 BIT(5)
#define VOP_OUTPUT_IF_MIPI1 BIT(6)
#define VOP_OUTPUT_IF_eDP0 BIT(7)
#define VOP_OUTPUT_IF_eDP1 BIT(8)
#define VOP_OUTPUT_IF_DP0 BIT(9)
#define VOP_OUTPUT_IF_DP1 BIT(10)
#define VOP_OUTPUT_IF_HDMI0 BIT(11)
#define VOP_OUTPUT_IF_HDMI1 BIT(12)
struct rockchip_crtc_state {
struct drm_crtc_state base;
struct drm_tv_connector_state *tv_state;
@@ -118,6 +133,7 @@ struct rockchip_crtc_state {
int output_mode;
int output_bpc;
int output_flags;
u32 output_if;
u32 bus_format;
u32 bus_flags;
int yuv_overlay;