Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'exynos-drm-next-for-v4.18-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next

Add more HW overlays support
- It enables hardware overlay number 4 and 5. For this,
this patch series adds required clocks.

Several fixups
- Fix default value of zpos according to real hardware overlay number.
- Fix error value of exynos_Drm_crtc_get_by_type function correctly.
- Fix static checker warning of scaler_task_done function.
- Fix signedness bug in fimc_setup_clocks function.

One cleanup
- Disable framedone interrupt of DSI device which is not required.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1527229919-25665-1-git-send-email-inki.dae@samsung.com

+29 -22
+7 -2
Documentation/devicetree/bindings/display/exynos/exynos5433-decon.txt
··· 19 19 clock-names property. 20 20 - clock-names: list of clock names sorted in the same order as the clocks 21 21 property. Must contain "pclk", "aclk_decon", "aclk_smmu_decon0x", 22 - "aclk_xiu_decon0x", "pclk_smmu_decon0x", clk_decon_vclk", 22 + "aclk_xiu_decon0x", "pclk_smmu_decon0x", "aclk_smmu_decon1x", 23 + "aclk_xiu_decon1x", "pclk_smmu_decon1x", clk_decon_vclk", 23 24 "sclk_decon_eclk" 24 25 - ports: contains a port which is connected to mic node. address-cells and 25 26 size-cells must 1 and 0, respectively. ··· 35 34 clocks = <&cmu_disp CLK_ACLK_DECON>, <&cmu_disp CLK_ACLK_SMMU_DECON0X>, 36 35 <&cmu_disp CLK_ACLK_XIU_DECON0X>, 37 36 <&cmu_disp CLK_PCLK_SMMU_DECON0X>, 37 + <&cmu_disp CLK_ACLK_SMMU_DECON1X>, 38 + <&cmu_disp CLK_ACLK_XIU_DECON1X>, 39 + <&cmu_disp CLK_PCLK_SMMU_DECON1X>, 38 40 <&cmu_disp CLK_SCLK_DECON_VCLK>, 39 41 <&cmu_disp CLK_SCLK_DECON_ECLK>; 40 42 clock-names = "aclk_decon", "aclk_smmu_decon0x", "aclk_xiu_decon0x", 41 - "pclk_smmu_decon0x", "sclk_decon_vclk", "sclk_decon_eclk"; 43 + "pclk_smmu_decon0x", "aclk_smmu_decon1x", "aclk_xiu_decon1x", 44 + "pclk_smmu_decon1x", "sclk_decon_vclk", "sclk_decon_eclk"; 42 45 interrupt-names = "vsync", "lcd_sys"; 43 46 interrupts = <0 202 0>, <0 203 0>; 44 47
+12 -9
drivers/gpu/drm/exynos/exynos5433_drm_decon.c
··· 31 31 #define DSD_CFG_MUX 0x1004 32 32 #define DSD_CFG_MUX_TE_UNMASK_GLOBAL BIT(13) 33 33 34 - #define WINDOWS_NR 3 34 + #define WINDOWS_NR 5 35 + #define PRIMARY_WIN 2 36 + #define CURSON_WIN 4 37 + 35 38 #define MIN_FB_WIDTH_FOR_16WORD_BURST 128 36 39 37 40 #define I80_HW_TRG (1 << 0) ··· 46 43 "aclk_smmu_decon0x", 47 44 "aclk_xiu_decon0x", 48 45 "pclk_smmu_decon0x", 46 + "aclk_smmu_decon1x", 47 + "aclk_xiu_decon1x", 48 + "pclk_smmu_decon1x", 49 49 "sclk_decon_vclk", 50 50 "sclk_decon_eclk", 51 51 }; ··· 80 74 }; 81 75 82 76 static const enum drm_plane_type decon_win_types[WINDOWS_NR] = { 83 - DRM_PLANE_TYPE_PRIMARY, 84 - DRM_PLANE_TYPE_OVERLAY, 85 - DRM_PLANE_TYPE_CURSOR, 77 + [PRIMARY_WIN] = DRM_PLANE_TYPE_PRIMARY, 78 + [CURSON_WIN] = DRM_PLANE_TYPE_CURSOR, 86 79 }; 87 80 88 81 static inline void decon_set_bits(struct decon_context *ctx, u32 reg, u32 mask, ··· 557 552 drm_dev->max_vblank_count = 0xffffffff; 558 553 559 554 for (win = ctx->first_win; win < WINDOWS_NR; win++) { 560 - int tmp = (win == ctx->first_win) ? 0 : win; 561 - 562 555 ctx->configs[win].pixel_formats = decon_formats; 563 556 ctx->configs[win].num_pixel_formats = ARRAY_SIZE(decon_formats); 564 - ctx->configs[win].zpos = win; 565 - ctx->configs[win].type = decon_win_types[tmp]; 557 + ctx->configs[win].zpos = win - ctx->first_win; 558 + ctx->configs[win].type = decon_win_types[win]; 566 559 567 560 ret = exynos_plane_init(drm_dev, &ctx->planes[win], win, 568 561 &ctx->configs[win]); ··· 568 565 return ret; 569 566 } 570 567 571 - exynos_plane = &ctx->planes[ctx->first_win]; 568 + exynos_plane = &ctx->planes[PRIMARY_WIN]; 572 569 out_type = (ctx->out_type & IFTYPE_HDMI) ? EXYNOS_DISPLAY_TYPE_HDMI 573 570 : EXYNOS_DISPLAY_TYPE_LCD; 574 571 ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,
+1 -1
drivers/gpu/drm/exynos/exynos_drm_crtc.c
··· 228 228 if (to_exynos_crtc(crtc)->type == out_type) 229 229 return to_exynos_crtc(crtc); 230 230 231 - return ERR_PTR(-EPERM); 231 + return ERR_PTR(-ENODEV); 232 232 } 233 233 234 234 int exynos_drm_set_possible_crtcs(struct drm_encoder *encoder,
+3 -3
drivers/gpu/drm/exynos/exynos_drm_dsi.c
··· 1264 1264 1265 1265 if (status & DSIM_INT_SW_RST_RELEASE) { 1266 1266 u32 mask = ~(DSIM_INT_RX_DONE | DSIM_INT_SFR_FIFO_EMPTY | 1267 - DSIM_INT_SFR_HDR_FIFO_EMPTY | DSIM_INT_FRAME_DONE | 1268 - DSIM_INT_RX_ECC_ERR | DSIM_INT_SW_RST_RELEASE); 1267 + DSIM_INT_SFR_HDR_FIFO_EMPTY | DSIM_INT_RX_ECC_ERR | 1268 + DSIM_INT_SW_RST_RELEASE); 1269 1269 exynos_dsi_write(dsi, DSIM_INTMSK_REG, mask); 1270 1270 complete(&dsi->completed); 1271 1271 return IRQ_HANDLED; 1272 1272 } 1273 1273 1274 1274 if (!(status & (DSIM_INT_RX_DONE | DSIM_INT_SFR_FIFO_EMPTY | 1275 - DSIM_INT_FRAME_DONE | DSIM_INT_PLL_STABLE))) 1275 + DSIM_INT_PLL_STABLE))) 1276 1276 return IRQ_HANDLED; 1277 1277 1278 1278 if (exynos_dsi_transfer_finish(dsi))
+1 -1
drivers/gpu/drm/exynos/exynos_drm_fimc.c
··· 1200 1200 1201 1201 int exynos_drm_check_fimc_device(struct device *dev) 1202 1202 { 1203 - unsigned int id = of_alias_get_id(dev->of_node, "fimc"); 1203 + int id = of_alias_get_id(dev->of_node, "fimc"); 1204 1204 1205 1205 if (id >= 0 && (BIT(id) & fimc_mask)) 1206 1206 return 0;
+4 -5
drivers/gpu/drm/exynos/exynos_drm_plane.c
··· 289 289 }; 290 290 291 291 static void exynos_plane_attach_zpos_property(struct drm_plane *plane, 292 - bool immutable) 292 + int zpos, bool immutable) 293 293 { 294 - /* FIXME */ 295 294 if (immutable) 296 - drm_plane_create_zpos_immutable_property(plane, 0); 295 + drm_plane_create_zpos_immutable_property(plane, zpos); 297 296 else 298 - drm_plane_create_zpos_property(plane, 0, 0, MAX_PLANE - 1); 297 + drm_plane_create_zpos_property(plane, zpos, 0, MAX_PLANE - 1); 299 298 } 300 299 301 300 int exynos_plane_init(struct drm_device *dev, ··· 319 320 exynos_plane->index = index; 320 321 exynos_plane->config = config; 321 322 322 - exynos_plane_attach_zpos_property(&exynos_plane->base, 323 + exynos_plane_attach_zpos_property(&exynos_plane->base, config->zpos, 323 324 !(config->capabilities & EXYNOS_DRM_PLANE_CAP_ZPOS)); 324 325 325 326 return 0;
+1 -1
drivers/gpu/drm/exynos/exynos_drm_scaler.c
··· 397 397 return scaler_read(SCALER_INT_STATUS); 398 398 } 399 399 400 - static inline bool scaler_task_done(u32 val) 400 + static inline int scaler_task_done(u32 val) 401 401 { 402 402 return val & SCALER_INT_STATUS_FRAME_END ? 0 : -EINVAL; 403 403 }