Lines Matching +full:no +full:- +full:sync +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0
5 * (C) ST-Ericsson SA 2013
9 #include <linux/dma-buf.h>
11 #include <linux/media-bus-format.h>
80 mispp = readl(mcde->regs + MCDE_MISPP); in mcde_display_irq()
81 misovl = readl(mcde->regs + MCDE_MISOVL); in mcde_display_irq()
82 mischnl = readl(mcde->regs + MCDE_MISCHNL); in mcde_display_irq()
92 if (!mcde->dpi_output && mcde_dsi_irq(mcde->mdsi)) { in mcde_display_irq()
96 * In oneshot mode we do not send continuous updates in mcde_display_irq()
101 if (mcde->flow_mode == MCDE_COMMAND_ONESHOT_FLOW) { in mcde_display_irq()
102 spin_lock(&mcde->flow_lock); in mcde_display_irq()
103 if (--mcde->flow_active == 0) { in mcde_display_irq()
104 dev_dbg(mcde->dev, "TE0 IRQ\n"); in mcde_display_irq()
106 val = readl(mcde->regs + MCDE_CRA0); in mcde_display_irq()
108 writel(val, mcde->regs + MCDE_CRA0); in mcde_display_irq()
110 spin_unlock(&mcde->flow_lock); in mcde_display_irq()
116 dev_dbg(mcde->dev, "chnl A vblank IRQ\n"); in mcde_display_irq()
120 dev_dbg(mcde->dev, "chnl B vblank IRQ\n"); in mcde_display_irq()
124 dev_dbg(mcde->dev, "chnl C0 vblank IRQ\n"); in mcde_display_irq()
126 dev_dbg(mcde->dev, "chnl C1 vblank IRQ\n"); in mcde_display_irq()
128 dev_dbg(mcde->dev, "chnl C0 TE IRQ\n"); in mcde_display_irq()
130 dev_dbg(mcde->dev, "chnl C1 TE IRQ\n"); in mcde_display_irq()
131 writel(mispp, mcde->regs + MCDE_RISPP); in mcde_display_irq()
134 drm_crtc_handle_vblank(&mcde->pipe.crtc); in mcde_display_irq()
137 dev_info(mcde->dev, "some stray overlay IRQ %08x\n", misovl); in mcde_display_irq()
138 writel(misovl, mcde->regs + MCDE_RISOVL); in mcde_display_irq()
141 dev_info(mcde->dev, "some stray channel error IRQ %08x\n", in mcde_display_irq()
143 writel(mischnl, mcde->regs + MCDE_RISCHNL); in mcde_display_irq()
149 writel(0, mcde->regs + MCDE_IMSCPP); in mcde_display_disable_irqs()
150 writel(0, mcde->regs + MCDE_IMSCOVL); in mcde_display_disable_irqs()
151 writel(0, mcde->regs + MCDE_IMSCCHNL); in mcde_display_disable_irqs()
154 writel(0xFFFFFFFF, mcde->regs + MCDE_RISPP); in mcde_display_disable_irqs()
155 writel(0xFFFFFFFF, mcde->regs + MCDE_RISOVL); in mcde_display_disable_irqs()
156 writel(0xFFFFFFFF, mcde->regs + MCDE_RISCHNL); in mcde_display_disable_irqs()
163 const struct drm_display_mode *mode = &cstate->mode; in mcde_display_check() local
164 struct drm_framebuffer *old_fb = pipe->plane.state->fb; in mcde_display_check()
165 struct drm_framebuffer *fb = pstate->fb; in mcde_display_check()
172 DRM_DEBUG_KMS("FB not 32-bit aligned\n"); in mcde_display_check()
173 return -EINVAL; in mcde_display_check()
177 * There's no pitch register, the mode's hdisplay in mcde_display_check()
180 if (fb->pitches[0] != mode->hdisplay * fb->format->cpp[0]) { in mcde_display_check()
182 return -EINVAL; in mcde_display_check()
186 * We can't change the FB format in a flicker-free in mcde_display_check()
189 if (old_fb && old_fb->format != fb->format) in mcde_display_check()
190 cstate->mode_changed = true; in mcde_display_check()
324 dev_err(mcde->dev, "Unknown pixel format 0x%08x\n", in mcde_configure_extsrc()
326 return -EINVAL; in mcde_configure_extsrc()
328 writel(val, mcde->regs + conf); in mcde_configure_extsrc()
333 writel(val, mcde->regs + cr); in mcde_configure_extsrc()
341 const struct drm_display_mode *mode, in mcde_configure_overlay() argument
404 val = mode->hdisplay << MCDE_OVLXCONF_PPL_SHIFT; in mcde_configure_overlay()
405 val |= mode->vdisplay << MCDE_OVLXCONF_LPF_SHIFT; in mcde_configure_overlay()
408 writel(val, mcde->regs + conf1); in mcde_configure_overlay()
420 /* No OPQ */ in mcde_configure_overlay()
432 dev_err(mcde->dev, "Unknown pixel format 0x%08x\n", in mcde_configure_overlay()
460 dev_dbg(mcde->dev, "pixel fetcher watermark level %d pixels\n", in mcde_configure_overlay()
463 writel(val, mcde->regs + conf2); in mcde_configure_overlay()
466 writel(mcde->stride, mcde->regs + ljinc); in mcde_configure_overlay()
467 /* No cropping */ in mcde_configure_overlay()
468 writel(0, mcde->regs + crop); in mcde_configure_overlay()
480 writel(val, mcde->regs + cr); in mcde_configure_overlay()
487 writel(val, mcde->regs + comp); in mcde_configure_overlay()
492 const struct drm_display_mode *mode) in mcde_configure_channel() argument
496 u32 sync; in mcde_configure_channel() local
504 sync = MCDE_CHNL0SYNCHMOD; in mcde_configure_channel()
511 sync = MCDE_CHNL1SYNCHMOD; in mcde_configure_channel()
518 sync = MCDE_CHNL2SYNCHMOD; in mcde_configure_channel()
525 sync = MCDE_CHNL3SYNCHMOD; in mcde_configure_channel()
532 /* Set up channel 0 sync (based on chnl_update_registers()) */ in mcde_configure_channel()
533 switch (mcde->flow_mode) { in mcde_configure_channel()
535 /* Oneshot is achieved with software sync */ in mcde_configure_channel()
550 * The vendor driver uses the formatter as sync source in mcde_configure_channel()
551 * for BTA TE mode. Test to use TE if you have a panel in mcde_configure_channel()
552 * that uses this mode. in mcde_configure_channel()
571 dev_err(mcde->dev, "unknown flow mode %d\n", in mcde_configure_channel()
572 mcde->flow_mode); in mcde_configure_channel()
576 writel(val, mcde->regs + sync); in mcde_configure_channel()
579 val = (mode->hdisplay - 1) << MCDE_CHNLXCONF_PPL_SHIFT; in mcde_configure_channel()
580 val |= (mode->vdisplay - 1) << MCDE_CHNLXCONF_LPF_SHIFT; in mcde_configure_channel()
581 writel(val, mcde->regs + conf); in mcde_configure_channel()
589 writel(val, mcde->regs + stat); in mcde_configure_channel()
590 writel(0, mcde->regs + bgcol); in mcde_configure_channel()
596 mcde->regs + mux); in mcde_configure_channel()
600 mcde->regs + mux); in mcde_configure_channel()
605 * If using DPI configure the sync event. in mcde_configure_channel()
608 if (mcde->dpi_output) { in mcde_configure_channel()
611 stripwidth = 0xF000 / (mode->vdisplay * 4); in mcde_configure_channel()
612 dev_info(mcde->dev, "stripwidth: %d\n", stripwidth); in mcde_configure_channel()
615 (mode->hdisplay - 1 - stripwidth) << MCDE_SYNCHCONF_HWREQVCNT_SHIFT | in mcde_configure_channel()
617 (mode->hdisplay - 1 - stripwidth) << MCDE_SYNCHCONF_SWINTVCNT_SHIFT; in mcde_configure_channel()
621 writel(val, mcde->regs + MCDE_SYNCHCONFA); in mcde_configure_channel()
624 writel(val, mcde->regs + MCDE_SYNCHCONFB); in mcde_configure_channel()
658 * mode, and the manual says they are dedicated but identical. in mcde_configure_fifo()
695 writel(val, mcde->regs + ctrl); in mcde_configure_fifo()
700 writel(val, mcde->regs + cr0); in mcde_configure_fifo()
702 spin_lock(&mcde->fifo_crx1_lock); in mcde_configure_fifo()
703 val = readl(mcde->regs + cr1); in mcde_configure_fifo()
705 * Set-up from mcde_fmtr_dsi.c, fmtr_dsi_enable_video() in mcde_configure_fifo()
708 if (mcde->dpi_output) { in mcde_configure_fifo()
709 struct drm_connector *connector = drm_panel_bridge_connector(mcde->bridge); in mcde_configure_fifo()
712 /* Assume RGB888 24 bit if we have no further info */ in mcde_configure_fifo()
713 if (!connector->display_info.num_bus_formats) { in mcde_configure_fifo()
714 dev_info(mcde->dev, "panel does not specify bus format, assume RGB888\n"); in mcde_configure_fifo()
717 bus_format = connector->display_info.bus_formats[0]; in mcde_configure_fifo()
734 dev_err(mcde->dev, "unknown bus format, assume RGB888\n"); in mcde_configure_fifo()
744 writel(val, mcde->regs + cr1); in mcde_configure_fifo()
745 spin_unlock(&mcde->fifo_crx1_lock); in mcde_configure_fifo()
757 u32 sync; in mcde_configure_dsi_formatter() local
766 sync = MCDE_DSIVID0SYNC; in mcde_configure_dsi_formatter()
775 sync = MCDE_DSIVID1SYNC; in mcde_configure_dsi_formatter()
784 sync = MCDE_DSIVID2SYNC; in mcde_configure_dsi_formatter()
790 dev_err(mcde->dev, "tried to configure a non-DSI formatter as DSI\n"); in mcde_configure_dsi_formatter()
799 if (mcde->mdsi->mode_flags & MIPI_DSI_MODE_VIDEO) in mcde_configure_dsi_formatter()
801 switch (mcde->mdsi->format) { in mcde_configure_dsi_formatter()
811 dev_err(mcde->dev, in mcde_configure_dsi_formatter()
821 dev_err(mcde->dev, "unknown DSI format\n"); in mcde_configure_dsi_formatter()
824 writel(val, mcde->regs + conf0); in mcde_configure_dsi_formatter()
826 writel(formatter_frame, mcde->regs + frame); in mcde_configure_dsi_formatter()
827 writel(pkt_size, mcde->regs + pkt); in mcde_configure_dsi_formatter()
828 writel(0, mcde->regs + sync); in mcde_configure_dsi_formatter()
834 writel(val, mcde->regs + cmdw); in mcde_configure_dsi_formatter()
838 * CMD mode with autotrig. in mcde_configure_dsi_formatter()
840 writel(0, mcde->regs + delay0); in mcde_configure_dsi_formatter()
841 writel(0, mcde->regs + delay1); in mcde_configure_dsi_formatter()
857 dev_err(mcde->dev, "cannot enable FIFO %c\n", in mcde_enable_fifo()
862 spin_lock(&mcde->flow_lock); in mcde_enable_fifo()
863 val = readl(mcde->regs + cr); in mcde_enable_fifo()
865 writel(val, mcde->regs + cr); in mcde_enable_fifo()
866 mcde->flow_active++; in mcde_enable_fifo()
867 spin_unlock(&mcde->flow_lock); in mcde_enable_fifo()
885 dev_err(mcde->dev, "cannot disable FIFO %c\n", in mcde_disable_fifo()
890 spin_lock(&mcde->flow_lock); in mcde_disable_fifo()
891 val = readl(mcde->regs + cr); in mcde_disable_fifo()
893 writel(val, mcde->regs + cr); in mcde_disable_fifo()
894 mcde->flow_active = 0; in mcde_disable_fifo()
895 spin_unlock(&mcde->flow_lock); in mcde_disable_fifo()
901 while (readl(mcde->regs + cr) & MCDE_CRX0_FLOEN) { in mcde_disable_fifo()
903 if (!--timeout) { in mcde_disable_fifo()
904 dev_err(mcde->dev, in mcde_disable_fifo()
946 val = readl(mcde->regs + ctrl); in mcde_drain_pipe()
948 dev_err(mcde->dev, "Channel A FIFO not empty (handover)\n"); in mcde_drain_pipe()
951 /* Trigger a software sync out on respective channel (0-3) */ in mcde_drain_pipe()
952 writel(MCDE_CHNLXSYNCHSW_SW_TRIG, mcde->regs + synsw); in mcde_drain_pipe()
961 * DSI command mode line packets should be split into an even number of in mcde_dsi_get_pkt_div()
973 static void mcde_setup_dpi(struct mcde *mcde, const struct drm_display_mode *mode, in mcde_setup_dpi() argument
976 struct drm_connector *connector = drm_panel_bridge_connector(mcde->bridge); in mcde_setup_dpi()
982 hsw = mode->hsync_end - mode->hsync_start; in mcde_setup_dpi()
983 hfp = mode->hsync_start - mode->hdisplay; in mcde_setup_dpi()
984 hbp = mode->htotal - mode->hsync_end; in mcde_setup_dpi()
985 vsw = mode->vsync_end - mode->vsync_start; in mcde_setup_dpi()
986 vfp = mode->vsync_start - mode->vdisplay; in mcde_setup_dpi()
987 vbp = mode->vtotal - mode->vsync_end; in mcde_setup_dpi()
989 dev_info(mcde->dev, "output on DPI LCD from channel A\n"); in mcde_setup_dpi()
991 dev_info(mcde->dev, "HSW: %d, HFP: %d, HBP: %d, VSW: %d, VFP: %d, VBP: %d\n", in mcde_setup_dpi()
995 * The pixel fetcher is 128 64-bit words deep = 1024 bytes. in mcde_setup_dpi()
1027 writel(val, mcde->regs + MCDE_CONF0); in mcde_setup_dpi()
1029 /* This hammers us into LCD mode */ in mcde_setup_dpi()
1030 writel(0, mcde->regs + MCDE_TVCRA); in mcde_setup_dpi()
1032 /* Front porch and sync width */ in mcde_setup_dpi()
1035 writel(val, mcde->regs + MCDE_TVBL1A); in mcde_setup_dpi()
1037 writel(val, mcde->regs + MCDE_TVBL2A); in mcde_setup_dpi()
1043 writel(val, mcde->regs + MCDE_TVDVOA); in mcde_setup_dpi()
1046 writel((hbp - 1), mcde->regs + MCDE_TVTIM1A); in mcde_setup_dpi()
1048 /* Horizongal sync width and horizonal front porch, 0 = 1 cycle */ in mcde_setup_dpi()
1049 val = ((hsw - 1) << MCDE_TVLBALW_LBW_SHIFT); in mcde_setup_dpi()
1050 val |= ((hfp - 1) << MCDE_TVLBALW_ALW_SHIFT); in mcde_setup_dpi()
1051 writel(val, mcde->regs + MCDE_TVLBALWA); in mcde_setup_dpi()
1054 writel(0, mcde->regs + MCDE_TVISLA); in mcde_setup_dpi()
1055 writel(0, mcde->regs + MCDE_TVBLUA); in mcde_setup_dpi()
1057 /* Set up sync inversion etc */ in mcde_setup_dpi()
1059 if (mode->flags & DRM_MODE_FLAG_NHSYNC) in mcde_setup_dpi()
1061 if (mode->flags & DRM_MODE_FLAG_NVSYNC) in mcde_setup_dpi()
1063 if (connector->display_info.bus_flags & DRM_BUS_FLAG_DE_LOW) in mcde_setup_dpi()
1065 if (connector->display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE) in mcde_setup_dpi()
1067 writel(val, mcde->regs + MCDE_LCDTIM1A); in mcde_setup_dpi()
1070 static void mcde_setup_dsi(struct mcde *mcde, const struct drm_display_mode *mode, in mcde_setup_dsi() argument
1074 u32 formatter_ppl = mode->hdisplay; /* pixels per line */ in mcde_setup_dsi()
1075 u32 formatter_lpf = mode->vdisplay; /* lines per frame */ in mcde_setup_dsi()
1083 dev_info(mcde->dev, "output in %s mode, format %dbpp\n", in mcde_setup_dsi()
1084 (mcde->mdsi->mode_flags & MIPI_DSI_MODE_VIDEO) ? in mcde_setup_dsi()
1086 mipi_dsi_pixel_format_to_bpp(mcde->mdsi->format)); in mcde_setup_dsi()
1088 mipi_dsi_pixel_format_to_bpp(mcde->mdsi->format) / 8; in mcde_setup_dsi()
1089 dev_info(mcde->dev, "Overlay CPP: %d bytes, DSI formatter CPP %d bytes\n", in mcde_setup_dsi()
1106 writel(val, mcde->regs + MCDE_CONF0); in mcde_setup_dsi()
1112 * 128 for LCD 32bpp video mode in mcde_setup_dsi()
1113 * 48 for LCD 32bpp command mode in mcde_setup_dsi()
1114 * 128 for LCD 16bpp video mode in mcde_setup_dsi()
1115 * 64 for LCD 16bpp command mode in mcde_setup_dsi()
1119 fifo_wtrmrk = mode->hdisplay; in mcde_setup_dsi()
1120 if (mcde->mdsi->mode_flags & MIPI_DSI_MODE_VIDEO) { in mcde_setup_dsi()
1126 pkt_div = mcde_dsi_get_pkt_div(mode->hdisplay, 640); in mcde_setup_dsi()
1128 dev_dbg(mcde->dev, "FIFO watermark after flooring: %d bytes\n", in mcde_setup_dsi()
1130 dev_dbg(mcde->dev, "Packet divisor: %d bytes\n", pkt_div); in mcde_setup_dsi()
1132 /* NOTE: pkt_div is 1 for video mode */ in mcde_setup_dsi()
1135 if (!(mcde->mdsi->mode_flags & MIPI_DSI_MODE_VIDEO)) in mcde_setup_dsi()
1138 dev_dbg(mcde->dev, "DSI packet size: %d * %d bytes per line\n", in mcde_setup_dsi()
1140 dev_dbg(mcde->dev, "Overlay frame size: %u bytes\n", in mcde_setup_dsi()
1141 mode->hdisplay * mode->vdisplay * cpp); in mcde_setup_dsi()
1142 /* NOTE: pkt_div is 1 for video mode */ in mcde_setup_dsi()
1144 dev_dbg(mcde->dev, "Formatter frame size: %u bytes\n", formatter_frame); in mcde_setup_dsi()
1155 struct drm_crtc *crtc = &pipe->crtc; in mcde_display_enable()
1156 struct drm_plane *plane = &pipe->plane; in mcde_display_enable()
1157 struct drm_device *drm = crtc->dev; in mcde_display_enable()
1159 const struct drm_display_mode *mode = &cstate->mode; in mcde_display_enable() local
1160 struct drm_framebuffer *fb = plane->state->fb; in mcde_display_enable()
1161 u32 format = fb->format->format; in mcde_display_enable()
1164 int cpp = fb->format->cpp[0]; in mcde_display_enable()
1170 ret = regulator_enable(mcde->epod); in mcde_display_enable()
1172 dev_err(drm->dev, "can't re-enable EPOD regulator\n"); in mcde_display_enable()
1176 dev_info(drm->dev, "enable MCDE, %d x %d format %p4cc\n", in mcde_display_enable()
1177 mode->hdisplay, mode->vdisplay, &format); in mcde_display_enable()
1182 writel(0, mcde->regs + MCDE_IMSCERR); in mcde_display_enable()
1183 writel(0xFFFFFFFF, mcde->regs + MCDE_RISERR); in mcde_display_enable()
1185 if (mcde->dpi_output) in mcde_display_enable()
1186 mcde_setup_dpi(mcde, mode, &fifo_wtrmrk); in mcde_display_enable()
1188 mcde_setup_dsi(mcde, mode, cpp, &fifo_wtrmrk, in mcde_display_enable()
1191 mcde->stride = mode->hdisplay * cpp; in mcde_display_enable()
1192 dev_dbg(drm->dev, "Overlay line stride: %u bytes\n", in mcde_display_enable()
1193 mcde->stride); in mcde_display_enable()
1200 * EXTSRC 0 -> OVERLAY 0 -> CHANNEL 0 -> FIFO A -> DSI FORMATTER 0 in mcde_display_enable()
1208 * Configure overlay 0 according to format and mode and take input in mcde_display_enable()
1213 MCDE_CHANNEL_0, mode, format, cpp); in mcde_display_enable()
1216 * Configure pixel-per-line and line-per-frame for channel 0 and then in mcde_display_enable()
1219 mcde_configure_channel(mcde, MCDE_CHANNEL_0, MCDE_FIFO_A, mode); in mcde_display_enable()
1221 if (mcde->dpi_output) { in mcde_display_enable()
1229 lcd_freq = clk_round_rate(mcde->fifoa_clk, mode->clock * 1000); in mcde_display_enable()
1230 ret = clk_set_rate(mcde->fifoa_clk, lcd_freq); in mcde_display_enable()
1232 dev_err(mcde->dev, "failed to set LCD clock rate %lu Hz\n", in mcde_display_enable()
1234 ret = clk_prepare_enable(mcde->fifoa_clk); in mcde_display_enable()
1236 dev_err(mcde->dev, "failed to enable FIFO A DPI clock\n"); in mcde_display_enable()
1239 dev_info(mcde->dev, "LCD FIFO A clk rate %lu Hz\n", in mcde_display_enable()
1240 clk_get_rate(mcde->fifoa_clk)); in mcde_display_enable()
1250 mcde_dsi_enable(mcde->bridge); in mcde_display_enable()
1257 switch (mcde->flow_mode) { in mcde_display_enable()
1262 if (mode->flags & DRM_MODE_FLAG_NVSYNC) in mcde_display_enable()
1266 writel(val, mcde->regs + MCDE_VSCRC0); in mcde_display_enable()
1268 val = readl(mcde->regs + MCDE_CRC); in mcde_display_enable()
1270 writel(val, mcde->regs + MCDE_CRC); in mcde_display_enable()
1273 /* No TE capture */ in mcde_display_enable()
1280 * If we're using oneshot mode we don't start the flow in mcde_display_enable()
1287 if (mcde->flow_mode != MCDE_COMMAND_ONESHOT_FLOW) { in mcde_display_enable()
1289 dev_dbg(mcde->dev, "started MCDE video FIFO flow\n"); in mcde_display_enable()
1293 val = readl(mcde->regs + MCDE_CR); in mcde_display_enable()
1295 writel(val, mcde->regs + MCDE_CR); in mcde_display_enable()
1297 dev_info(drm->dev, "MCDE display is enabled\n"); in mcde_display_enable()
1302 struct drm_crtc *crtc = &pipe->crtc; in mcde_display_disable()
1303 struct drm_device *drm = crtc->dev; in mcde_display_disable()
1313 if (mcde->dpi_output) { in mcde_display_disable()
1314 clk_disable_unprepare(mcde->fifoa_clk); in mcde_display_disable()
1317 mcde_dsi_disable(mcde->bridge); in mcde_display_disable()
1320 event = crtc->state->event; in mcde_display_disable()
1322 crtc->state->event = NULL; in mcde_display_disable()
1324 spin_lock_irq(&crtc->dev->event_lock); in mcde_display_disable()
1326 spin_unlock_irq(&crtc->dev->event_lock); in mcde_display_disable()
1329 ret = regulator_disable(mcde->epod); in mcde_display_disable()
1331 dev_err(drm->dev, "can't disable EPOD regulator\n"); in mcde_display_disable()
1335 dev_info(drm->dev, "MCDE display is disabled\n"); in mcde_display_disable()
1340 /* Request a TE ACK only in TE+BTA mode */ in mcde_start_flow()
1341 if (mcde->flow_mode == MCDE_COMMAND_BTA_TE_FLOW) in mcde_start_flow()
1342 mcde_dsi_te_request(mcde->mdsi); in mcde_start_flow()
1348 * If oneshot mode is enabled, the flow will be disabled in mcde_start_flow()
1354 if (mcde->flow_mode == MCDE_COMMAND_ONESHOT_FLOW) { in mcde_start_flow()
1355 /* Trigger a software sync out on channel 0 */ in mcde_start_flow()
1357 mcde->regs + MCDE_CHNL0SYNCHSW); in mcde_start_flow()
1360 * Disable FIFO A flow again: since we are using TE sync we in mcde_start_flow()
1369 dev_dbg(mcde->dev, "started MCDE FIFO flow\n"); in mcde_start_flow()
1375 writel(buffer_address, mcde->regs + MCDE_EXTSRCXA0); in mcde_set_extsrc()
1380 writel(buffer_address + mcde->stride, mcde->regs + MCDE_EXTSRCXA1); in mcde_set_extsrc()
1386 struct drm_crtc *crtc = &pipe->crtc; in mcde_display_update()
1387 struct drm_device *drm = crtc->dev; in mcde_display_update()
1389 struct drm_pending_vblank_event *event = crtc->state->event; in mcde_display_update()
1390 struct drm_plane *plane = &pipe->plane; in mcde_display_update()
1391 struct drm_plane_state *pstate = plane->state; in mcde_display_update()
1392 struct drm_framebuffer *fb = pstate->fb; in mcde_display_update()
1400 crtc->state->event = NULL; in mcde_display_update()
1402 spin_lock_irq(&crtc->dev->event_lock); in mcde_display_update()
1410 if (crtc->state->active && drm_crtc_vblank_get(crtc) == 0) { in mcde_display_update()
1411 dev_dbg(mcde->dev, "arm vblank event\n"); in mcde_display_update()
1414 dev_dbg(mcde->dev, "insert fake vblank event\n"); in mcde_display_update()
1418 spin_unlock_irq(&crtc->dev->event_lock); in mcde_display_update()
1428 dev_info_once(mcde->dev, "first update of display contents\n"); in mcde_display_update()
1431 * oneshot mode, then we need to kick the flow right here. in mcde_display_update()
1433 if (mcde->flow_active == 0) in mcde_display_update()
1441 dev_info(mcde->dev, "ignored a display update\n"); in mcde_display_update()
1447 struct drm_crtc *crtc = &pipe->crtc; in mcde_display_enable_vblank()
1448 struct drm_device *drm = crtc->dev; in mcde_display_enable_vblank()
1459 writel(val, mcde->regs + MCDE_IMSCPP); in mcde_display_enable_vblank()
1466 struct drm_crtc *crtc = &pipe->crtc; in mcde_display_disable_vblank()
1467 struct drm_device *drm = crtc->dev; in mcde_display_disable_vblank()
1471 writel(0, mcde->regs + MCDE_IMSCPP); in mcde_display_disable_vblank()
1473 writel(0xFFFFFFFF, mcde->regs + MCDE_RISPP); in mcde_display_disable_vblank()
1512 ret = drm_simple_display_pipe_init(drm, &mcde->pipe, in mcde_display_init()
1516 mcde->connector); in mcde_display_init()