diff options
Diffstat (limited to 'drivers/gpu/drm/imx/ipuv3-crtc.c')
-rw-r--r-- | drivers/gpu/drm/imx/ipuv3-crtc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c index b2c30b8d9816..fc040417e1e8 100644 --- a/drivers/gpu/drm/imx/ipuv3-crtc.c +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c | |||
@@ -66,6 +66,7 @@ struct ipu_crtc { | |||
66 | struct ipu_flip_work *flip_work; | 66 | struct ipu_flip_work *flip_work; |
67 | int irq; | 67 | int irq; |
68 | u32 bus_format; | 68 | u32 bus_format; |
69 | u32 bus_flags; | ||
69 | int di_hsync_pin; | 70 | int di_hsync_pin; |
70 | int di_vsync_pin; | 71 | int di_vsync_pin; |
71 | }; | 72 | }; |
@@ -271,8 +272,10 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, | |||
271 | else | 272 | else |
272 | sig_cfg.clkflags = 0; | 273 | sig_cfg.clkflags = 0; |
273 | 274 | ||
274 | sig_cfg.enable_pol = 1; | 275 | sig_cfg.enable_pol = !(ipu_crtc->bus_flags & DRM_BUS_FLAG_DE_LOW); |
275 | sig_cfg.clk_pol = 0; | 276 | /* Default to driving pixel data on negative clock edges */ |
277 | sig_cfg.clk_pol = !!(ipu_crtc->bus_flags & | ||
278 | DRM_BUS_FLAG_PIXDATA_POSEDGE); | ||
276 | sig_cfg.bus_format = ipu_crtc->bus_format; | 279 | sig_cfg.bus_format = ipu_crtc->bus_format; |
277 | sig_cfg.v_to_h_sync = 0; | 280 | sig_cfg.v_to_h_sync = 0; |
278 | sig_cfg.hsync_pin = ipu_crtc->di_hsync_pin; | 281 | sig_cfg.hsync_pin = ipu_crtc->di_hsync_pin; |
@@ -396,11 +399,12 @@ static void ipu_disable_vblank(struct drm_crtc *crtc) | |||
396 | } | 399 | } |
397 | 400 | ||
398 | static int ipu_set_interface_pix_fmt(struct drm_crtc *crtc, | 401 | static int ipu_set_interface_pix_fmt(struct drm_crtc *crtc, |
399 | u32 bus_format, int hsync_pin, int vsync_pin) | 402 | u32 bus_format, int hsync_pin, int vsync_pin, u32 bus_flags) |
400 | { | 403 | { |
401 | struct ipu_crtc *ipu_crtc = to_ipu_crtc(crtc); | 404 | struct ipu_crtc *ipu_crtc = to_ipu_crtc(crtc); |
402 | 405 | ||
403 | ipu_crtc->bus_format = bus_format; | 406 | ipu_crtc->bus_format = bus_format; |
407 | ipu_crtc->bus_flags = bus_flags; | ||
404 | ipu_crtc->di_hsync_pin = hsync_pin; | 408 | ipu_crtc->di_hsync_pin = hsync_pin; |
405 | ipu_crtc->di_vsync_pin = vsync_pin; | 409 | ipu_crtc->di_vsync_pin = vsync_pin; |
406 | 410 | ||