Browse Source

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 năm trước cách đây
mục cha
commit
9c919c10f3
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  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);