Skip to contentSkip to conversation

drm/i915: Drop bogus fbdev sprite disable code

PATCH New [email protected] 2 participants 3 messages Jun 3, 2013 – Jun 4, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915: Drop bogus fbdev sprite disable code

From: Ville Syrjälä <[email protected]>

plane->enabled is never set, so this code didn't do anything.

Also drm_fb_helper_restore_fbdev_mode() will now disable all cursors and sprites for us, so we don't have to bother anymore.

---
 drivers/gpu/drm/i915/intel_fb.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/gpu/drm/i915/intel_fb.c +0 -7
index 7a77d4c..7f3ac54 100644
@@ -293,8 +293,6 @@ void intel_fb_restore_mode(struct drm_device *dev)
 {
 	int ret;
 	struct drm_i915_private *dev_priv = dev->dev_private;
-	struct drm_mode_config *config = &dev->mode_config;
-	struct drm_plane *plane;
 
 	if (INTEL_INFO(dev)->num_pipes == 0)
 		return;
@@ -305,10 +303,5 @@ void intel_fb_restore_mode(struct drm_device *dev)
 	if (ret)
 		DRM_DEBUG("failed to restore crtc mode\n");
 
-	/* Be sure to shut off any planes that may be active */
-	list_for_each_entry(plane, &config->plane_list, head)
-		if (plane->enabled)
-			plane->funcs->disable_plane(plane);
-
 	drm_modeset_unlock_all(dev);
 }
Signature · 6 lines
1.8.1.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH v2 2/2 drm: Remove some unused stuff from drm_plane

From: Ville Syrjälä <[email protected]>

There's a bunch of unused members inside drm_plane, bloating the size of the structure needlessly. Eliminate them.

v2: Remove all of it from kernel-doc too

---
 drivers/gpu/drm/drm_crtc.c |  2 +-
 include/drm/drm_crtc.h     | 11 -----------
 2 files changed, 1 insertion(+), 12 deletions(-)
drivers/gpu/drm/drm_crtc.c +1 -1
index 865ebfe..f00ba75 100644
@@ -1749,7 +1749,7 @@ int drm_mode_getplane(struct drm_device *dev, void *data,
 
 	plane_resp->plane_id = plane->base.id;
 	plane_resp->possible_crtcs = plane->possible_crtcs;
-	plane_resp->gamma_size = plane->gamma_size;
+	plane_resp->gamma_size = 0;
 
 	/*
 	 * This ioctl is called twice, once to determine how much space is
include/drm/drm_crtc.h +0 -11
index db7a885..3c14b46 100644
@@ -654,11 +654,7 @@ struct drm_plane_funcs {
  * @format_count: number of formats supported
  * @crtc: currently bound CRTC
  * @fb: currently bound fb
- * @gamma_size: size of gamma table
- * @gamma_store: gamma correction table
- * @enabled: enabled flag
  * @funcs: helper functions
- * @helper_private: storage for drver layer
  * @properties: property tracking for this plane
  */
 struct drm_plane {
@@ -674,14 +670,7 @@ struct drm_plane {
 	struct drm_crtc *crtc;
 	struct drm_framebuffer *fb;
 
-	/* CRTC gamma size for reporting to userspace */
-	uint32_t gamma_size;
-	uint16_t *gamma_store;
-
-	bool enabled;
-
 	const struct drm_plane_funcs *funcs;
-	void *helper_private;
 
 	struct drm_object_properties properties;
 };
Signature · 6 lines
1.8.1.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v2 2/2
#2 lore raw

Re: [Intel-gfx] [PATCH v2 2/2] drm: Remove some unused stuff from drm_plane

Quoted 9 lines · On Mon, Jun 03, 2013 at 04:11:42PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

There's a bunch of unused members inside drm_plane, bloating the size of the structure needlessly. Eliminate them.

v2: Remove all of it from kernel-doc too

Yeah, makes sense to ditch this. We can think about this again when atomic modeset and plane properties pop up again. For both patches:

Quoted 56 lines
---
 drivers/gpu/drm/drm_crtc.c |  2 +-
 include/drm/drm_crtc.h     | 11 -----------
 2 files changed, 1 insertion(+), 12 deletions(-)
drivers/gpu/drm/drm_crtc.c +1 -1
index 865ebfe..f00ba75 100644
@@ -1749,7 +1749,7 @@ int drm_mode_getplane(struct drm_device *dev, void *data,
 
 	plane_resp->plane_id = plane->base.id;
 	plane_resp->possible_crtcs = plane->possible_crtcs;
-	plane_resp->gamma_size = plane->gamma_size;
+	plane_resp->gamma_size = 0;
 
 	/*
 	 * This ioctl is called twice, once to determine how much space is
include/drm/drm_crtc.h +0 -11
index db7a885..3c14b46 100644
@@ -654,11 +654,7 @@ struct drm_plane_funcs {
  * @format_count: number of formats supported
  * @crtc: currently bound CRTC
  * @fb: currently bound fb
- * @gamma_size: size of gamma table
- * @gamma_store: gamma correction table
- * @enabled: enabled flag
  * @funcs: helper functions
- * @helper_private: storage for drver layer
  * @properties: property tracking for this plane
  */
 struct drm_plane {
@@ -674,14 +670,7 @@ struct drm_plane {
 	struct drm_crtc *crtc;
 	struct drm_framebuffer *fb;
 
-	/* CRTC gamma size for reporting to userspace */
-	uint32_t gamma_size;
-	uint16_t *gamma_store;
-
-	bool enabled;
-
 	const struct drm_plane_funcs *funcs;
-	void *helper_private;
 
 	struct drm_object_properties properties;
 };
Signature · 6 lines
1.8.1.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch