Skip to content

Commit 290cd85

Browse files
Gary_Genasus-leslieyu
authored andcommitted
drm : enable modetest to set display property
Change-Id: I1e36e30d4388b94556ec87d2956eb98ca88fba28
1 parent 6f75dc2 commit 290cd85

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/phy/phy.h>
1919
#include <dt-bindings/pinctrl/rockchip.h>
2020

21+
#include <drm/drm_atomic.h>
2122
#include <drm/drm_of.h>
2223
#include <drm/drmP.h>
2324
#include <drm/drm_crtc_helper.h>
@@ -1089,8 +1090,30 @@ dw_hdmi_rockchip_set_property(struct drm_connector *connector,
10891090
return 0;
10901091
}
10911092

1092-
DRM_ERROR("failed to set rockchip hdmi connector property\n");
1093-
return -EINVAL;
1093+
if (property != config->prop_crtc_id &&
1094+
property != config->tv_select_subconnector_property &&
1095+
property != config->tv_left_margin_property &&
1096+
property != config->tv_right_margin_property &&
1097+
property != config->tv_top_margin_property &&
1098+
property != config->tv_bottom_margin_property &&
1099+
property != config->tv_mode_property &&
1100+
property != config->tv_brightness_property &&
1101+
property != config->tv_contrast_property &&
1102+
property != config->tv_flicker_reduction_property &&
1103+
property != config->tv_overscan_property &&
1104+
property != config->tv_saturation_property &&
1105+
property != config->tv_hue_property &&
1106+
property != config->hdr_source_metadata_property) {
1107+
DRM_ERROR("failed to set rockchip hdmi connector property\n");
1108+
return -EINVAL;
1109+
}
1110+
1111+
if (!state)
1112+
return drm_atomic_helper_connector_set_property(connector,
1113+
property, val);
1114+
else
1115+
return drm_atomic_connector_set_property(connector, state,
1116+
property, val);
10941117
}
10951118

10961119
static int

0 commit comments

Comments
 (0)