The removed functionality is provided by simple-pipe helpers. Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx> --- drivers/gpu/drm/udl/Makefile | 2 +- drivers/gpu/drm/udl/udl_drv.h | 3 - drivers/gpu/drm/udl/udl_encoder.c | 70 --------------- drivers/gpu/drm/udl/udl_modeset.c | 138 ------------------------------ 4 files changed, 1 insertion(+), 212 deletions(-) delete mode 100644 drivers/gpu/drm/udl/udl_encoder.c diff --git a/drivers/gpu/drm/udl/Makefile b/drivers/gpu/drm/udl/Makefile index 9c42820ae33d..177ce74f4cf4 100644 --- a/drivers/gpu/drm/udl/Makefile +++ b/drivers/gpu/drm/udl/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -udl-y := udl_drv.o udl_modeset.o udl_connector.o udl_encoder.o udl_main.o udl_fb.o udl_transfer.o udl_gem.o +udl-y := udl_drv.o udl_modeset.o udl_connector.o udl_main.o udl_fb.o udl_transfer.o udl_gem.o obj-$(CONFIG_DRM_UDL) := udl.o diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h index 23346bdc74bc..77b57d6abd23 100644 --- a/drivers/gpu/drm/udl/udl_drv.h +++ b/drivers/gpu/drm/udl/udl_drv.h @@ -19,7 +19,6 @@ #include <drm/drm_gem.h> #include <drm/drm_simple_kms_helper.h> -struct drm_encoder; struct drm_mode_create_dumb; #define DRIVER_NAME "udl" @@ -82,8 +81,6 @@ int udl_modeset_init(struct drm_device *dev); void udl_modeset_cleanup(struct drm_device *dev); struct drm_connector *udl_connector_init(struct drm_device *dev); -struct drm_encoder *udl_encoder_init(struct drm_device *dev); - struct urb *udl_get_urb(struct drm_device *dev); int udl_submit_urb(struct drm_device *dev, struct urb *urb, size_t len); diff --git a/drivers/gpu/drm/udl/udl_encoder.c b/drivers/gpu/drm/udl/udl_encoder.c deleted file mode 100644 index 203f041e737c..000000000000 --- a/drivers/gpu/drm/udl/udl_encoder.c +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Copyright (C) 2012 Red Hat - * based in parts on udlfb.c: - * Copyright (C) 2009 Roberto De Ioris <roberto@xxxxxxxx> - * Copyright (C) 2009 Jaya Kumar <jayakumar.lkml@xxxxxxxxx> - * Copyright (C) 2009 Bernie Thompson <bernie@xxxxxxxxxxxx> - */ - -#include <drm/drm_encoder.h> -#include <drm/drm_modeset_helper_vtables.h> - -#include "udl_drv.h" - -/* dummy encoder */ -static void udl_enc_destroy(struct drm_encoder *encoder) -{ - drm_encoder_cleanup(encoder); - kfree(encoder); -} - -static void udl_encoder_disable(struct drm_encoder *encoder) -{ -} - -static void udl_encoder_prepare(struct drm_encoder *encoder) -{ -} - -static void udl_encoder_commit(struct drm_encoder *encoder) -{ -} - -static void udl_encoder_mode_set(struct drm_encoder *encoder, - struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ -} - -static void -udl_encoder_dpms(struct drm_encoder *encoder, int mode) -{ -} - -static const struct drm_encoder_helper_funcs udl_helper_funcs = { - .dpms = udl_encoder_dpms, - .prepare = udl_encoder_prepare, - .mode_set = udl_encoder_mode_set, - .commit = udl_encoder_commit, - .disable = udl_encoder_disable, -}; - -static const struct drm_encoder_funcs udl_enc_funcs = { - .destroy = udl_enc_destroy, -}; - -struct drm_encoder *udl_encoder_init(struct drm_device *dev) -{ - struct drm_encoder *encoder; - - encoder = kzalloc(sizeof(struct drm_encoder), GFP_KERNEL); - if (!encoder) - return NULL; - - drm_encoder_init(dev, encoder, &udl_enc_funcs, DRM_MODE_ENCODER_TMDS, - NULL); - drm_encoder_helper_add(encoder, &udl_helper_funcs); - encoder->possible_crtcs = 1; - return encoder; -} diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c index c8bd438de6e9..72884cbda131 100644 --- a/drivers/gpu/drm/udl/udl_modeset.c +++ b/drivers/gpu/drm/udl/udl_modeset.c @@ -281,144 +281,6 @@ static void udl_crtc_dpms(struct drm_crtc *crtc, int mode) } -#if 0 -static int -udl_pipe_set_base_atomic(struct drm_crtc *crtc, struct drm_framebuffer *fb, - int x, int y, enum mode_set_atomic state) -{ - return 0; -} - -static int -udl_pipe_set_base(struct drm_crtc *crtc, int x, int y, - struct drm_framebuffer *old_fb) -{ - return 0; -} -#endif - -static int udl_crtc_mode_set(struct drm_crtc *crtc, - struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode, - int x, int y, - struct drm_framebuffer *old_fb) - -{ - struct drm_device *dev = crtc->dev; - struct drm_framebuffer *fb = crtc->primary->fb; - struct udl_device *udl = dev->dev_private; - char *buf; - char *wrptr; - int color_depth = 0; - - udl->crtc = crtc; - - buf = (char *)udl->mode_buf; - - /* for now we just clip 24 -> 16 - if we fix that fix this */ - /*if (crtc->fb->bits_per_pixel != 16) - color_depth = 1; */ - - /* This first section has to do with setting the base address on the - * controller * associated with the display. There are 2 base - * pointers, currently, we only * use the 16 bpp segment. - */ - wrptr = udl_vidreg_lock(buf); - wrptr = udl_set_color_depth(wrptr, color_depth); - /* set base for 16bpp segment to 0 */ - wrptr = udl_set_base16bpp(wrptr, 0); - /* set base for 8bpp segment to end of fb */ - wrptr = udl_set_base8bpp(wrptr, 2 * mode->vdisplay * mode->hdisplay); - - wrptr = udl_set_vid_cmds(wrptr, adjusted_mode); - wrptr = udl_set_blank(wrptr, DRM_MODE_DPMS_ON); - wrptr = udl_vidreg_unlock(wrptr); - - 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; - - /* damage all of it */ - udl_handle_damage(fb, 0, 0, fb->width, fb->height); - return 0; -} - - -static void udl_crtc_disable(struct drm_crtc *crtc) -{ - udl_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); -} - -static void udl_crtc_destroy(struct drm_crtc *crtc) -{ - drm_crtc_cleanup(crtc); - kfree(crtc); -} - -static int udl_crtc_page_flip(struct drm_crtc *crtc, - struct drm_framebuffer *fb, - struct drm_pending_vblank_event *event, - uint32_t page_flip_flags, - struct drm_modeset_acquire_ctx *ctx) -{ - struct drm_device *dev = crtc->dev; - struct udl_device *udl = dev->dev_private; - - spin_lock(&udl->active_fb_16_lock); - udl->active_fb_16 = fb; - spin_unlock(&udl->active_fb_16_lock); - - udl_handle_damage(fb, 0, 0, fb->width, fb->height); - - spin_lock_irq(&dev->event_lock); - if (event) - drm_crtc_send_vblank_event(crtc, event); - spin_unlock_irq(&dev->event_lock); - crtc->primary->fb = fb; - - return 0; -} - -static void udl_crtc_prepare(struct drm_crtc *crtc) -{ -} - -static void udl_crtc_commit(struct drm_crtc *crtc) -{ - udl_crtc_dpms(crtc, DRM_MODE_DPMS_ON); -} - -static const struct drm_crtc_helper_funcs udl_helper_funcs = { - .dpms = udl_crtc_dpms, - .mode_set = udl_crtc_mode_set, - .prepare = udl_crtc_prepare, - .commit = udl_crtc_commit, - .disable = udl_crtc_disable, -}; - -static const struct drm_crtc_funcs udl_crtc_funcs = { - .set_config = drm_crtc_helper_set_config, - .destroy = udl_crtc_destroy, - .page_flip = udl_crtc_page_flip, -}; - -static int udl_crtc_init(struct drm_device *dev) -{ - struct drm_crtc *crtc; - - crtc = kzalloc(sizeof(struct drm_crtc) + sizeof(struct drm_connector *), GFP_KERNEL); - if (crtc == NULL) - return -ENOMEM; - - drm_crtc_init(dev, crtc, &udl_crtc_funcs); - drm_crtc_helper_add(crtc, &udl_helper_funcs); - - return 0; -} - /* * Simple display pipeline */ -- 2.23.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel