search for: helper_private

Displaying 20 results from an estimated 75 matches for "helper_private".

2020 Jan 10
0
[PATCH 09/23] drm: Remove struct drm_driver.get_scanout_position()
...00644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -633,8 +633,7 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, } /* Scanout position query not supported? Should not happen. */ - if (!dev->driver->get_scanout_position || - !crtc->helper_private->get_scanout_position) { + if (!crtc->helper_private->get_scanout_position) { DRM_ERROR("Called from CRTC w/o get_scanout_position()!?\n"); return false; } @@ -666,17 +665,9 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, * Get vertical and horiz...
2020 Jan 14
1
[PATCH 01/23] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs
...} /* Scanout position query not supported? Should not happen. */ - if (!dev->driver->get_scanout_position) { - DRM_ERROR("Called from driver w/o get_scanout_position()!?\n"); + if (!dev->driver->get_scanout_position || + !crtc->helper_private->get_scanout_position) { + DRM_ERROR("Called from CRTC w/o get_scanout_position()!?\n"); return false; } @@ -664,11 +666,17 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, * Get vertical and horizontal scanou...
2018 Oct 02
1
[PATCH] qxl: fix null-pointer crash during suspend
On Tue, Sep 04, 2018 at 10:27:47PM +0200, Peter Wu wrote: > "crtc->helper_private" is not initialized by the QXL driver and thus the This is still initialized, it's the ->disable that goes boom. At least the call to drm_crtc_helper_add is still there. The ->disable was removed in: commit 64581714b58bc3e16ede8dc37a025c3aa0e0eef1 Author: Laurent Pinchart <laure...
2020 Jan 10
0
[PATCH 01/23] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs
..._scanoutpos(struct drm_device *dev, } /* Scanout position query not supported? Should not happen. */ - if (!dev->driver->get_scanout_position) { - DRM_ERROR("Called from driver w/o get_scanout_position()!?\n"); + if (!dev->driver->get_scanout_position || + !crtc->helper_private->get_scanout_position) { + DRM_ERROR("Called from CRTC w/o get_scanout_position()!?\n"); return false; } @@ -664,11 +666,17 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, * Get vertical and horizontal scanout position vpos, hpos, * and bounding ti...
2020 Jan 10
0
[PATCH 01/23] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs
...> } > > /* Scanout position query not supported? Should not happen. */ > - if (!dev->driver->get_scanout_position) { > - DRM_ERROR("Called from driver w/o get_scanout_position()!?\n"); > + if (!dev->driver->get_scanout_position || > + !crtc->helper_private->get_scanout_position) { ITYM s/||/&&/ BR, Jani. > + DRM_ERROR("Called from CRTC w/o get_scanout_position()!?\n"); > return false; > } > > @@ -664,11 +666,17 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, > * Get vertical...
2020 Jul 09
3
[PATCH 2/2] drm/virtio: Remove open-coded commit-tail function
...@@ -346,7 +327,6 @@ void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) drm_mode_config_init(vgdev->ddev); vgdev->ddev->mode_config.quirk_addfb_prefer_host_byte_order = true; vgdev->ddev->mode_config.funcs = &virtio_gpu_mode_funcs; - vgdev->ddev->mode_config.helper_private = &virtio_mode_config_helpers; /* modes will be validated against the framebuffer size */ vgdev->ddev->mode_config.min_width = XRES_MIN; -- 2.27.0
2020 Jul 09
3
[PATCH 2/2] drm/virtio: Remove open-coded commit-tail function
...@@ -346,7 +327,6 @@ void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) drm_mode_config_init(vgdev->ddev); vgdev->ddev->mode_config.quirk_addfb_prefer_host_byte_order = true; vgdev->ddev->mode_config.funcs = &virtio_gpu_mode_funcs; - vgdev->ddev->mode_config.helper_private = &virtio_mode_config_helpers; /* modes will be validated against the framebuffer size */ vgdev->ddev->mode_config.min_width = XRES_MIN; -- 2.27.0
2016 Jun 02
4
[PATCH 01/20] drm/atomic: Fix remaining places where !funcs->best_encoder is valid
...b/drivers/gpu/drm/drm_fb_helper.c index 7c2eb75..d44389a 100644 > --- a/drivers/gpu/drm/drm_fb_helper.c > +++ b/drivers/gpu/drm/drm_fb_helper.c > @@ -2000,7 +2000,18 @@ static int drm_pick_crtcs(struct drm_fb_helper > *fb_helper, my_score++; > > connector_funcs = connector->helper_private; > - encoder = connector_funcs->best_encoder(connector); > + > + /* > + * If the DRM device implements atomic hooks and ->best_encoder() is > + * NULL we fallback to the default drm_atomic_helper_best_encoder() > + * helper. > + */ > + if (fb_helper->dev->mod...
2016 Jun 02
4
[PATCH 01/20] drm/atomic: Fix remaining places where !funcs->best_encoder is valid
...b/drivers/gpu/drm/drm_fb_helper.c index 7c2eb75..d44389a 100644 > --- a/drivers/gpu/drm/drm_fb_helper.c > +++ b/drivers/gpu/drm/drm_fb_helper.c > @@ -2000,7 +2000,18 @@ static int drm_pick_crtcs(struct drm_fb_helper > *fb_helper, my_score++; > > connector_funcs = connector->helper_private; > - encoder = connector_funcs->best_encoder(connector); > + > + /* > + * If the DRM device implements atomic hooks and ->best_encoder() is > + * NULL we fallback to the default drm_atomic_helper_best_encoder() > + * helper. > + */ > + if (fb_helper->dev->mod...
2019 Nov 08
0
[PATCH AUTOSEL 4.19 085/205] qxl: fix null-pointer crash during suspend
From: Peter Wu <peter at lekensteyn.nl> [ Upstream commit 7948a2b15873319d1bff4d37c09b9f2bf87b9021 ] "crtc->helper_private" is not initialized by the QXL driver and thus the "crtc_funcs->disable" call would crash (resulting in suspend failure). Fix this by converting the suspend/resume functions to use the drm_mode_config_helper_* helpers. Tested system sleep with QEMU 3.0 using "echo mem > /...
2020 Jan 20
0
[PATCH v3 22/22] drm: Remove legacy version of get_scanout_position()
...Return as no-op if scanout query unsupported or failed. */ if (!vbl_status) { @@ -755,7 +742,7 @@ bool drm_crtc_vblank_helper_get_vblank_timestamp(struct drm_crtc *crtc, { return drm_crtc_vblank_helper_get_vblank_timestamp_internal( crtc, max_error, vblank_time, in_vblank_irq, - crtc->helper_private->get_scanout_position, NULL); + crtc->helper_private->get_scanout_position); } EXPORT_SYMBOL(drm_crtc_vblank_helper_get_vblank_timestamp); diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 29bf847999f5..3245f7c5c84f 100644 --- a/drivers/gpu/drm/i915/...
2020 Jan 20
0
[PATCH v3 22/22] drm: Remove legacy version of get_scanout_position()
...ery unsupported or failed. */ > if (!vbl_status) { > @@ -755,7 +742,7 @@ bool drm_crtc_vblank_helper_get_vblank_timestamp(struct drm_crtc *crtc, > { > return drm_crtc_vblank_helper_get_vblank_timestamp_internal( > crtc, max_error, vblank_time, in_vblank_irq, > - crtc->helper_private->get_scanout_position, NULL); > + crtc->helper_private->get_scanout_position); > } > EXPORT_SYMBOL(drm_crtc_vblank_helper_get_vblank_timestamp); > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > index 29bf847999f5..3245f7c5c84f 1006...
2016 Jun 03
1
[PATCH 01/20] drm/atomic: Fix remaining places where !funcs->best_encoder is valid
...100644 > >> --- a/drivers/gpu/drm/drm_fb_helper.c > >> +++ b/drivers/gpu/drm/drm_fb_helper.c > >> @@ -2000,7 +2000,18 @@ static int drm_pick_crtcs(struct drm_fb_helper > >> *fb_helper, my_score++; > >> > >> connector_funcs = connector->helper_private; > >> - encoder = connector_funcs->best_encoder(connector); > >> + > >> + /* > >> + * If the DRM device implements atomic hooks and ->best_encoder() is > >> + * NULL we fallback to the default drm_atomic_helper_best_encoder() >...
2016 Jun 03
1
[PATCH 01/20] drm/atomic: Fix remaining places where !funcs->best_encoder is valid
...100644 > >> --- a/drivers/gpu/drm/drm_fb_helper.c > >> +++ b/drivers/gpu/drm/drm_fb_helper.c > >> @@ -2000,7 +2000,18 @@ static int drm_pick_crtcs(struct drm_fb_helper > >> *fb_helper, my_score++; > >> > >> connector_funcs = connector->helper_private; > >> - encoder = connector_funcs->best_encoder(connector); > >> + > >> + /* > >> + * If the DRM device implements atomic hooks and ->best_encoder() is > >> + * NULL we fallback to the default drm_atomic_helper_best_encoder() >...
2019 Jul 07
2
[PATCH v2 3/6] drm/fb-helper: Instanciate shadow FB if configured in device's mode_config
...less likely to be forgotten when things change. And we don't use line cont. when the doc line is too long. Just continue on the next line after an asterix. > * @cursor_width: hint to userspace for max cursor width > * @cursor_height: hint to userspace for max cursor height > * @helper_private: mid-layer private data > @@ -852,6 +854,9 @@ struct drm_mode_config { > /* dumb ioctl parameters */ > uint32_t preferred_depth, prefer_shadow; > > + /* fbdev parameters */ No need for this comment. Doc can look like this, I've done s/framebuffer/fbdev/: /** * @prefer_...
2019 Jul 07
2
[PATCH v2 3/6] drm/fb-helper: Instanciate shadow FB if configured in device's mode_config
...less likely to be forgotten when things change. And we don't use line cont. when the doc line is too long. Just continue on the next line after an asterix. > * @cursor_width: hint to userspace for max cursor width > * @cursor_height: hint to userspace for max cursor height > * @helper_private: mid-layer private data > @@ -852,6 +854,9 @@ struct drm_mode_config { > /* dumb ioctl parameters */ > uint32_t preferred_depth, prefer_shadow; > > + /* fbdev parameters */ No need for this comment. Doc can look like this, I've done s/framebuffer/fbdev/: /** * @prefer_...
2018 Oct 09
1
[PATCH v7 1/5] drm/atomic_helper: Disallow new modesets on unregistered connectors
...ergone the full CI run (just BAT results are visible). Not sure why that is. Not that the full run would have caught this because we unwisely load the module before the tests start. Which means any failures during initial readout/takeover will not be flagged :( > + > funcs = connector->helper_private; > > if (funcs->atomic_best_encoder) > @@ -363,7 +383,6 @@ update_connector_routing(struct drm_atomic_state *state, > > set_best_encoder(state, new_connector_state, new_encoder); > > - crtc_state = drm_atomic_get_new_crtc_state(state, new_connector_state->crtc);...
2019 Sep 13
1
[PATCH CI 2/2] drm/connector: Allow max possible encoders to attach to a connector
...a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c @@ -217,11 +217,10 @@ amdgpu_connector_update_scratch_regs(struct drm_connector *connector, struct drm_encoder *encoder; const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; bool connected; - int i; best_encoder = connector_funcs->best_encoder(connector); - drm_connector_for_each_possible_encoder(connector, encoder, i) { + drm_connector_for_each_possible_encoder(connector, encoder) { if ((encoder == best_encoder) && (status == connector_status_co...
2018 Oct 05
0
[PATCH v4 1/5] drm/atomic_helper: Disallow new modesets on unregistered connectors
...ter it's been notified, + * not before. + */ + if (!READ_ONCE(connector->registered) && crtc_state->active) { + DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] is not registered\n", + connector->base.id, connector->name); + return -EINVAL; + } + funcs = connector->helper_private; if (funcs->atomic_best_encoder) @@ -351,7 +371,6 @@ update_connector_routing(struct drm_atomic_state *state, set_best_encoder(state, new_connector_state, new_encoder); - crtc_state = drm_atomic_get_new_crtc_state(state, new_connector_state->crtc); crtc_state->connectors_change...
2018 Oct 08
0
[PATCH v7 1/5] drm/atomic_helper: Disallow new modesets on unregistered connectors
...ed after its been notified, + * not before. + */ + if (!READ_ONCE(connector->registered) && crtc_state->active) { + DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] is not registered\n", + connector->base.id, connector->name); + return -EINVAL; + } + funcs = connector->helper_private; if (funcs->atomic_best_encoder) @@ -363,7 +383,6 @@ update_connector_routing(struct drm_atomic_state *state, set_best_encoder(state, new_connector_state, new_encoder); - crtc_state = drm_atomic_get_new_crtc_state(state, new_connector_state->crtc); crtc_state->connectors_change...