Commit 5a77e2bf authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/mgag200: Remove HW cursor

The HW cursor of Matrox G200 cards only supports a 16-color palette
format. Univeral planes require at least ARGB or a similar component-
based format, so remove the HW cursor.

Alternatively, the driver could dither a cursor image from ARGB to
16 colors. But this does not produce pleasent-looking results in
general, so it's useless for modern compositors.

Without HW support, compositors will use software rendering.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Tested-by: default avatarJohn Donnelly <John.p.donnelly@oracle.com>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Acked-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-2-tzimmermann@suse.de
parent acfa7fd1
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
mgag200-y := mgag200_main.o mgag200_mode.o mgag200_cursor.o \ mgag200-y := mgag200_main.o mgag200_mode.o \
mgag200_drv.o mgag200_i2c.o mgag200_ttm.o mgag200_drv.o mgag200_i2c.o mgag200_ttm.o
obj-$(CONFIG_DRM_MGAG200) += mgag200.o obj-$(CONFIG_DRM_MGAG200) += mgag200.o
...@@ -116,11 +116,6 @@ struct mga_connector { ...@@ -116,11 +116,6 @@ struct mga_connector {
struct mga_i2c_chan *i2c; struct mga_i2c_chan *i2c;
}; };
struct mga_cursor {
struct drm_gem_vram_object *gbo[2];
unsigned int next_index;
};
struct mga_mc { struct mga_mc {
resource_size_t vram_size; resource_size_t vram_size;
resource_size_t vram_base; resource_size_t vram_base;
...@@ -156,8 +151,6 @@ struct mga_device { ...@@ -156,8 +151,6 @@ struct mga_device {
struct mga_mc mc; struct mga_mc mc;
struct mga_cursor cursor;
size_t vram_fb_available; size_t vram_fb_available;
bool suspended; bool suspended;
...@@ -207,10 +200,4 @@ int mgag200_mm_init(struct mga_device *mdev); ...@@ -207,10 +200,4 @@ int mgag200_mm_init(struct mga_device *mdev);
void mgag200_mm_fini(struct mga_device *mdev); void mgag200_mm_fini(struct mga_device *mdev);
int mgag200_mmap(struct file *filp, struct vm_area_struct *vma); int mgag200_mmap(struct file *filp, struct vm_area_struct *vma);
int mgag200_cursor_init(struct mga_device *mdev);
void mgag200_cursor_fini(struct mga_device *mdev);
int mgag200_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
uint32_t handle, uint32_t width, uint32_t height);
int mgag200_crtc_cursor_move(struct drm_crtc *crtc, int x, int y);
#endif /* __MGAG200_DRV_H__ */ #endif /* __MGAG200_DRV_H__ */
...@@ -135,10 +135,6 @@ int mgag200_driver_load(struct drm_device *dev, unsigned long flags) ...@@ -135,10 +135,6 @@ int mgag200_driver_load(struct drm_device *dev, unsigned long flags)
goto err_mgag200_mm_fini; goto err_mgag200_mm_fini;
} }
ret = mgag200_cursor_init(mdev);
if (ret)
drm_err(dev, "Could not initialize cursors. Not doing hardware cursors.\n");
return 0; return 0;
err_mgag200_mm_fini: err_mgag200_mm_fini:
...@@ -154,7 +150,6 @@ void mgag200_driver_unload(struct drm_device *dev) ...@@ -154,7 +150,6 @@ void mgag200_driver_unload(struct drm_device *dev)
if (mdev == NULL) if (mdev == NULL)
return; return;
mgag200_cursor_fini(mdev);
mgag200_mm_fini(mdev); mgag200_mm_fini(mdev);
dev->dev_private = NULL; dev->dev_private = NULL;
} }
...@@ -1412,8 +1412,6 @@ static void mga_crtc_disable(struct drm_crtc *crtc) ...@@ -1412,8 +1412,6 @@ static void mga_crtc_disable(struct drm_crtc *crtc)
/* These provide the minimum set of functions required to handle a CRTC */ /* These provide the minimum set of functions required to handle a CRTC */
static const struct drm_crtc_funcs mga_crtc_funcs = { static const struct drm_crtc_funcs mga_crtc_funcs = {
.cursor_set = mgag200_crtc_cursor_set,
.cursor_move = mgag200_crtc_cursor_move,
.gamma_set = mga_crtc_gamma_set, .gamma_set = mga_crtc_gamma_set,
.set_config = drm_crtc_helper_set_config, .set_config = drm_crtc_helper_set_config,
.destroy = mga_crtc_destroy, .destroy = mga_crtc_destroy,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment