diff options
author | Brian Norris <computersforpeace@gmail.com> | 2017-05-15 14:19:19 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-05-15 14:19:19 -0400 |
commit | c316cf670491def52a396d3bdc5a63ad01f7fefa (patch) | |
tree | bf22299ce777088d190b532629b1bd647d28fab6 /drivers/gpu/drm/arm/hdlcd_crtc.c | |
parent | 6c51a52eeb58befd2e9be2ed7ee2c4c04139b336 (diff) | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) |
Merge 'v4.12-rc1' into MTD
Bring a few queued patches in sync for -next development.
Diffstat (limited to 'drivers/gpu/drm/arm/hdlcd_crtc.c')
-rw-r--r-- | drivers/gpu/drm/arm/hdlcd_crtc.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c index 20ebfb4fbdfa..798a3cc480a2 100644 --- a/drivers/gpu/drm/arm/hdlcd_crtc.c +++ b/drivers/gpu/drm/arm/hdlcd_crtc.c | |||
@@ -42,6 +42,24 @@ static void hdlcd_crtc_cleanup(struct drm_crtc *crtc) | |||
42 | drm_crtc_cleanup(crtc); | 42 | drm_crtc_cleanup(crtc); |
43 | } | 43 | } |
44 | 44 | ||
45 | static int hdlcd_crtc_enable_vblank(struct drm_crtc *crtc) | ||
46 | { | ||
47 | struct hdlcd_drm_private *hdlcd = crtc_to_hdlcd_priv(crtc); | ||
48 | unsigned int mask = hdlcd_read(hdlcd, HDLCD_REG_INT_MASK); | ||
49 | |||
50 | hdlcd_write(hdlcd, HDLCD_REG_INT_MASK, mask | HDLCD_INTERRUPT_VSYNC); | ||
51 | |||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | static void hdlcd_crtc_disable_vblank(struct drm_crtc *crtc) | ||
56 | { | ||
57 | struct hdlcd_drm_private *hdlcd = crtc_to_hdlcd_priv(crtc); | ||
58 | unsigned int mask = hdlcd_read(hdlcd, HDLCD_REG_INT_MASK); | ||
59 | |||
60 | hdlcd_write(hdlcd, HDLCD_REG_INT_MASK, mask & ~HDLCD_INTERRUPT_VSYNC); | ||
61 | } | ||
62 | |||
45 | static const struct drm_crtc_funcs hdlcd_crtc_funcs = { | 63 | static const struct drm_crtc_funcs hdlcd_crtc_funcs = { |
46 | .destroy = hdlcd_crtc_cleanup, | 64 | .destroy = hdlcd_crtc_cleanup, |
47 | .set_config = drm_atomic_helper_set_config, | 65 | .set_config = drm_atomic_helper_set_config, |
@@ -49,6 +67,8 @@ static const struct drm_crtc_funcs hdlcd_crtc_funcs = { | |||
49 | .reset = drm_atomic_helper_crtc_reset, | 67 | .reset = drm_atomic_helper_crtc_reset, |
50 | .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, | 68 | .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, |
51 | .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, | 69 | .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, |
70 | .enable_vblank = hdlcd_crtc_enable_vblank, | ||
71 | .disable_vblank = hdlcd_crtc_disable_vblank, | ||
52 | }; | 72 | }; |
53 | 73 | ||
54 | static struct simplefb_format supported_formats[] = SIMPLEFB_FORMATS; | 74 | static struct simplefb_format supported_formats[] = SIMPLEFB_FORMATS; |