search for: atomic_disable

Displaying 20 results from an estimated 34 matches for "atomic_disable".

2019 Mar 11
3
[PATCH] drm/bochs: Fix NULL dereference on atomic_disable helper
...; > @@ -66,6 +71,7 @@ static const struct drm_crtc_funcs bochs_crtc_funcs = { > > > static const struct drm_crtc_helper_funcs bochs_helper_funcs = { > > > .mode_set_nofb = bochs_crtc_mode_set_nofb, > > > .atomic_enable = bochs_crtc_atomic_enable, > > > + .atomic_disable = bochs_crtc_atomic_disable, > > > > Shouldn't we make the callback optional instead of adding empty dummy > > functions to drivers? > > Hi Gerd, > > I agree, and I can work in this issue. > Just one question, should we make atomic_enable optional as well? I...
2019 Mar 11
3
[PATCH] drm/bochs: Fix NULL dereference on atomic_disable helper
...; > @@ -66,6 +71,7 @@ static const struct drm_crtc_funcs bochs_crtc_funcs = { > > > static const struct drm_crtc_helper_funcs bochs_helper_funcs = { > > > .mode_set_nofb = bochs_crtc_mode_set_nofb, > > > .atomic_enable = bochs_crtc_atomic_enable, > > > + .atomic_disable = bochs_crtc_atomic_disable, > > > > Shouldn't we make the callback optional instead of adding empty dummy > > functions to drivers? > > Hi Gerd, > > I agree, and I can work in this issue. > Just one question, should we make atomic_enable optional as well? I...
2020 Nov 14
0
[PATCH 3/8] drm/nouveau/kms/nv50-: Rename encoder->atomic_(enable|disable) callbacks
...pu/drm/nouveau/dispnv50/disp.c @@ -455,7 +455,7 @@ nv50_outp_get_old_connector(struct nouveau_encoder *outp, * DAC *****************************************************************************/ static void -nv50_dac_disable(struct drm_encoder *encoder, struct drm_atomic_state *state) +nv50_dac_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_state *state) { struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); struct nv50_core *core = nv50_disp(encoder->dev)->core; @@ -467,7 +467,7 @@ nv50_dac_disable(struct drm_encoder *encoder, struct drm_atomic_state *state) } st...
2019 Mar 11
0
[PATCH] drm/bochs: Fix NULL dereference on atomic_disable helper
...subtest basic-plain-flip from IGT project was executed on Bochs > driver, the following bug appears: > > BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 > ? drm_atomic_helper_commit_modeset_disables+0x396/0x3e0 [drm_kms_helper] > +static void bochs_crtc_atomic_disable(struct drm_crtc *crtc, > + struct drm_crtc_state *old_state) > +{ > +} > + > static void bochs_crtc_atomic_flush(struct drm_crtc *crtc, > struct drm_crtc_state *old_crtc_state) > { > @@ -66,6 +71,7 @@ static const struct drm_crtc_funcs bochs_crtc_funcs =...
2019 Mar 11
0
[PATCH] drm/bochs: Fix NULL dereference on atomic_disable helper
...7 @@ static const struct drm_crtc_funcs bochs_crtc_funcs = { > > > > static const struct drm_crtc_helper_funcs bochs_helper_funcs = { > > > > .mode_set_nofb = bochs_crtc_mode_set_nofb, > > > > .atomic_enable = bochs_crtc_atomic_enable, > > > > + .atomic_disable = bochs_crtc_atomic_disable, > > > > > > Shouldn't we make the callback optional instead of adding empty dummy > > > functions to drivers? > > > > Hi Gerd, > > > > I agree, and I can work in this issue. > > Just one question, should we...
2019 Mar 11
0
[PATCH] drm/bochs: Fix NULL dereference on atomic_disable helper
...it > > > callbacks? > > > > Probably the later. There was some reason why I've left in the empty > > bochs_crtc_atomic_enable() callback ... > > Just for checking before I start to work in this patch: > The correct solution should be made atomic_enable and atomic_disable > optional, right? I should do it, and check if Bochs driver really needs > bochs_crtc_atomic_enable after my change, right? Yup. I just tried to remember why we haven't done this yet, but I think that was a patch to make crtc->helper_funcs optional. And that doesn't make sense im...
2020 Nov 14
1
[PATCH 1/8] drm/nouveau/kms/nv50-: Use atomic encoder callbacks everywhere
It turns out that I forgot to go through and make sure that I converted all encoder callbacks to use atomic_enable/atomic_disable(), so let's go and actually do that. Signed-off-by: Lyude Paul <lyude at redhat.com> Cc: Kirill A. Shutemov <kirill at shutemov.name> Fixes: 09838c4efe9a ("drm/nouveau/kms: Search for encoders' connectors properly") --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 29 ++...
2018 Apr 20
1
[PATCH v2 4/4] qxl: drop dummy functions
...l_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void qxl_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) { @@ -476,7 +469,6 @@ static void qxl_crtc_atomic_disable(struct drm_crtc *crtc, } static const struct drm_crtc_helper_funcs qxl_crtc_helper_funcs = { - .mode_fixup = qxl_crtc_mode_fixup, .atomic_flush = qxl_crtc_atomic_flush, .atomic_enable = qxl_crtc_atomic_enable, .atomic_disable = qxl_crtc_atomic_disable, @@ -620,12 +612,6 @@ static void qxl...
2018 Oct 02
1
[PATCH] qxl: fix null-pointer crash during suspend
...all to drm_crtc_helper_add is still there. The ->disable was removed in: commit 64581714b58bc3e16ede8dc37a025c3aa0e0eef1 Author: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com> Date: Fri Jun 30 12:36:45 2017 +0300 drm: Convert atomic drivers from CRTC .disable() to .atomic_disable() Fixes: 64581714b58b ("drm: Convert atomic drivers from CRTC .disable() to .atomic_disable()") Cc: <stable at vger.kernel.org> # v4.14+ Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch> I'll let Gerd pick this one up, after some testing. Also adding Laurent. -Danie...
2018 Feb 16
0
[PATCH 4/4] qxl: drop dummy functions
...l_crtc_mode_fixup(struct drm_crtc *crtc, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void qxl_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) { @@ -476,7 +469,6 @@ static void qxl_crtc_atomic_disable(struct drm_crtc *crtc, } static const struct drm_crtc_helper_funcs qxl_crtc_helper_funcs = { - .mode_fixup = qxl_crtc_mode_fixup, .atomic_flush = qxl_crtc_atomic_flush, .atomic_enable = qxl_crtc_atomic_enable, .atomic_disable = qxl_crtc_atomic_disable, @@ -620,12 +612,6 @@ static void qxl...
2020 Jan 10
0
[PATCH 08/23] drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position()
...crtc *crtc, } } -static const struct drm_crtc_helper_funcs ltdc_crtc_helper_funcs = { - .mode_valid = ltdc_crtc_mode_valid, - .mode_fixup = ltdc_crtc_mode_fixup, - .mode_set_nofb = ltdc_crtc_mode_set_nofb, - .atomic_flush = ltdc_crtc_atomic_flush, - .atomic_enable = ltdc_crtc_atomic_enable, - .atomic_disable = ltdc_crtc_atomic_disable, -}; - -static int ltdc_crtc_enable_vblank(struct drm_crtc *crtc) -{ - struct ltdc_device *ldev = crtc_to_ltdc(crtc); - - DRM_DEBUG_DRIVER("\n"); - reg_set(ldev->regs, LTDC_IER, IER_LIE); - - return 0; -} - -static void ltdc_crtc_disable_vblank(struct drm_crt...
2020 Jan 23
0
[PATCH v4 14/22] drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position()
...crtc *crtc, } } -static const struct drm_crtc_helper_funcs ltdc_crtc_helper_funcs = { - .mode_valid = ltdc_crtc_mode_valid, - .mode_fixup = ltdc_crtc_mode_fixup, - .mode_set_nofb = ltdc_crtc_mode_set_nofb, - .atomic_flush = ltdc_crtc_atomic_flush, - .atomic_enable = ltdc_crtc_atomic_enable, - .atomic_disable = ltdc_crtc_atomic_disable, -}; - -static int ltdc_crtc_enable_vblank(struct drm_crtc *crtc) -{ - struct ltdc_device *ldev = crtc_to_ltdc(crtc); - - DRM_DEBUG_DRIVER("\n"); - reg_set(ldev->regs, LTDC_IER, IER_LIE); - - return 0; -} - -static void ltdc_crtc_disable_vblank(struct drm_crt...
2020 Jan 14
1
[PATCH 01/23] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs
...a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h index 5a87f1bd7a3f..e398512bfd5f 100644 --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h @@ -450,6 +450,53 @@ struct drm_crtc_helper_funcs { */ void (*atomic_disable)(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state); + + /** + * @get_scanout_position: + * + * Called by vblank timestamping code. + * + * Returns the current display scanout position from a CRTC and an + * o...
2020 Aug 20
0
[RFC v2 06/20] drm/nouveau/kms: Search for encoders' connectors properly
...reak; default: BUG(); @@ -1706,8 +1759,8 @@ nv50_sor_enable(struct drm_encoder *encoder) static const struct drm_encoder_helper_funcs nv50_sor_help = { .atomic_check = nv50_outp_atomic_check, - .enable = nv50_sor_enable, - .disable = nv50_sor_disable, + .atomic_enable = nv50_sor_enable, + .atomic_disable = nv50_sor_disable, }; static void @@ -2066,7 +2119,7 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) outp->clr.mask, outp->set.mask); if (outp->clr.mask) { - help->disable(encoder); + help->atomic_disable(encoder, state); interlock[NV50_DISP_IN...
2020 Jan 10
0
[PATCH 07/23] drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position()
...c *crtc = drm_crtc_from_index(dev, crtc_id); struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); u32 val; int fifo_lines; @@ -1039,6 +1040,7 @@ static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = { .atomic_flush = vc4_crtc_atomic_flush, .atomic_enable = vc4_crtc_atomic_enable, .atomic_disable = vc4_crtc_atomic_disable, + .get_scanout_position = vc4_crtc_get_scanout_position, }; static const struct vc4_crtc_data pv0_data = { diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 5e6fb6c2307f..e6982a7b0c5e 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/driv...
2020 Jan 15
0
[PATCH v2 17/21] drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position()
...c *crtc = drm_crtc_from_index(dev, crtc_id); struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); u32 val; int fifo_lines; @@ -1039,6 +1040,7 @@ static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = { .atomic_flush = vc4_crtc_atomic_flush, .atomic_enable = vc4_crtc_atomic_enable, .atomic_disable = vc4_crtc_atomic_disable, + .get_scanout_position = vc4_crtc_get_scanout_position, }; static const struct vc4_crtc_data pv0_data = { diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 5e6fb6c2307f..e6982a7b0c5e 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/driv...
2020 Jun 24
0
[RFC v7 02/11] drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_off()
...tion, but seeing the irqsave/irqrestore variants of spin_(un)lock() didn't make it very clear whether or not that would actually be safe. So I went ahead and reviewed every single driver in the kernel that uses this function, and they all fall into three categories: * Driver probe code * ->atomic_disable() callbacks * Legacy modesetting callbacks All of these will be guaranteed to have IRQs enabled, which means it's perfectly safe to block here. Just to make things a little less confusing to others in the future, let's switch over to spin_lock_irq()/spin_unlock_irq() to make that fact a li...
2020 Nov 14
0
[PATCH 2/8] drm/nouveau/kms/nv50-: Remove (nv_encoder->crtc) checks in ->disable callbacks
Noticed these in both the disable (which we'll be getting rid of in a moment) and the atomic disable callbacks: both callback types check whether or not there's actually a CRTC assigned to the given encoder. However, as ->atomic_disable and ->disable will never be called without a CRTC assigned to the given encoder there's no point in this check. So just remove it. Signed-off-by: Lyude Paul <lyude at redhat.com> --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 37 ++++++++++++------------- 1 file changed, 17 insertions...
2020 Jan 10
0
[PATCH 01/23] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs
..., diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h index 5a87f1bd7a3f..e398512bfd5f 100644 --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h @@ -450,6 +450,53 @@ struct drm_crtc_helper_funcs { */ void (*atomic_disable)(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state); + + /** + * @get_scanout_position: + * + * Called by vblank timestamping code. + * + * Returns the current display scanout position from a CRTC and an + * optional accurate ktime_get() timestamp of when the position wa...
2020 Jan 10
0
[PATCH 01/23] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs
..._modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h > index 5a87f1bd7a3f..e398512bfd5f 100644 > --- a/include/drm/drm_modeset_helper_vtables.h > +++ b/include/drm/drm_modeset_helper_vtables.h > @@ -450,6 +450,53 @@ struct drm_crtc_helper_funcs { > */ > void (*atomic_disable)(struct drm_crtc *crtc, > struct drm_crtc_state *old_crtc_state); > + > + /** > + * @get_scanout_position: > + * > + * Called by vblank timestamping code. > + * > + * Returns the current display scanout position from a CRTC and an > + * optional accurate...