Browse Source

disp: msm: sde: fix hdr meta data property handling

Allow clients to reset the hdr meta data property even when
connector does not support hdr. This is required for shell stop
case cleanup when dp connector might be in disconnected state.

Change-Id: Ie0db61530216f1fab6c952933425259d32cfc834
Signed-off-by: Abhijit Kulkarni <[email protected]>
Abhijit Kulkarni 5 năm trước cách đây
mục cha
commit
ccb6ded3b9
1 tập tin đã thay đổi với 6 bổ sung6 xóa
  1. 6 6
      msm/sde/sde_connector.c

+ 6 - 6
msm/sde/sde_connector.c

@@ -1238,12 +1238,6 @@ static int _sde_connector_set_ext_hdr_info(
 		goto end;
 	}
 
-	if (!c_conn->hdr_supported) {
-		SDE_ERROR_CONN(c_conn, "sink doesn't support HDR\n");
-		rc = -ENOTSUPP;
-		goto end;
-	}
-
 	memset(&c_state->hdr_meta, 0, sizeof(c_state->hdr_meta));
 
 	if (!usr_ptr) {
@@ -1251,6 +1245,12 @@ static int _sde_connector_set_ext_hdr_info(
 		goto end;
 	}
 
+	if (!c_conn->hdr_supported) {
+		SDE_ERROR_CONN(c_conn, "sink doesn't support HDR\n");
+		rc = -ENOTSUPP;
+		goto end;
+	}
+
 	if (copy_from_user(&c_state->hdr_meta,
 		(void __user *)usr_ptr,
 			sizeof(*hdr_meta))) {