소스 검색

disp: msm: sde: add check for unsupported writeback output formats

Chroma sample types H1V2 and H2V1 are not supported in write back output.
Made changes to add atomic check for such unsupported output formats in
writeback.

Change-Id: Ic37865e0b0c64016df728cc753ad66c3b9e9d138
Signed-off-by: Andhavarapu Karthik <[email protected]>
Andhavarapu Karthik 4 년 전
부모
커밋
9c919c10f3
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      msm/sde/sde_encoder_phys_wb.c

+ 7 - 0
msm/sde/sde_encoder_phys_wb.c

@@ -839,6 +839,13 @@ static int sde_encoder_phys_wb_atomic_check(
 		return -EINVAL;
 	}
 
+	if (fmt->chroma_sample == SDE_CHROMA_H2V1 ||
+		fmt->chroma_sample == SDE_CHROMA_H1V2) {
+		SDE_ERROR("invalid chroma sample type in output format %x\n",
+			fmt->base.pixel_format);
+		return -EINVAL;
+	}
+
 	if (SDE_FORMAT_IS_UBWC(fmt) &&
 			!(wb_cfg->features & BIT(SDE_WB_UBWC))) {
 		SDE_ERROR("invalid output format %x\n", fmt->base.pixel_format);