Lines Matching +full:interrupt +full:- +full:less
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright © 2018-2020 Intel Corporation
31 struct drm_device *dev = crtc->dev; in kmb_crtc_enable_vblank()
34 /* Clear interrupt */ in kmb_crtc_enable_vblank()
36 /* Set which interval to generate vertical interrupt */ in kmb_crtc_enable_vblank()
39 /* Enable vertical interrupt */ in kmb_crtc_enable_vblank()
47 struct drm_device *dev = crtc->dev; in kmb_crtc_disable_vblank()
50 /* Clear interrupt */ in kmb_crtc_disable_vblank()
52 /* Disable vertical interrupt */ in kmb_crtc_disable_vblank()
71 struct drm_device *dev = crtc->dev; in kmb_crtc_set_mode()
72 struct drm_display_mode *m = &crtc->state->adjusted_mode; in kmb_crtc_set_mode()
78 kmb_dsi_mode_set(kmb->kmb_dsi, m, kmb->sys_clk_mhz, old_state); in kmb_crtc_set_mode()
81 m->crtc_vsync_start - m->crtc_vdisplay, in kmb_crtc_set_mode()
82 m->crtc_vtotal - m->crtc_vsync_end, in kmb_crtc_set_mode()
83 m->crtc_vsync_end - m->crtc_vsync_start, in kmb_crtc_set_mode()
84 m->crtc_hsync_start - m->crtc_hdisplay, in kmb_crtc_set_mode()
85 m->crtc_htotal - m->crtc_hsync_end, in kmb_crtc_set_mode()
86 m->crtc_hsync_end - m->crtc_hsync_start); in kmb_crtc_set_mode()
97 …drm_dbg(dev, "%s : %dactive height= %d vbp=%d vfp=%d vsync-w=%d h-active=%d h-bp=%d h-fp=%d hsync-… in kmb_crtc_set_mode()
99 m->crtc_vdisplay, vm.vback_porch, vm.vfront_porch, in kmb_crtc_set_mode()
100 vm.vsync_len, m->crtc_hdisplay, vm.hback_porch, in kmb_crtc_set_mode()
103 m->crtc_vdisplay - 1); in kmb_crtc_set_mode()
106 kmb_write_lcd(kmb, LCD_VSYNC_WIDTH, vm.vsync_len - 1); in kmb_crtc_set_mode()
108 m->crtc_hdisplay - 1); in kmb_crtc_set_mode()
111 kmb_write_lcd(kmb, LCD_HSYNC_WIDTH, vm.hsync_len - 1); in kmb_crtc_set_mode()
117 if (m->flags == DRM_MODE_FLAG_INTERLACE) { in kmb_crtc_set_mode()
119 LCD_VSYNC_WIDTH_EVEN, vm.vsync_len - 1); in kmb_crtc_set_mode()
125 m->crtc_vdisplay - 1); in kmb_crtc_set_mode()
140 clk_prepare_enable(kmb->kmb_clk.clk_lcd); in kmb_crtc_atomic_enable()
155 clk_disable_unprepare(kmb->kmb_clk.clk_lcd); in kmb_crtc_atomic_disable()
161 struct drm_device *dev = crtc->dev; in kmb_crtc_atomic_begin()
171 struct drm_device *dev = crtc->dev; in kmb_crtc_atomic_flush()
177 spin_lock_irq(&crtc->dev->event_lock); in kmb_crtc_atomic_flush()
178 if (crtc->state->event) { in kmb_crtc_atomic_flush()
180 drm_crtc_arm_vblank_event(crtc, crtc->state->event); in kmb_crtc_atomic_flush()
182 drm_crtc_send_vblank_event(crtc, crtc->state->event); in kmb_crtc_atomic_flush()
184 crtc->state->event = NULL; in kmb_crtc_atomic_flush()
185 spin_unlock_irq(&crtc->dev->event_lock); in kmb_crtc_atomic_flush()
193 struct drm_device *dev = crtc->dev; in kmb_crtc_mode_valid()
194 int vfp = mode->vsync_start - mode->vdisplay; in kmb_crtc_mode_valid()
196 if (mode->vdisplay < KMB_CRTC_MAX_HEIGHT) { in kmb_crtc_mode_valid()
197 drm_dbg(dev, "height = %d less than %d", in kmb_crtc_mode_valid()
198 mode->vdisplay, KMB_CRTC_MAX_HEIGHT); in kmb_crtc_mode_valid()
201 if (mode->hdisplay < KMB_CRTC_MAX_WIDTH) { in kmb_crtc_mode_valid()
202 drm_dbg(dev, "width = %d less than %d", in kmb_crtc_mode_valid()
203 mode->hdisplay, KMB_CRTC_MAX_WIDTH); in kmb_crtc_mode_valid()
208 drm_dbg(dev, "refresh = %d less than %d or greater than %d", in kmb_crtc_mode_valid()
214 drm_dbg(dev, "vfp = %d less than %d", vfp, KMB_CRTC_MIN_VFP); in kmb_crtc_mode_valid()
239 ret = drm_crtc_init_with_planes(drm, &kmb->crtc, &primary->base_plane, in kmb_setup_crtc()
242 kmb_plane_destroy(&primary->base_plane); in kmb_setup_crtc()
246 drm_crtc_helper_add(&kmb->crtc, &kmb_crtc_helper_funcs); in kmb_setup_crtc()