drm/rockchip: drv: add common property for vop and vop2

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ied641fcf9843c1a39500ece1d15913a5405efa38
This commit is contained in:
Sandy Huang
2021-09-16 15:34:58 +08:00
committed by Tao Huang
parent 7efebce0d3
commit cd392c00db
2 changed files with 24 additions and 0 deletions

View File

@@ -461,6 +461,20 @@ static int rockchip_drm_create_properties(struct drm_device *dev)
return -ENOMEM;
private->connector_id_prop = prop;
prop = drm_property_create_object(dev,
DRM_MODE_PROP_ATOMIC | DRM_MODE_PROP_IMMUTABLE,
"SOC_ID", DRM_MODE_OBJECT_CRTC);
private->soc_id_prop = prop;
prop = drm_property_create_object(dev,
DRM_MODE_PROP_ATOMIC | DRM_MODE_PROP_IMMUTABLE,
"PORT_ID", DRM_MODE_OBJECT_CRTC);
private->port_id_prop = prop;
private->aclk_prop = drm_property_create_range(dev, 0, "ACLK", 0, UINT_MAX);
private->bg_prop = drm_property_create_range(dev, 0, "BACKGROUND", 0, UINT_MAX);
private->line_flag_prop = drm_property_create_range(dev, 0, "LINE_FLAG1", 0, UINT_MAX);
return drm_mode_create_tv_properties(dev, 0, NULL);
}

View File

@@ -182,6 +182,14 @@ struct rockchip_drm_private {
struct mutex psr_list_lock;
struct mutex commit_lock;
/* private crtc prop */
struct drm_property *soc_id_prop;
struct drm_property *port_id_prop;
struct drm_property *aclk_prop;
struct drm_property *bg_prop;
struct drm_property *line_flag_prop;
/* private plane prop */
struct drm_property *eotf_prop;
struct drm_property *color_space_prop;
struct drm_property *global_alpha_prop;
@@ -189,6 +197,8 @@ struct rockchip_drm_private {
struct drm_property *alpha_scale_prop;
struct drm_property *async_commit_prop;
struct drm_property *share_id_prop;
/* private connector prop */
struct drm_property *connector_id_prop;
const struct rockchip_crtc_funcs *crtc_funcs[ROCKCHIP_MAX_CRTC];