From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@redhat.com, daniel@ffwll.ch, sam@ravnborg.org,
kraxel@redhat.com, emil.velikov@collabora.com,
noralf@tronnes.org, zboszor@pr.hu
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH 6/7] drm/udl: Remove struct udl_device.active_fb_16
Date: Tue, 26 Nov 2019 14:47:06 +0100 [thread overview]
Message-ID: <20191126134707.22385-7-tzimmermann@suse.de> (raw)
In-Reply-To: <20191126134707.22385-1-tzimmermann@suse.de>
The udl driver stores the currently active framebuffer to know from
where to accept damage updates.
With the conversion to plane-state damage handling, this is not necessary
any longer. The currently active framebuffer and damaged area are always
stored in the plane state.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/udl/udl_drv.h | 4 ----
drivers/gpu/drm/udl/udl_fb.c | 7 -------
drivers/gpu/drm/udl/udl_main.c | 3 ---
drivers/gpu/drm/udl/udl_modeset.c | 9 ---------
4 files changed, 23 deletions(-)
diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h
index c6fd5c08f5fc..e540f8e64aa1 100644
--- a/drivers/gpu/drm/udl/udl_drv.h
+++ b/drivers/gpu/drm/udl/udl_drv.h
@@ -55,10 +55,6 @@ struct udl_device {
struct drm_simple_display_pipe display_pipe;
- /* active framebuffer on the 16-bit channel */
- const struct drm_framebuffer *active_fb_16;
- spinlock_t active_fb_16_lock;
-
struct mutex gem_lock;
int sku_pixel_limit;
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index ed01ebaaf468..3d8cf674dfa5 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -76,13 +76,6 @@ int udl_handle_damage(struct drm_framebuffer *fb, int x, int y,
log_bpp = __ffs(fb->format->cpp[0]);
- spin_lock(&udl->active_fb_16_lock);
- if (udl->active_fb_16 != fb) {
- spin_unlock(&udl->active_fb_16_lock);
- return 0;
- }
- spin_unlock(&udl->active_fb_16_lock);
-
vaddr = drm_gem_shmem_vmap(fb->obj[0]);
if (IS_ERR(vaddr)) {
DRM_ERROR("failed to vmap fb\n");
diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
index a23218fc7d8e..9b091b5b063e 100644
--- a/drivers/gpu/drm/udl/udl_main.c
+++ b/drivers/gpu/drm/udl/udl_main.c
@@ -317,9 +317,6 @@ int udl_init(struct udl_device *udl)
DRM_DEBUG("\n");
- udl->active_fb_16 = NULL;
- spin_lock_init(&udl->active_fb_16_lock);
-
mutex_init(&udl->gem_lock);
if (!udl_parse_vendor_descriptor(dev, udl->udev)) {
diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
index aade61ad097b..83e80083e0b2 100644
--- a/drivers/gpu/drm/udl/udl_modeset.c
+++ b/drivers/gpu/drm/udl/udl_modeset.c
@@ -333,9 +333,6 @@ udl_simple_display_pipe_enable(struct drm_simple_display_pipe *pipe,
wrptr = udl_dummy_render(wrptr);
- spin_lock(&udl->active_fb_16_lock);
- udl->active_fb_16 = fb;
- spin_unlock(&udl->active_fb_16_lock);
udl->mode_buf_len = wrptr - buf;
udl_handle_damage(fb, 0, 0, fb->width, fb->height);
@@ -363,16 +360,10 @@ static void
udl_simple_display_pipe_update(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *old_plane_state)
{
- struct drm_device *dev = pipe->crtc.dev;
- struct udl_device *udl = dev->dev_private;
struct drm_plane_state *state = pipe->plane.state;
struct drm_framebuffer *fb = state->fb;
struct drm_rect rect;
- spin_lock(&udl->active_fb_16_lock);
- udl->active_fb_16 = fb;
- spin_unlock(&udl->active_fb_16_lock);
-
if (!fb)
return;
--
2.23.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-11-26 13:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 13:47 [PATCH 0/7] drm/udl: Convert to simple-pipe helpers and clean up Thomas Zimmermann
2019-11-26 13:47 ` [PATCH 1/7] drm/udl: Init connector before encoder and CRTC Thomas Zimmermann
2019-11-28 14:02 ` Daniel Vetter
2019-11-26 13:47 ` [PATCH 2/7] drm/udl: Convert to struct drm_simple_display_pipe Thomas Zimmermann
2019-11-28 14:09 ` Daniel Vetter
2019-11-26 13:47 ` [PATCH 3/7] drm/udl: Remove unused encoder and CRTC code Thomas Zimmermann
2019-11-28 14:10 ` Daniel Vetter
2019-11-26 13:47 ` [PATCH 4/7] drm/udl: Set preferred color depth to 16 bpp Thomas Zimmermann
2019-11-26 13:47 ` [PATCH 5/7] drm/udl: Convert to drm_atomic_helper_dirtyfb() Thomas Zimmermann
2019-11-28 14:13 ` Daniel Vetter
2019-11-29 18:04 ` Emil Velikov
2019-11-29 18:38 ` Daniel Vetter
2019-11-26 13:47 ` Thomas Zimmermann [this message]
2019-11-28 14:14 ` [PATCH 6/7] drm/udl: Remove struct udl_device.active_fb_16 Daniel Vetter
2019-11-26 13:47 ` [PATCH 7/7] drm/udl: Move udl_handle_damage() into udl_modeset.c Thomas Zimmermann
2019-11-28 14:15 ` Daniel Vetter
2019-12-02 9:27 ` Emil Velikov
2019-12-03 11:31 ` Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191126134707.22385-7-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.velikov@collabora.com \
--cc=kraxel@redhat.com \
--cc=noralf@tronnes.org \
--cc=sam@ravnborg.org \
--cc=zboszor@pr.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox