The fields mode_info, num_crtcs and mode in struct mga_device serve no purpose. Remove them. Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx> --- drivers/gpu/drm/mgag200/mgag200_drv.h | 8 -------- drivers/gpu/drm/mgag200/mgag200_main.c | 3 --- drivers/gpu/drm/mgag200/mgag200_mode.c | 6 ------ 3 files changed, 17 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h index c7f2000d46fce..de3181bd63ca0 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.h +++ b/drivers/gpu/drm/mgag200/mgag200_drv.h @@ -104,11 +104,6 @@ struct mga_crtc { bool enabled; }; -struct mga_mode_info { - bool mode_config_initialized; - struct mga_crtc *crtc; -}; - struct mga_i2c_chan { struct i2c_adapter adapter; struct drm_device *dev; @@ -155,15 +150,12 @@ struct mga_device { void __iomem *rmmio; struct mga_mc mc; - struct mga_mode_info mode_info; size_t vram_fb_available; bool suspended; - int num_crtc; enum mga_type type; int has_sdram; - struct drm_display_mode mode; int bpp_shifts[4]; diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c index 46cc32816f1e1..698fbf31337d4 100644 --- a/drivers/gpu/drm/mgag200/mgag200_main.c +++ b/drivers/gpu/drm/mgag200/mgag200_main.c @@ -98,9 +98,6 @@ static int mgag200_device_init(struct drm_device *dev, mdev->flags = mgag200_flags_from_driver_data(flags); mdev->type = mgag200_type_from_driver_data(flags); - /* Hardcode the number of CRTCs to 1 */ - mdev->num_crtc = 1; - pci_read_config_dword(dev->pdev, PCI_MGA_OPTION, &option); mdev->has_sdram = !(option & (1 << 14)); diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index c9d120b019649..ce41bebfdd1a2 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -1135,9 +1135,6 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc, WREG8(MGA_MISC_OUT, misc); - if (adjusted_mode) - memcpy(&mdev->mode, mode, sizeof(struct drm_display_mode)); - mga_crtc_do_set_base(crtc, old_fb, x, y, 0); /* reset tagfifo */ @@ -1443,7 +1440,6 @@ static void mga_crtc_init(struct mga_device *mdev) drm_crtc_init(mdev->dev, &mga_crtc->base, &mga_crtc_funcs); drm_mode_crtc_set_gamma_size(&mga_crtc->base, MGAG200_LUT_SIZE); - mdev->mode_info.crtc = mga_crtc; drm_crtc_helper_add(&mga_crtc->base, &mga_helper_funcs); } @@ -1619,8 +1615,6 @@ int mgag200_modeset_init(struct mga_device *mdev) struct drm_connector *connector; int ret; - mdev->mode_info.mode_config_initialized = true; - mdev->dev->mode_config.max_width = MGAG200_MAX_FB_WIDTH; mdev->dev->mode_config.max_height = MGAG200_MAX_FB_HEIGHT; -- 2.26.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel