From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@redhat.com, daniel@ffwll.ch, kraxel@redhat.com,
noralf@tronnes.org, sam@ravnborg.org, john.p.donnelly@oracle.com
Cc: John Donnelly <John.p.donnelly@oracle.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org
Subject: [PATCH v2 5/6] drm/mgag200: Remove unused fields from struct mga_device
Date: Thu, 7 May 2020 11:03:14 +0200 [thread overview]
Message-ID: <20200507090315.21274-6-tzimmermann@suse.de> (raw)
In-Reply-To: <20200507090315.21274-1-tzimmermann@suse.de>
The fields mode_info, num_crtcs and mode in struct mga_device serve
no purpose. Remove them.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: John Donnelly <John.p.donnelly@oracle.com>
---
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 65d7096cad889..40e6ffbe97949 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;
@@ -160,17 +155,14 @@ struct mga_device {
void __iomem *rmmio;
struct mga_mc mc;
- struct mga_mode_info mode_info;
struct mga_cursor cursor;
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 fd651eda6f012..86df799fd38c5 100644
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -97,9 +97,6 @@ int mgag200_driver_load(struct drm_device *dev, unsigned long flags)
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 7dad386913261..1d1e937203fa7 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -1136,9 +1136,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 */
@@ -1447,7 +1444,6 @@ static void mga_crtc_init(struct mga_device *mdev)
drm_crtc_init(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);
}
@@ -1647,8 +1643,6 @@ int mgag200_modeset_init(struct mga_device *mdev)
return ret;
}
- mdev->mode_info.mode_config_initialized = true;
-
dev->mode_config.max_width = MGAG200_MAX_FB_WIDTH;
dev->mode_config.max_height = MGAG200_MAX_FB_HEIGHT;
--
2.26.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-05-07 9:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 9:03 [PATCH v2 0/6] Prepare mgag200 for simple KMS and managed init Thomas Zimmermann
2020-05-07 9:03 ` [PATCH v2 1/6] drm/mgag200: Convert struct drm_device to struct mga_device with helper Thomas Zimmermann
2020-05-07 9:03 ` [PATCH v2 2/6] drm/mgag200: Remove several references to struct mga_device.dev Thomas Zimmermann
2020-05-07 9:03 ` [PATCH v2 3/6] drm/mgag200: Integrate init function into load function Thomas Zimmermann
2020-05-07 9:03 ` [PATCH v2 4/6] drm/mgag200: Use managed mode-config initialization Thomas Zimmermann
2020-05-07 9:03 ` Thomas Zimmermann [this message]
2020-05-07 9:03 ` [PATCH v2 6/6] drm/mgag200: Embed connector instance in struct mga_device 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=20200507090315.21274-6-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=john.p.donnelly@oracle.com \
--cc=kraxel@redhat.com \
--cc=noralf@tronnes.org \
--cc=sam@ravnborg.org \
/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;
as well as URLs for NNTP newsgroup(s).