dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/21] drm/fb-helper: Add fill_info() functions
@ 2019-03-26 13:19 Daniel Vetter
  2019-03-26 13:19 ` [PATCH 02/21] drm/fb-helper: set fbi->fix.id in fill_info() Daniel Vetter
                   ` (19 more replies)
  0 siblings, 20 replies; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

The fbdev split between fix and var information is kinda
pointless for drm drivers since everything is fixed: The fbdev
emulation doesn't support changing modes at all.

Create a new simplified helper and use it in the generic fbdev
helper code. Follow-up patches will beef it up more and roll
it out to all drivers.

v2: We need to keep sizes, since they might not match the fb dimesions
(Noralf)

Cc: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_fb_helper.c | 30 ++++++++++++++++++++++++++++--
 include/drm/drm_fb_helper.h     |  3 +++
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index c3d6a8c78a51..b89d177228e2 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -2105,6 +2105,33 @@ void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helpe
 }
 EXPORT_SYMBOL(drm_fb_helper_fill_var);
 
+/**
+ * drm_fb_helper_fill_info - initializes fbdev information
+ * @info: fbdev instance to set up
+ * @fb_helper: fb helper instance to use as template
+ * @sizes: describes fbdev size and scanout surface size
+ *
+ *
+ * Sets up the variable and fixed fbdev metainformation from the given fb helper
+ * instance and the drm framebuffer allocated in &drm_fb_helper.fb.
+ *
+ * Drivers should call this (or their equivalent setup code) from their
+ * &drm_fb_helper_funcs.fb_probe callback after having allocated the fbdev
+ * backing storage framebuffer.
+ */
+void drm_fb_helper_fill_info(struct fb_info *info,
+			     struct drm_fb_helper *fb_helper,
+			     struct drm_fb_helper_surface_size *sizes)
+{
+	struct drm_framebuffer *fb = fb_helper->fb;
+
+	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
+	drm_fb_helper_fill_var(info, fb_helper,
+			       sizes->fb_width, sizes->fb_height);
+
+}
+EXPORT_SYMBOL(drm_fb_helper_fill_info);
+
 static int drm_fb_helper_probe_connector_modes(struct drm_fb_helper *fb_helper,
 						uint32_t maxX,
 						uint32_t maxY)
@@ -3165,8 +3192,7 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper,
 #endif
 	strcpy(fbi->fix.id, "DRM emulated");
 
-	drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(fbi, fb_helper, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(fbi, fb_helper, sizes);
 
 	if (fb->funcs->dirty) {
 		struct fb_ops *fbops;
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 286d58efed5d..9ef72f20662d 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -293,6 +293,9 @@ void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helpe
 			    uint32_t fb_width, uint32_t fb_height);
 void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
 			    uint32_t depth);
+void drm_fb_helper_fill_info(struct fb_info *info,
+			     struct drm_fb_helper *fb_helper,
+			     struct drm_fb_helper_surface_size *sizes);
 
 void drm_fb_helper_unlink_fbi(struct drm_fb_helper *fb_helper);
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 02/21] drm/fb-helper: set fbi->fix.id in fill_info()
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
@ 2019-03-26 13:19 ` Daniel Vetter
  2019-03-26 13:56   ` Noralf Trønnes
  2019-03-26 13:19 ` [PATCH 03/21] drm/fb_helper: set info->par " Daniel Vetter
                   ` (18 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Ilia Mirkin, Daniel Vetter

Looking at the oldest/most popular drivers ${driver}drmfb seems to be
the standard, except i915.ko went with "inteldrmfb". I guess renaming
that for consistency won't hurt, it definitely confused me when I
started with kms 10 years ago.

I hope this never became uapi ... worst case drivers can overwrite it
after having called fill_info().

Since subsequent patches change this for some drivers later on in the
series, here's the exhaustive list of where all fix.id is used:
- /proc/fb which prints the minor number and fix.id name.
- per-fb sysfs name file
- getfix ioctl, which is used by fbset only to print out the name when
dumping information
- lots and lots of places in dmesg, anytime anything happens with an
fbdev really

I think minimal to 0 chances that changing this will screw up a config
script or something, since outside of informational message it's not
used by anything to identify which fbdev maps to which minor. After
all the last fbset release is from 1999, and that predates even devfs
I think.

v2: Rebase and amend commit message, thanks to Ilia for pointing out
that this needs to be spelled out.

Cc: Ilia Mirkin <imirkin@alum.mit.edu>
igned-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_fb_helper.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index b89d177228e2..e3538c851c58 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -2129,6 +2129,9 @@ void drm_fb_helper_fill_info(struct fb_info *info,
 	drm_fb_helper_fill_var(info, fb_helper,
 			       sizes->fb_width, sizes->fb_height);
 
+	snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
+		 fb_helper->dev->driver->name);
+
 }
 EXPORT_SYMBOL(drm_fb_helper_fill_info);
 
@@ -3190,8 +3193,6 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper,
 		fbi->fix.smem_start =
 			page_to_phys(virt_to_page(fbi->screen_buffer));
 #endif
-	strcpy(fbi->fix.id, "DRM emulated");
-
 	drm_fb_helper_fill_info(fbi, fb_helper, sizes);
 
 	if (fb->funcs->dirty) {
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 03/21] drm/fb_helper: set info->par in fill_info()
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
  2019-03-26 13:19 ` [PATCH 02/21] drm/fb-helper: set fbi->fix.id in fill_info() Daniel Vetter
@ 2019-03-26 13:19 ` Daniel Vetter
  2019-03-26 13:57   ` Noralf Trønnes
  2019-03-26 13:19 ` [PATCH 04/21] drm/amdgpu: Use drm_fb_helper_fill_info Daniel Vetter
                   ` (17 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Sam Ravnborg

The fbdev emulation helpers pretty much assume that this is set.
Let's do it for everyone.

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_fb_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index e3538c851c58..42423ca28991 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -2129,6 +2129,7 @@ void drm_fb_helper_fill_info(struct fb_info *info,
 	drm_fb_helper_fill_var(info, fb_helper,
 			       sizes->fb_width, sizes->fb_height);
 
+	info->par = fb_helper;
 	snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
 		 fb_helper->dev->driver->name);
 
@@ -3182,7 +3183,6 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper,
 	if (IS_ERR(fbi))
 		return PTR_ERR(fbi);
 
-	fbi->par = fb_helper;
 	fbi->fbops = &drm_fbdev_fb_ops;
 	fbi->screen_size = fb->height * fb->pitches[0];
 	fbi->fix.smem_len = fbi->screen_size;
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 04/21] drm/amdgpu: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
  2019-03-26 13:19 ` [PATCH 02/21] drm/fb-helper: set fbi->fix.id in fill_info() Daniel Vetter
  2019-03-26 13:19 ` [PATCH 03/21] drm/fb_helper: set info->par " Daniel Vetter
@ 2019-03-26 13:19 ` Daniel Vetter
  2019-03-26 14:04   ` Noralf Trønnes
  2019-03-26 13:19 ` [PATCH 05/21] drm/armada: " Daniel Vetter
                   ` (16 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Stone, Daniel Vetter, Intel Graphics Development,
	Michel Dänzer, Samuel Li, Shirish S, Junwei Zhang,
	Huang Rui, Alex Deucher, Daniel Vetter, Christian König

Should not cause any changes.

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Samuel Li <Samuel.Li@amd.com>
Cc: "Michel Dänzer" <michel.daenzer@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Stone <daniels@collabora.com>
Cc: Shirish S <shirish.s@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
index 24890d8f9ee4..e47609218839 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
@@ -49,12 +49,11 @@
 static int
 amdgpufb_open(struct fb_info *info, int user)
 {
-	struct amdgpu_fbdev *rfbdev = info->par;
-	struct amdgpu_device *adev = rfbdev->adev;
-	int ret = pm_runtime_get_sync(adev->ddev->dev);
+	struct drm_fb_helper *fb_helper = info->par;
+	int ret = pm_runtime_get_sync(fb_helper->dev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_mark_last_busy(adev->ddev->dev);
-		pm_runtime_put_autosuspend(adev->ddev->dev);
+		pm_runtime_mark_last_busy(fb_helper->dev->dev);
+		pm_runtime_put_autosuspend(fb_helper->dev->dev);
 		return ret;
 	}
 	return 0;
@@ -63,11 +62,10 @@ amdgpufb_open(struct fb_info *info, int user)
 static int
 amdgpufb_release(struct fb_info *info, int user)
 {
-	struct amdgpu_fbdev *rfbdev = info->par;
-	struct amdgpu_device *adev = rfbdev->adev;
+	struct drm_fb_helper *fb_helper = info->par;
 
-	pm_runtime_mark_last_busy(adev->ddev->dev);
-	pm_runtime_put_autosuspend(adev->ddev->dev);
+	pm_runtime_mark_last_busy(fb_helper->dev->dev);
+	pm_runtime_put_autosuspend(fb_helper->dev->dev);
 	return 0;
 }
 
@@ -233,8 +231,6 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
 		goto out;
 	}
 
-	info->par = rfbdev;
-
 	ret = amdgpu_display_framebuffer_init(adev->ddev, &rfbdev->rfb,
 					      &mode_cmd, gobj);
 	if (ret) {
@@ -247,10 +243,6 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
 	/* setup helper */
 	rfbdev->helper.fb = fb;
 
-	strcpy(info->fix.id, "amdgpudrmfb");
-
-	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-
 	info->fbops = &amdgpufb_ops;
 
 	tmp = amdgpu_bo_gpu_offset(abo) - adev->gmc.vram_start;
@@ -259,7 +251,7 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
 	info->screen_base = amdgpu_bo_kptr(abo);
 	info->screen_size = amdgpu_bo_size(abo);
 
-	drm_fb_helper_fill_var(info, &rfbdev->helper, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(info, &rfbdev->helper, sizes);
 
 	/* setup aperture base/size for vesafb takeover */
 	info->apertures->ranges[0].base = adev->ddev->mode_config.fb_base;
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 05/21] drm/armada: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (2 preceding siblings ...)
  2019-03-26 13:19 ` [PATCH 04/21] drm/amdgpu: Use drm_fb_helper_fill_info Daniel Vetter
@ 2019-03-26 13:19 ` Daniel Vetter
  2019-03-26 14:06   ` Noralf Trønnes
  2019-03-26 13:19 ` [PATCH 06/21] drm/ast: " Daniel Vetter
                   ` (15 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Russell King, Daniel Vetter

Only changes the name of the fb from "armada-drmfb" to armadafb.

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Russell King <linux@armlinux.org.uk>
---
 drivers/gpu/drm/armada/armada_fbdev.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
index 8d23700848df..1e7140f005a5 100644
--- a/drivers/gpu/drm/armada/armada_fbdev.c
+++ b/drivers/gpu/drm/armada/armada_fbdev.c
@@ -78,8 +78,6 @@ static int armada_fbdev_create(struct drm_fb_helper *fbh,
 		goto err_fballoc;
 	}
 
-	strlcpy(info->fix.id, "armada-drmfb", sizeof(info->fix.id));
-	info->par = fbh;
 	info->fbops = &armada_fb_ops;
 	info->fix.smem_start = obj->phys_addr;
 	info->fix.smem_len = obj->obj.size;
@@ -87,9 +85,7 @@ static int armada_fbdev_create(struct drm_fb_helper *fbh,
 	info->screen_base = ptr;
 	fbh->fb = &dfb->fb;
 
-	drm_fb_helper_fill_fix(info, dfb->fb.pitches[0],
-			       dfb->fb.format->depth);
-	drm_fb_helper_fill_var(info, fbh, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(info, fbh, sizes);
 
 	DRM_DEBUG_KMS("allocated %dx%d %dbpp fb: 0x%08llx\n",
 		dfb->fb.width, dfb->fb.height, dfb->fb.format->cpp[0] * 8,
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 06/21] drm/ast: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (3 preceding siblings ...)
  2019-03-26 13:19 ` [PATCH 05/21] drm/armada: " Daniel Vetter
@ 2019-03-26 13:19 ` Daniel Vetter
  2019-03-26 14:21   ` Noralf Trønnes
  2019-03-26 13:19 ` [PATCH 07/21] drm/cirrus: " Daniel Vetter
                   ` (14 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development
  Cc: Sam Bobroff, Daniel Vetter, Intel Graphics Development,
	YueHaibing, Alex Deucher, Daniel Vetter, Junwei Zhang,
	Dave Airlie, Sean Paul, Christian König

Should not result in any changes.

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sean Paul <sean@poorly.run>
Cc: YueHaibing <yuehaibing@huawei.com>
Cc: Sam Bobroff <sbobroff@linux.ibm.com>
---
 drivers/gpu/drm/ast/ast_drv.h | 2 +-
 drivers/gpu/drm/ast/ast_fb.c  | 7 +------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h
index bfc65040dfcb..ffce4608e0c5 100644
--- a/drivers/gpu/drm/ast/ast_drv.h
+++ b/drivers/gpu/drm/ast/ast_drv.h
@@ -259,7 +259,7 @@ struct ast_framebuffer {
 };
 
 struct ast_fbdev {
-	struct drm_fb_helper helper;
+	struct drm_fb_helper helper; /* must be first */
 	struct ast_framebuffer afb;
 	void *sysram;
 	int size;
diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
index 2c9f8dd9733a..e718d0f60d6b 100644
--- a/drivers/gpu/drm/ast/ast_fb.c
+++ b/drivers/gpu/drm/ast/ast_fb.c
@@ -217,8 +217,6 @@ static int astfb_create(struct drm_fb_helper *helper,
 		ret = PTR_ERR(info);
 		goto out;
 	}
-	info->par = afbdev;
-
 	ret = ast_framebuffer_init(dev, &afbdev->afb, &mode_cmd, gobj);
 	if (ret)
 		goto out;
@@ -229,15 +227,12 @@ static int astfb_create(struct drm_fb_helper *helper,
 	fb = &afbdev->afb.base;
 	afbdev->helper.fb = fb;
 
-	strcpy(info->fix.id, "astdrmfb");
-
 	info->fbops = &astfb_ops;
 
 	info->apertures->ranges[0].base = pci_resource_start(dev->pdev, 0);
 	info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0);
 
-	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(info, &afbdev->helper, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(info, &afbdev->helper, sizes);
 
 	info->screen_base = sysram;
 	info->screen_size = size;
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 07/21] drm/cirrus: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (4 preceding siblings ...)
  2019-03-26 13:19 ` [PATCH 06/21] drm/ast: " Daniel Vetter
@ 2019-03-26 13:19 ` Daniel Vetter
  2019-03-26 14:24   ` Noralf Trønnes
  2019-03-26 13:19 ` [PATCH 08/21] drm/exynos: " Daniel Vetter
                   ` (13 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Gerd Hoffmann, Daniel Vetter

Should not result in any changes.

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/cirrus/cirrus_drv.h   | 2 +-
 drivers/gpu/drm/cirrus/cirrus_fbdev.c | 8 +-------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.h b/drivers/gpu/drm/cirrus/cirrus_drv.h
index f2b2e0d169fa..915709739257 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.h
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.h
@@ -143,7 +143,7 @@ struct cirrus_device {
 
 
 struct cirrus_fbdev {
-	struct drm_fb_helper helper;
+	struct drm_fb_helper helper; /* must be first */
 	struct drm_framebuffer *gfb;
 	void *sysram;
 	int size;
diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
index 39df62acac69..2e6128069fc3 100644
--- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c
+++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
@@ -195,8 +195,6 @@ static int cirrusfb_create(struct drm_fb_helper *helper,
 		goto err_vfree;
 	}
 
-	info->par = gfbdev;
-
 	fb = kzalloc(sizeof(*fb), GFP_KERNEL);
 	if (!fb) {
 		ret = -ENOMEM;
@@ -214,13 +212,9 @@ static int cirrusfb_create(struct drm_fb_helper *helper,
 	/* setup helper */
 	gfbdev->helper.fb = fb;
 
-	strcpy(info->fix.id, "cirrusdrmfb");
-
 	info->fbops = &cirrusfb_ops;
 
-	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(info, &gfbdev->helper, sizes->fb_width,
-			       sizes->fb_height);
+	drm_fb_helper_fill_info(info, &gfbdev->helper, sizes);
 
 	/* setup aperture base/size for vesafb takeover */
 	info->apertures->ranges[0].base = cdev->dev->mode_config.fb_base;
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 08/21] drm/exynos: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (5 preceding siblings ...)
  2019-03-26 13:19 ` [PATCH 07/21] drm/cirrus: " Daniel Vetter
@ 2019-03-26 13:19 ` Daniel Vetter
  2019-03-26 14:27   ` Noralf Trønnes
  2019-03-27 22:57   ` Inki Dae
  2019-03-26 13:19 ` [PATCH 09/21] drm/gma500: " Daniel Vetter
                   ` (12 subsequent siblings)
  19 siblings, 2 replies; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development
  Cc: linux-samsung-soc, Daniel Vetter, Intel Graphics Development,
	Seung-Woo Kim, Krzysztof Kozlowski, Kyungmin Park, Kukjin Kim,
	Daniel Vetter, linux-arm-kernel

This will give the exynos fbdev a name!

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
---
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index c30dd88cdb25..581a6a207995 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -87,11 +87,9 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
 		return PTR_ERR(fbi);
 	}
 
-	fbi->par = helper;
 	fbi->fbops = &exynos_drm_fb_ops;
 
-	drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(fbi, helper, sizes);
 
 	nr_pages = exynos_gem->size >> PAGE_SHIFT;
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 09/21] drm/gma500: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (6 preceding siblings ...)
  2019-03-26 13:19 ` [PATCH 08/21] drm/exynos: " Daniel Vetter
@ 2019-03-26 13:19 ` Daniel Vetter
  2019-03-26 14:31   ` Noralf Trønnes
  2019-03-26 13:19 ` [PATCH 10/21] drm/hibmc: " Daniel Vetter
                   ` (11 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

This will change the fb name from "psbdrmfb" to "gma500drmfb".

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
---
 drivers/gpu/drm/gma500/framebuffer.c | 7 +------
 drivers/gpu/drm/gma500/framebuffer.h | 2 +-
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index c934b3df1f81..a9d3a4a30ab8 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -389,7 +389,6 @@ static int psbfb_create(struct psb_fbdev *fbdev,
 		ret = PTR_ERR(info);
 		goto out;
 	}
-	info->par = fbdev;
 
 	mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth);
 
@@ -402,9 +401,6 @@ static int psbfb_create(struct psb_fbdev *fbdev,
 
 	fbdev->psb_fb_helper.fb = fb;
 
-	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-	strcpy(info->fix.id, "psbdrmfb");
-
 	if (dev_priv->ops->accel_2d && pitch_lines > 8)	/* 2D engine */
 		info->fbops = &psbfb_ops;
 	else if (gtt_roll) {	/* GTT rolling seems best */
@@ -427,8 +423,7 @@ static int psbfb_create(struct psb_fbdev *fbdev,
 		info->apertures->ranges[0].size = dev_priv->gtt.stolen_size;
 	}
 
-	drm_fb_helper_fill_var(info, &fbdev->psb_fb_helper,
-				sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(info, &fbdev->psb_fb_helper, sizes);
 
 	info->fix.mmio_start = pci_resource_start(dev->pdev, 0);
 	info->fix.mmio_len = pci_resource_len(dev->pdev, 0);
diff --git a/drivers/gpu/drm/gma500/framebuffer.h b/drivers/gpu/drm/gma500/framebuffer.h
index 23dc3c5f8f0d..e8e6357f033b 100644
--- a/drivers/gpu/drm/gma500/framebuffer.h
+++ b/drivers/gpu/drm/gma500/framebuffer.h
@@ -34,7 +34,7 @@ struct psb_framebuffer {
 };
 
 struct psb_fbdev {
-	struct drm_fb_helper psb_fb_helper;
+	struct drm_fb_helper psb_fb_helper; /* must be first */
 	struct psb_framebuffer pfb;
 };
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 10/21] drm/hibmc: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (7 preceding siblings ...)
  2019-03-26 13:19 ` [PATCH 09/21] drm/gma500: " Daniel Vetter
@ 2019-03-26 13:19 ` Daniel Vetter
  2019-03-26 14:32   ` Noralf Trønnes
  2019-03-26 13:19 ` [PATCH 11/21] drm/i915: " Daniel Vetter
                   ` (10 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development
  Cc: Ajit Negi, Daniel Vetter, Intel Graphics Development, John Garry,
	Xinliang Liu, Junwei Zhang, Souptick Joarder, Alex Deucher,
	Daniel Vetter, Christian König

Should not result in any changes.

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Ajit Negi <ajitn.linux@gmail.com>
Cc: Souptick Joarder <jrdr.linux@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: John Garry <john.garry@huawei.com>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h   | 2 +-
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 9 +--------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
index 3c168ae77b0c..0a381c22de26 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
@@ -31,7 +31,7 @@ struct hibmc_framebuffer {
 };
 
 struct hibmc_fbdev {
-	struct drm_fb_helper helper;
+	struct drm_fb_helper helper; /* must be first */
 	struct hibmc_framebuffer *fb;
 	int size;
 };
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
index de9d7cc97e44..8026859aa07d 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
@@ -116,8 +116,6 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,
 		goto out_release_fbi;
 	}
 
-	info->par = hi_fbdev;
-
 	hi_fbdev->fb = hibmc_framebuffer_init(priv->dev, &mode_cmd, gobj);
 	if (IS_ERR(hi_fbdev->fb)) {
 		ret = PTR_ERR(hi_fbdev->fb);
@@ -129,14 +127,9 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,
 	priv->fbdev->size = size;
 	hi_fbdev->helper.fb = &hi_fbdev->fb->fb;
 
-	strcpy(info->fix.id, "hibmcdrmfb");
-
 	info->fbops = &hibmc_drm_fb_ops;
 
-	drm_fb_helper_fill_fix(info, hi_fbdev->fb->fb.pitches[0],
-			       hi_fbdev->fb->fb.format->depth);
-	drm_fb_helper_fill_var(info, &priv->fbdev->helper, sizes->fb_width,
-			       sizes->fb_height);
+	drm_fb_helper_fill_info(info, &priv->fbdev->helper, sizes);
 
 	info->screen_base = bo->kmap.virtual;
 	info->screen_size = size;
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 11/21] drm/i915: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (8 preceding siblings ...)
  2019-03-26 13:19 ` [PATCH 10/21] drm/hibmc: " Daniel Vetter
@ 2019-03-26 13:19 ` Daniel Vetter
  2019-03-26 14:34   ` Noralf Trønnes
  2019-03-27 11:10   ` Joonas Lahtinen
  2019-03-26 13:19 ` [PATCH 12/21] drm/mga200g: " Daniel Vetter
                   ` (9 subsequent siblings)
  19 siblings, 2 replies; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

This changes the fb name from "inteldrmfb" to "i915drmfb".

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
---
 drivers/gpu/drm/i915/intel_fbdev.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index f9ab94b99a3c..ef93c27e60b4 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -235,12 +235,8 @@ static int intelfb_create(struct drm_fb_helper *helper,
 		goto out_unpin;
 	}
 
-	info->par = helper;
-
 	ifbdev->helper.fb = fb;
 
-	strcpy(info->fix.id, "inteldrmfb");
-
 	info->fbops = &intelfb_ops;
 
 	/* setup aperture base/size for vesafb takeover */
@@ -259,8 +255,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
 	info->screen_base = vaddr;
 	info->screen_size = vma->node.size;
 
-	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(info, &ifbdev->helper, sizes);
 
 	/* If the object is shmemfs backed, it will have given us zeroed pages.
 	 * If the object is stolen however, it will be full of whatever
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 12/21] drm/mga200g: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (9 preceding siblings ...)
  2019-03-26 13:19 ` [PATCH 11/21] drm/i915: " Daniel Vetter
@ 2019-03-26 13:19 ` Daniel Vetter
  2019-03-26 14:41   ` Noralf Trønnes
  2019-03-26 13:20 ` [PATCH 14/21] drm/nouveau: " Daniel Vetter
                   ` (8 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:19 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Junwei Zhang,
	Daniel Vetter, Alex Deucher, Dave Airlie, Christian König

Should not result in any changes.

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/mgag200/mgag200_drv.h | 2 +-
 drivers/gpu/drm/mgag200/mgag200_fb.c  | 8 +-------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 0aaedc554879..71a235c2d848 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -113,7 +113,7 @@ struct mga_framebuffer {
 };
 
 struct mga_fbdev {
-	struct drm_fb_helper helper;
+	struct drm_fb_helper helper; /* must be first */
 	struct mga_framebuffer mfb;
 	void *sysram;
 	int size;
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c
index 6893934b26c0..5b7e64cac004 100644
--- a/drivers/gpu/drm/mgag200/mgag200_fb.c
+++ b/drivers/gpu/drm/mgag200/mgag200_fb.c
@@ -195,8 +195,6 @@ static int mgag200fb_create(struct drm_fb_helper *helper,
 		goto err_alloc_fbi;
 	}
 
-	info->par = mfbdev;
-
 	ret = mgag200_framebuffer_init(dev, &mfbdev->mfb, &mode_cmd, gobj);
 	if (ret)
 		goto err_alloc_fbi;
@@ -209,17 +207,13 @@ static int mgag200fb_create(struct drm_fb_helper *helper,
 	/* setup helper */
 	mfbdev->helper.fb = fb;
 
-	strcpy(info->fix.id, "mgadrmfb");
-
 	info->fbops = &mgag200fb_ops;
 
 	/* setup aperture base/size for vesafb takeover */
 	info->apertures->ranges[0].base = mdev->dev->mode_config.fb_base;
 	info->apertures->ranges[0].size = mdev->mc.vram_size;
 
-	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(info, &mfbdev->helper, sizes->fb_width,
-			       sizes->fb_height);
+	drm_fb_helper_fill_info(info, &mfbdev->helper, sizes);
 
 	info->screen_base = sysram;
 	info->screen_size = size;
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 13/21] drm/bochs: Use drm_fb_helper_fill_info
       [not found] ` <20190326132008.11781-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
@ 2019-03-26 13:20   ` Daniel Vetter
  2019-03-26 14:42     ` Noralf Trønnes
  2019-03-26 13:20   ` [PATCH 16/21] drm/radeon: " Daniel Vetter
  1 sibling, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:20 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Rob Clark,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Daniel Vetter,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

This will change the fb name from "msm" to "msmdrmfb".

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
---
 drivers/gpu/drm/msm/msm_fbdev.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
index c03e860ba737..d088299babf3 100644
--- a/drivers/gpu/drm/msm/msm_fbdev.c
+++ b/drivers/gpu/drm/msm/msm_fbdev.c
@@ -122,13 +122,9 @@ static int msm_fbdev_create(struct drm_fb_helper *helper,
 	fbdev->fb = fb;
 	helper->fb = fb;
 
-	fbi->par = helper;
 	fbi->fbops = &msm_fb_ops;
 
-	strcpy(fbi->fix.id, "msm");
-
-	drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(fbi, helper, sizes);
 
 	dev->mode_config.fb_base = paddr;
 
-- 
2.20.1

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 14/21] drm/nouveau: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (10 preceding siblings ...)
  2019-03-26 13:19 ` [PATCH 12/21] drm/mga200g: " Daniel Vetter
@ 2019-03-26 13:20 ` Daniel Vetter
  2019-03-26 14:47   ` Noralf Trønnes
  2019-03-26 13:20 ` [PATCH 15/21] drm/omap: " Daniel Vetter
                   ` (7 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:20 UTC (permalink / raw)
  To: DRI Development
  Cc: nouveau, Daniel Vetter, Intel Graphics Development, Ben Skeggs,
	Daniel Vetter

This changes the fb name from "nouveaufb" to "nouveaudrmfb".

Aside: I wonder whether the in_interrupt() check is good enough for
the nouveau acceleration. Cargo-cult says drm_can_sleep() is needed,
which isn't actually working if you pick a .config without PREEMPT.
For the generic fbdev defio support we've gone with offloading
everything to a worker. For the non-accel callbacks (set_par, blank
and friends) checking for oops_in_progress is good enough to catch all
the evil calling contexts.

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: nouveau@lists.freedesktop.org
---
 drivers/gpu/drm/nouveau/nouveau_fbcon.c | 7 +------
 drivers/gpu/drm/nouveau/nouveau_fbcon.h | 2 +-
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 9d6dba07c727..73cc3217068a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -366,12 +366,9 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
 		goto out_unlock;
 	}
 
-	info->par = fbcon;
-
 	/* setup helper */
 	fbcon->helper.fb = &fb->base;
 
-	strcpy(info->fix.id, "nouveaufb");
 	if (!chan)
 		info->flags = FBINFO_HWACCEL_DISABLED;
 	else
@@ -386,9 +383,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
 	info->screen_base = nvbo_kmap_obj_iovirtual(fb->nvbo);
 	info->screen_size = fb->nvbo->bo.mem.num_pages << PAGE_SHIFT;
 
-	drm_fb_helper_fill_fix(info, fb->base.pitches[0],
-			       fb->base.format->depth);
-	drm_fb_helper_fill_var(info, &fbcon->helper, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(info, &fbcon->helper, sizes);
 
 	/* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.h b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
index db9d52047ef8..73a7eeba3973 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.h
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
@@ -32,7 +32,7 @@
 #include "nouveau_display.h"
 
 struct nouveau_fbdev {
-	struct drm_fb_helper helper;
+	struct drm_fb_helper helper; /* must be first */
 	unsigned int saved_flags;
 	struct nvif_object surf2d;
 	struct nvif_object clip;
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 15/21] drm/omap: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (11 preceding siblings ...)
  2019-03-26 13:20 ` [PATCH 14/21] drm/nouveau: " Daniel Vetter
@ 2019-03-26 13:20 ` Daniel Vetter
  2019-03-26 14:49   ` Noralf Trønnes
       [not found] ` <20190326132008.11781-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
                   ` (6 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:20 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Tomi Valkeinen, Daniel Vetter

This changes the fb name from "omapdrm" to "omapdrmfb".

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/gpu/drm/omapdrm/omap_fbdev.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index 851c59f07eb1..50aabd854f4d 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -183,13 +183,9 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
 	fbdev->fb = fb;
 	helper->fb = fb;
 
-	fbi->par = helper;
 	fbi->fbops = &omap_fb_ops;
 
-	strcpy(fbi->fix.id, MODULE_NAME);
-
-	drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(fbi, helper, sizes);
 
 	dev->mode_config.fb_base = dma_addr;
 
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 16/21] drm/radeon: Use drm_fb_helper_fill_info
       [not found] ` <20190326132008.11781-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
  2019-03-26 13:20   ` [PATCH 13/21] drm/bochs: " Daniel Vetter
@ 2019-03-26 13:20   ` Daniel Vetter
  2019-03-26 14:51     ` Noralf Trønnes
  1 sibling, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:20 UTC (permalink / raw)
  To: DRI Development
  Cc: David (ChunMing) Zhou, Daniel Vetter, Intel Graphics Development,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Alex Deucher,
	Daniel Vetter, Christian König

This should not result in any changes.

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
Cc: amd-gfx@lists.freedesktop.org
---
 drivers/gpu/drm/radeon/radeon_fb.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
index d50bff20f7de..1298b84cb1c7 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -42,7 +42,7 @@
  * the helper contains a pointer to radeon framebuffer baseclass.
  */
 struct radeon_fbdev {
-	struct drm_fb_helper helper;
+	struct drm_fb_helper helper; /* must be first */
 	struct drm_framebuffer fb;
 	struct radeon_device *rdev;
 };
@@ -247,8 +247,6 @@ static int radeonfb_create(struct drm_fb_helper *helper,
 	/* radeon resume is fragile and needs a vt switch to help it along */
 	info->skip_vt_switch = false;
 
-	info->par = rfbdev;
-
 	ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->fb, &mode_cmd, gobj);
 	if (ret) {
 		DRM_ERROR("failed to initialize framebuffer %d\n", ret);
@@ -262,10 +260,6 @@ static int radeonfb_create(struct drm_fb_helper *helper,
 
 	memset_io(rbo->kptr, 0x0, radeon_bo_size(rbo));
 
-	strcpy(info->fix.id, "radeondrmfb");
-
-	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-
 	info->fbops = &radeonfb_ops;
 
 	tmp = radeon_bo_gpu_offset(rbo) - rdev->mc.vram_start;
@@ -274,7 +268,7 @@ static int radeonfb_create(struct drm_fb_helper *helper,
 	info->screen_base = rbo->kptr;
 	info->screen_size = radeon_bo_size(rbo);
 
-	drm_fb_helper_fill_var(info, &rfbdev->helper, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(info, &rfbdev->helper, sizes);
 
 	/* setup aperture base/size for vesafb takeover */
 	info->apertures->ranges[0].base = rdev->ddev->mode_config.fb_base;
-- 
2.20.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 17/21] drm/rockchip: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (13 preceding siblings ...)
       [not found] ` <20190326132008.11781-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
@ 2019-03-26 13:20 ` Daniel Vetter
  2019-03-26 14:52   ` Noralf Trønnes
  2019-03-26 13:20 ` [PATCH 18/21] drm/tegra: " Daniel Vetter
                   ` (4 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:20 UTC (permalink / raw)
  To: DRI Development
  Cc: Heiko Stuebner, Daniel Vetter, Intel Graphics Development,
	Sandy Huang, linux-rockchip, Daniel Vetter, linux-arm-kernel

This will set an fb name for the first time!

v2: Rebase

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
---
 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
index 0cbcef88d4d7..30459de66b67 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
@@ -90,12 +90,10 @@ static int rockchip_drm_fbdev_create(struct drm_fb_helper *helper,
 		goto out;
 	}
 
-	fbi->par = helper;
 	fbi->fbops = &rockchip_drm_fbdev_ops;
 
 	fb = helper->fb;
-	drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(fbi, helper, sizes);
 
 	offset = fbi->var.xoffset * bytes_per_pixel;
 	offset += fbi->var.yoffset * fb->pitches[0];
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 18/21] drm/tegra: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (14 preceding siblings ...)
  2019-03-26 13:20 ` [PATCH 17/21] drm/rockchip: " Daniel Vetter
@ 2019-03-26 13:20 ` Daniel Vetter
  2019-03-26 14:53   ` Noralf Trønnes
  2019-03-26 14:55   ` Thierry Reding
  2019-03-26 13:20 ` [PATCH 19/21] drm/udl: " Daniel Vetter
                   ` (3 subsequent siblings)
  19 siblings, 2 replies; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:20 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Jonathan Hunter,
	Thierry Reding, linux-tegra, Daniel Vetter, Thierry Reding

Another driver that didn't set fbinfo->fix.id before.

v2: Fix subject and rebase

Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
---
 drivers/gpu/drm/tegra/fb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
index 0a4ce05e00ab..1dd83a757dba 100644
--- a/drivers/gpu/drm/tegra/fb.c
+++ b/drivers/gpu/drm/tegra/fb.c
@@ -255,11 +255,9 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,
 	helper->fb = fb;
 	helper->fbdev = info;
 
-	info->par = helper;
 	info->fbops = &tegra_fb_ops;
 
-	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(info, helper, fb->width, fb->height);
+	drm_fb_helper_fill_info(info, helper, sizes);
 
 	offset = info->var.xoffset * bytes_per_pixel +
 		 info->var.yoffset * fb->pitches[0];
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 19/21] drm/udl: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (15 preceding siblings ...)
  2019-03-26 13:20 ` [PATCH 18/21] drm/tegra: " Daniel Vetter
@ 2019-03-26 13:20 ` Daniel Vetter
  2019-03-26 14:58   ` Noralf Trønnes
  2019-03-26 13:20 ` [PATCH 20/21] drm/vboxvideo: " Daniel Vetter
                   ` (2 subsequent siblings)
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:20 UTC (permalink / raw)
  To: DRI Development
  Cc: Emil Lundmark, Greg Kroah-Hartman, Daniel Vetter,
	Intel Graphics Development, Mikulas Patocka, Daniel Vetter,
	Dave Airlie

This should not result in any changes.

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Emil Lundmark <lndmrk@chromium.org>
---
 drivers/gpu/drm/udl/udl_fb.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index dd9ffded223b..59e005edf309 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -32,7 +32,7 @@ module_param(fb_bpp, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
 module_param(fb_defio, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
 
 struct udl_fbdev {
-	struct drm_fb_helper helper;
+	struct drm_fb_helper helper; /* must be first */
 	struct udl_framebuffer ufb;
 	int fb_count;
 };
@@ -402,15 +402,12 @@ static int udlfb_create(struct drm_fb_helper *helper,
 
 	ufbdev->helper.fb = fb;
 
-	strcpy(info->fix.id, "udldrmfb");
-
 	info->screen_base = ufbdev->ufb.obj->vmapping;
 	info->fix.smem_len = size;
 	info->fix.smem_start = (unsigned long)ufbdev->ufb.obj->vmapping;
 
 	info->fbops = &udlfb_ops;
-	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(info, &ufbdev->helper, sizes->fb_width, sizes->fb_height);
+	drm_fb_helper_fill_info(info, &ufbdev->helper, sizes);
 
 	DRM_DEBUG_KMS("allocated %dx%d vmal %p\n",
 		      fb->width, fb->height,
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 20/21] drm/vboxvideo: Use drm_fb_helper_fill_info
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (16 preceding siblings ...)
  2019-03-26 13:20 ` [PATCH 19/21] drm/udl: " Daniel Vetter
@ 2019-03-26 13:20 ` Daniel Vetter
  2019-03-26 14:59   ` Noralf Trønnes
  2019-03-26 13:20 ` [PATCH 21/21] drm/fb-helper: Unexport fill_{var,info} Daniel Vetter
  2019-03-26 13:50 ` [PATCH 01/21] drm/fb-helper: Add fill_info() functions Noralf Trønnes
  19 siblings, 1 reply; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:20 UTC (permalink / raw)
  To: DRI Development
  Cc: Alexander Kapshuk, Bartlomiej Zolnierkiewicz, Daniel Vetter,
	Intel Graphics Development, Greg Kroah-Hartman, Daniel Vetter

This should not result in any changes.

v2: Rebase over vbox changes - vbox gained it's own line to fill
fix.id.

v3: Rebase

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (v2)
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Alexander Kapshuk <alexander.kapshuk@gmail.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/gpu/drm/vboxvideo/vbox_fb.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/vboxvideo/vbox_fb.c b/drivers/gpu/drm/vboxvideo/vbox_fb.c
index 83a04afd1766..b724fe7c0c30 100644
--- a/drivers/gpu/drm/vboxvideo/vbox_fb.c
+++ b/drivers/gpu/drm/vboxvideo/vbox_fb.c
@@ -90,13 +90,9 @@ int vboxfb_create(struct drm_fb_helper *helper,
 	if (IS_ERR(info->screen_base))
 		return PTR_ERR(info->screen_base);
 
-	info->par = helper;
-
 	fb = &vbox->afb.base;
 	helper->fb = fb;
 
-	strcpy(info->fix.id, "vboxdrmfb");
-
 	info->fbops = &vboxfb_ops;
 
 	/*
@@ -106,9 +102,7 @@ int vboxfb_create(struct drm_fb_helper *helper,
 	info->apertures->ranges[0].base = pci_resource_start(pdev, 0);
 	info->apertures->ranges[0].size = pci_resource_len(pdev, 0);
 
-	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-	drm_fb_helper_fill_var(info, helper, sizes->fb_width,
-			       sizes->fb_height);
+	drm_fb_helper_fill_info(info, helper, sizes);
 
 	gpu_addr = vbox_bo_gpu_offset(bo);
 	info->fix.smem_start = info->apertures->ranges[0].base + gpu_addr;
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 21/21] drm/fb-helper: Unexport fill_{var,info}
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (17 preceding siblings ...)
  2019-03-26 13:20 ` [PATCH 20/21] drm/vboxvideo: " Daniel Vetter
@ 2019-03-26 13:20 ` Daniel Vetter
  2019-03-26 14:34   ` Alex Deucher
  2019-03-26 15:01   ` [PATCH 21/21] drm/fb-helper: Unexport fill_{var, info} Noralf Trønnes
  2019-03-26 13:50 ` [PATCH 01/21] drm/fb-helper: Add fill_info() functions Noralf Trønnes
  19 siblings, 2 replies; 49+ messages in thread
From: Daniel Vetter @ 2019-03-26 13:20 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

Not used by drivers anymore.

v2: Rebase

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_fb_helper.c | 38 +++++----------------------------
 include/drm/drm_fb_helper.h     |  4 ----
 2 files changed, 5 insertions(+), 37 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 42423ca28991..6ae8d5fa142c 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -2037,21 +2037,8 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
 	return 0;
 }
 
-/**
- * drm_fb_helper_fill_fix - initializes fixed fbdev information
- * @info: fbdev registered by the helper
- * @pitch: desired pitch
- * @depth: desired depth
- *
- * Helper to fill in the fixed fbdev information useful for a non-accelerated
- * fbdev emulations. Drivers which support acceleration methods which impose
- * additional constraints need to set up their own limits.
- *
- * Drivers should call this (or their equivalent setup code) from their
- * &drm_fb_helper_funcs.fb_probe callback.
- */
-void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
-			    uint32_t depth)
+static void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
+				   uint32_t depth)
 {
 	info->fix.type = FB_TYPE_PACKED_PIXELS;
 	info->fix.visual = depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
@@ -2066,24 +2053,10 @@ void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
 
 	info->fix.line_length = pitch;
 }
-EXPORT_SYMBOL(drm_fb_helper_fill_fix);
 
-/**
- * drm_fb_helper_fill_var - initalizes variable fbdev information
- * @info: fbdev instance to set up
- * @fb_helper: fb helper instance to use as template
- * @fb_width: desired fb width
- * @fb_height: desired fb height
- *
- * Sets up the variable fbdev metainformation from the given fb helper instance
- * and the drm framebuffer allocated in &drm_fb_helper.fb.
- *
- * Drivers should call this (or their equivalent setup code) from their
- * &drm_fb_helper_funcs.fb_probe callback after having allocated the fbdev
- * backing storage framebuffer.
- */
-void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
-			    uint32_t fb_width, uint32_t fb_height)
+static void drm_fb_helper_fill_var(struct fb_info *info,
+				   struct drm_fb_helper *fb_helper,
+				   uint32_t fb_width, uint32_t fb_height)
 {
 	struct drm_framebuffer *fb = fb_helper->fb;
 
@@ -2103,7 +2076,6 @@ void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helpe
 	info->var.xres = fb_width;
 	info->var.yres = fb_height;
 }
-EXPORT_SYMBOL(drm_fb_helper_fill_var);
 
 /**
  * drm_fb_helper_fill_info - initializes fbdev information
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 9ef72f20662d..9ba9db5dc34d 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -289,10 +289,6 @@ int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper);
 
 struct fb_info *drm_fb_helper_alloc_fbi(struct drm_fb_helper *fb_helper);
 void drm_fb_helper_unregister_fbi(struct drm_fb_helper *fb_helper);
-void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
-			    uint32_t fb_width, uint32_t fb_height);
-void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
-			    uint32_t depth);
 void drm_fb_helper_fill_info(struct fb_info *info,
 			     struct drm_fb_helper *fb_helper,
 			     struct drm_fb_helper_surface_size *sizes);
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 49+ messages in thread

* Re: [PATCH 01/21] drm/fb-helper: Add fill_info() functions
  2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
                   ` (18 preceding siblings ...)
  2019-03-26 13:20 ` [PATCH 21/21] drm/fb-helper: Unexport fill_{var,info} Daniel Vetter
@ 2019-03-26 13:50 ` Noralf Trønnes
  19 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 13:50 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development; +Cc: Daniel Vetter, Intel Graphics Development



Den 26.03.2019 14.19, skrev Daniel Vetter:
> The fbdev split between fix and var information is kinda
> pointless for drm drivers since everything is fixed: The fbdev
> emulation doesn't support changing modes at all.
> 
> Create a new simplified helper and use it in the generic fbdev
> helper code. Follow-up patches will beef it up more and roll
> it out to all drivers.
> 
> v2: We need to keep sizes, since they might not match the fb dimesions

dimesions -> dimensions

> (Noralf)
> 
> Cc: Noralf Trønnes <noralf@tronnes.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/drm_fb_helper.c | 30 ++++++++++++++++++++++++++++--
>  include/drm/drm_fb_helper.h     |  3 +++
>  2 files changed, 31 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index c3d6a8c78a51..b89d177228e2 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -2105,6 +2105,33 @@ void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helpe
>  }
>  EXPORT_SYMBOL(drm_fb_helper_fill_var);
>  
> +/**
> + * drm_fb_helper_fill_info - initializes fbdev information
> + * @info: fbdev instance to set up
> + * @fb_helper: fb helper instance to use as template
> + * @sizes: describes fbdev size and scanout surface size
> + *
> + *

You might want to remove the extra newline here.

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>

> + * Sets up the variable and fixed fbdev metainformation from the given fb helper
> + * instance and the drm framebuffer allocated in &drm_fb_helper.fb.
> + *
> + * Drivers should call this (or their equivalent setup code) from their
> + * &drm_fb_helper_funcs.fb_probe callback after having allocated the fbdev
> + * backing storage framebuffer.
> + */
> +void drm_fb_helper_fill_info(struct fb_info *info,
> +			     struct drm_fb_helper *fb_helper,
> +			     struct drm_fb_helper_surface_size *sizes)
> +{
> +	struct drm_framebuffer *fb = fb_helper->fb;
> +
> +	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
> +	drm_fb_helper_fill_var(info, fb_helper,
> +			       sizes->fb_width, sizes->fb_height);
> +
> +}
> +EXPORT_SYMBOL(drm_fb_helper_fill_info);
> +
>  static int drm_fb_helper_probe_connector_modes(struct drm_fb_helper *fb_helper,
>  						uint32_t maxX,
>  						uint32_t maxY)
> @@ -3165,8 +3192,7 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper,
>  #endif
>  	strcpy(fbi->fix.id, "DRM emulated");
>  
> -	drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth);
> -	drm_fb_helper_fill_var(fbi, fb_helper, sizes->fb_width, sizes->fb_height);
> +	drm_fb_helper_fill_info(fbi, fb_helper, sizes);
>  
>  	if (fb->funcs->dirty) {
>  		struct fb_ops *fbops;
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index 286d58efed5d..9ef72f20662d 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -293,6 +293,9 @@ void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helpe
>  			    uint32_t fb_width, uint32_t fb_height);
>  void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
>  			    uint32_t depth);
> +void drm_fb_helper_fill_info(struct fb_info *info,
> +			     struct drm_fb_helper *fb_helper,
> +			     struct drm_fb_helper_surface_size *sizes);
>  
>  void drm_fb_helper_unlink_fbi(struct drm_fb_helper *fb_helper);
>  
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 02/21] drm/fb-helper: set fbi->fix.id in fill_info()
  2019-03-26 13:19 ` [PATCH 02/21] drm/fb-helper: set fbi->fix.id in fill_info() Daniel Vetter
@ 2019-03-26 13:56   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 13:56 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development; +Cc: Daniel Vetter, Intel Graphics Development



Den 26.03.2019 14.19, skrev Daniel Vetter:
> Looking at the oldest/most popular drivers ${driver}drmfb seems to be
> the standard, except i915.ko went with "inteldrmfb". I guess renaming
> that for consistency won't hurt, it definitely confused me when I
> started with kms 10 years ago.
> 
> I hope this never became uapi ... worst case drivers can overwrite it
> after having called fill_info().
> 
> Since subsequent patches change this for some drivers later on in the
> series, here's the exhaustive list of where all fix.id is used:
> - /proc/fb which prints the minor number and fix.id name.
> - per-fb sysfs name file
> - getfix ioctl, which is used by fbset only to print out the name when
> dumping information
> - lots and lots of places in dmesg, anytime anything happens with an
> fbdev really
> 
> I think minimal to 0 chances that changing this will screw up a config
> script or something, since outside of informational message it's not
> used by anything to identify which fbdev maps to which minor. After
> all the last fbset release is from 1999, and that predates even devfs
> I think.
> 
> v2: Rebase and amend commit message, thanks to Ilia for pointing out
> that this needs to be spelled out.
> 
> Cc: Ilia Mirkin <imirkin@alum.mit.edu>
> igned-off-by: Daniel Vetter <daniel.vetter@intel.com>

igned -> Signed

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>

> ---
>  drivers/gpu/drm/drm_fb_helper.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index b89d177228e2..e3538c851c58 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -2129,6 +2129,9 @@ void drm_fb_helper_fill_info(struct fb_info *info,
>  	drm_fb_helper_fill_var(info, fb_helper,
>  			       sizes->fb_width, sizes->fb_height);
>  
> +	snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
> +		 fb_helper->dev->driver->name);
> +
>  }
>  EXPORT_SYMBOL(drm_fb_helper_fill_info);
>  
> @@ -3190,8 +3193,6 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper,
>  		fbi->fix.smem_start =
>  			page_to_phys(virt_to_page(fbi->screen_buffer));
>  #endif
> -	strcpy(fbi->fix.id, "DRM emulated");
> -
>  	drm_fb_helper_fill_info(fbi, fb_helper, sizes);
>  
>  	if (fb->funcs->dirty) {
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 03/21] drm/fb_helper: set info->par in fill_info()
  2019-03-26 13:19 ` [PATCH 03/21] drm/fb_helper: set info->par " Daniel Vetter
@ 2019-03-26 13:57   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 13:57 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development; +Cc: Intel Graphics Development, Sam Ravnborg



Den 26.03.2019 14.19, skrev Daniel Vetter:
> The fbdev emulation helpers pretty much assume that this is set.
> Let's do it for everyone.
> 
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 04/21] drm/amdgpu: Use drm_fb_helper_fill_info
  2019-03-26 13:19 ` [PATCH 04/21] drm/amdgpu: Use drm_fb_helper_fill_info Daniel Vetter
@ 2019-03-26 14:04   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:04 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Daniel Stone, Intel Graphics Development, Michel Dänzer,
	Samuel Li, Shirish S, Alex Deucher, Huang Rui, Junwei Zhang,
	Daniel Vetter, Christian König



Den 26.03.2019 14.19, skrev Daniel Vetter:
> Should not cause any changes.
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: Samuel Li <Samuel.Li@amd.com>
> Cc: "Michel Dänzer" <michel.daenzer@amd.com>
> Cc: Huang Rui <ray.huang@amd.com>
> Cc: Junwei Zhang <Jerry.Zhang@amd.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Daniel Stone <daniels@collabora.com>
> Cc: Shirish S <shirish.s@amd.com>
> ---

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 05/21] drm/armada: Use drm_fb_helper_fill_info
  2019-03-26 13:19 ` [PATCH 05/21] drm/armada: " Daniel Vetter
@ 2019-03-26 14:06   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:06 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Russell King



Den 26.03.2019 14.19, skrev Daniel Vetter:
> Only changes the name of the fb from "armada-drmfb" to armadafb.

armadafb -> armadadrmfb

> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Russell King <linux@armlinux.org.uk>
> ---

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>

>  drivers/gpu/drm/armada/armada_fbdev.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
> index 8d23700848df..1e7140f005a5 100644
> --- a/drivers/gpu/drm/armada/armada_fbdev.c
> +++ b/drivers/gpu/drm/armada/armada_fbdev.c
> @@ -78,8 +78,6 @@ static int armada_fbdev_create(struct drm_fb_helper *fbh,
>  		goto err_fballoc;
>  	}
>  
> -	strlcpy(info->fix.id, "armada-drmfb", sizeof(info->fix.id));
> -	info->par = fbh;
>  	info->fbops = &armada_fb_ops;
>  	info->fix.smem_start = obj->phys_addr;
>  	info->fix.smem_len = obj->obj.size;
> @@ -87,9 +85,7 @@ static int armada_fbdev_create(struct drm_fb_helper *fbh,
>  	info->screen_base = ptr;
>  	fbh->fb = &dfb->fb;
>  
> -	drm_fb_helper_fill_fix(info, dfb->fb.pitches[0],
> -			       dfb->fb.format->depth);
> -	drm_fb_helper_fill_var(info, fbh, sizes->fb_width, sizes->fb_height);
> +	drm_fb_helper_fill_info(info, fbh, sizes);
>  
>  	DRM_DEBUG_KMS("allocated %dx%d %dbpp fb: 0x%08llx\n",
>  		dfb->fb.width, dfb->fb.height, dfb->fb.format->cpp[0] * 8,
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 06/21] drm/ast: Use drm_fb_helper_fill_info
  2019-03-26 13:19 ` [PATCH 06/21] drm/ast: " Daniel Vetter
@ 2019-03-26 14:21   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:21 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Sam Bobroff, Intel Graphics Development, YueHaibing,
	Junwei Zhang, Dave Airlie, Alex Deucher, Daniel Vetter,
	Christian König



Den 26.03.2019 14.19, skrev Daniel Vetter:
> Should not result in any changes.
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Junwei Zhang <Jerry.Zhang@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Sean Paul <sean@poorly.run>
> Cc: YueHaibing <yuehaibing@huawei.com>
> Cc: Sam Bobroff <sbobroff@linux.ibm.com>
> ---
>  drivers/gpu/drm/ast/ast_drv.h | 2 +-
>  drivers/gpu/drm/ast/ast_fb.c  | 7 +------
>  2 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h
> index bfc65040dfcb..ffce4608e0c5 100644
> --- a/drivers/gpu/drm/ast/ast_drv.h
> +++ b/drivers/gpu/drm/ast/ast_drv.h
> @@ -259,7 +259,7 @@ struct ast_framebuffer {
>  };
>  
>  struct ast_fbdev {
> -	struct drm_fb_helper helper;
> +	struct drm_fb_helper helper; /* must be first */

I think being implicit like this is confusing.
I would prefer to set 'info->par = afbdev;' after calling
drm_fb_helper_fill_info().

But it works and the pattern is used elsewhere:

Acked-by: Noralf Trønnes <noralf@tronnes.org>

>  	struct ast_framebuffer afb;
>  	void *sysram;
>  	int size;
> diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
> index 2c9f8dd9733a..e718d0f60d6b 100644
> --- a/drivers/gpu/drm/ast/ast_fb.c
> +++ b/drivers/gpu/drm/ast/ast_fb.c
> @@ -217,8 +217,6 @@ static int astfb_create(struct drm_fb_helper *helper,
>  		ret = PTR_ERR(info);
>  		goto out;
>  	}
> -	info->par = afbdev;
> -
>  	ret = ast_framebuffer_init(dev, &afbdev->afb, &mode_cmd, gobj);
>  	if (ret)
>  		goto out;
> @@ -229,15 +227,12 @@ static int astfb_create(struct drm_fb_helper *helper,
>  	fb = &afbdev->afb.base;
>  	afbdev->helper.fb = fb;
>  
> -	strcpy(info->fix.id, "astdrmfb");
> -
>  	info->fbops = &astfb_ops;
>  
>  	info->apertures->ranges[0].base = pci_resource_start(dev->pdev, 0);
>  	info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0);
>  
> -	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
> -	drm_fb_helper_fill_var(info, &afbdev->helper, sizes->fb_width, sizes->fb_height);
> +	drm_fb_helper_fill_info(info, &afbdev->helper, sizes);
>  
>  	info->screen_base = sysram;
>  	info->screen_size = size;
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 07/21] drm/cirrus: Use drm_fb_helper_fill_info
  2019-03-26 13:19 ` [PATCH 07/21] drm/cirrus: " Daniel Vetter
@ 2019-03-26 14:24   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:24 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Gerd Hoffmann



Den 26.03.2019 14.19, skrev Daniel Vetter:
> Should not result in any changes.
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  drivers/gpu/drm/cirrus/cirrus_drv.h   | 2 +-
>  drivers/gpu/drm/cirrus/cirrus_fbdev.c | 8 +-------
>  2 files changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.h b/drivers/gpu/drm/cirrus/cirrus_drv.h
> index f2b2e0d169fa..915709739257 100644
> --- a/drivers/gpu/drm/cirrus/cirrus_drv.h
> +++ b/drivers/gpu/drm/cirrus/cirrus_drv.h
> @@ -143,7 +143,7 @@ struct cirrus_device {
>  
>  
>  struct cirrus_fbdev {
> -	struct drm_fb_helper helper;
> +	struct drm_fb_helper helper; /* must be first */

Same implicit issue here as with ast, but anyways:

Acked-by: Noralf Trønnes <noralf@tronnes.org>


>  	struct drm_framebuffer *gfb;
>  	void *sysram;
>  	int size;
> diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
> index 39df62acac69..2e6128069fc3 100644
> --- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c
> +++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
> @@ -195,8 +195,6 @@ static int cirrusfb_create(struct drm_fb_helper *helper,
>  		goto err_vfree;
>  	}
>  
> -	info->par = gfbdev;
> -
>  	fb = kzalloc(sizeof(*fb), GFP_KERNEL);
>  	if (!fb) {
>  		ret = -ENOMEM;
> @@ -214,13 +212,9 @@ static int cirrusfb_create(struct drm_fb_helper *helper,
>  	/* setup helper */
>  	gfbdev->helper.fb = fb;
>  
> -	strcpy(info->fix.id, "cirrusdrmfb");
> -
>  	info->fbops = &cirrusfb_ops;
>  
> -	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
> -	drm_fb_helper_fill_var(info, &gfbdev->helper, sizes->fb_width,
> -			       sizes->fb_height);
> +	drm_fb_helper_fill_info(info, &gfbdev->helper, sizes);
>  
>  	/* setup aperture base/size for vesafb takeover */
>  	info->apertures->ranges[0].base = cdev->dev->mode_config.fb_base;
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/21] drm/exynos: Use drm_fb_helper_fill_info
  2019-03-26 13:19 ` [PATCH 08/21] drm/exynos: " Daniel Vetter
@ 2019-03-26 14:27   ` Noralf Trønnes
  2019-03-27 22:57   ` Inki Dae
  1 sibling, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:27 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: linux-samsung-soc, Intel Graphics Development, Seung-Woo Kim,
	Krzysztof Kozlowski, Kyungmin Park, Kukjin Kim, Daniel Vetter,
	linux-arm-kernel



Den 26.03.2019 14.19, skrev Daniel Vetter:
> This will give the exynos fbdev a name!
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Inki Dae <inki.dae@samsung.com>
> Cc: Joonyoung Shim <jy0922.shim@samsung.com>
> Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> ---

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 09/21] drm/gma500: Use drm_fb_helper_fill_info
  2019-03-26 13:19 ` [PATCH 09/21] drm/gma500: " Daniel Vetter
@ 2019-03-26 14:31   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:31 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development; +Cc: Daniel Vetter, Intel Graphics Development



Den 26.03.2019 14.19, skrev Daniel Vetter:
> This will change the fb name from "psbdrmfb" to "gma500drmfb".
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
> ---

Acked-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 10/21] drm/hibmc: Use drm_fb_helper_fill_info
  2019-03-26 13:19 ` [PATCH 10/21] drm/hibmc: " Daniel Vetter
@ 2019-03-26 14:32   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:32 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Ajit Negi, Intel Graphics Development, John Garry, Xinliang Liu,
	Alex Deucher, Souptick Joarder, Junwei Zhang, Daniel Vetter,
	Christian König



Den 26.03.2019 14.19, skrev Daniel Vetter:
> Should not result in any changes.
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Junwei Zhang <Jerry.Zhang@amd.com>
> Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: Ajit Negi <ajitn.linux@gmail.com>
> Cc: Souptick Joarder <jrdr.linux@gmail.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: John Garry <john.garry@huawei.com>
> ---

Acked-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 11/21] drm/i915: Use drm_fb_helper_fill_info
  2019-03-26 13:19 ` [PATCH 11/21] drm/i915: " Daniel Vetter
@ 2019-03-26 14:34   ` Noralf Trønnes
  2019-03-27 11:10   ` Joonas Lahtinen
  1 sibling, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:34 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development; +Cc: Daniel Vetter, Intel Graphics Development



Den 26.03.2019 14.19, skrev Daniel Vetter:
> This changes the fb name from "inteldrmfb" to "i915drmfb".
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> ---

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 21/21] drm/fb-helper: Unexport fill_{var,info}
  2019-03-26 13:20 ` [PATCH 21/21] drm/fb-helper: Unexport fill_{var,info} Daniel Vetter
@ 2019-03-26 14:34   ` Alex Deucher
  2019-03-26 15:01   ` [PATCH 21/21] drm/fb-helper: Unexport fill_{var, info} Noralf Trønnes
  1 sibling, 0 replies; 49+ messages in thread
From: Alex Deucher @ 2019-03-26 14:34 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Tue, Mar 26, 2019 at 9:21 AM Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>
> Not used by drivers anymore.
>
> v2: Rebase
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Other than the spelling typos noted by Noralf, the series is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>


> ---
>  drivers/gpu/drm/drm_fb_helper.c | 38 +++++----------------------------
>  include/drm/drm_fb_helper.h     |  4 ----
>  2 files changed, 5 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 42423ca28991..6ae8d5fa142c 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -2037,21 +2037,8 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>         return 0;
>  }
>
> -/**
> - * drm_fb_helper_fill_fix - initializes fixed fbdev information
> - * @info: fbdev registered by the helper
> - * @pitch: desired pitch
> - * @depth: desired depth
> - *
> - * Helper to fill in the fixed fbdev information useful for a non-accelerated
> - * fbdev emulations. Drivers which support acceleration methods which impose
> - * additional constraints need to set up their own limits.
> - *
> - * Drivers should call this (or their equivalent setup code) from their
> - * &drm_fb_helper_funcs.fb_probe callback.
> - */
> -void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
> -                           uint32_t depth)
> +static void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
> +                                  uint32_t depth)
>  {
>         info->fix.type = FB_TYPE_PACKED_PIXELS;
>         info->fix.visual = depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
> @@ -2066,24 +2053,10 @@ void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
>
>         info->fix.line_length = pitch;
>  }
> -EXPORT_SYMBOL(drm_fb_helper_fill_fix);
>
> -/**
> - * drm_fb_helper_fill_var - initalizes variable fbdev information
> - * @info: fbdev instance to set up
> - * @fb_helper: fb helper instance to use as template
> - * @fb_width: desired fb width
> - * @fb_height: desired fb height
> - *
> - * Sets up the variable fbdev metainformation from the given fb helper instance
> - * and the drm framebuffer allocated in &drm_fb_helper.fb.
> - *
> - * Drivers should call this (or their equivalent setup code) from their
> - * &drm_fb_helper_funcs.fb_probe callback after having allocated the fbdev
> - * backing storage framebuffer.
> - */
> -void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
> -                           uint32_t fb_width, uint32_t fb_height)
> +static void drm_fb_helper_fill_var(struct fb_info *info,
> +                                  struct drm_fb_helper *fb_helper,
> +                                  uint32_t fb_width, uint32_t fb_height)
>  {
>         struct drm_framebuffer *fb = fb_helper->fb;
>
> @@ -2103,7 +2076,6 @@ void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helpe
>         info->var.xres = fb_width;
>         info->var.yres = fb_height;
>  }
> -EXPORT_SYMBOL(drm_fb_helper_fill_var);
>
>  /**
>   * drm_fb_helper_fill_info - initializes fbdev information
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index 9ef72f20662d..9ba9db5dc34d 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -289,10 +289,6 @@ int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper);
>
>  struct fb_info *drm_fb_helper_alloc_fbi(struct drm_fb_helper *fb_helper);
>  void drm_fb_helper_unregister_fbi(struct drm_fb_helper *fb_helper);
> -void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
> -                           uint32_t fb_width, uint32_t fb_height);
> -void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
> -                           uint32_t depth);
>  void drm_fb_helper_fill_info(struct fb_info *info,
>                              struct drm_fb_helper *fb_helper,
>                              struct drm_fb_helper_surface_size *sizes);
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 12/21] drm/mga200g: Use drm_fb_helper_fill_info
  2019-03-26 13:19 ` [PATCH 12/21] drm/mga200g: " Daniel Vetter
@ 2019-03-26 14:41   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:41 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Intel Graphics Development, Alex Deucher, Dave Airlie,
	Junwei Zhang, Daniel Vetter, Christian König



Den 26.03.2019 14.19, skrev Daniel Vetter:
> Should not result in any changes.

It changes the name, so:

Only changes the name of the fb from "mgadrmfb" to "mga200drmfb".

Acked-by: Noralf Trønnes <noralf@tronnes.org>

> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: Junwei Zhang <Jerry.Zhang@amd.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/mgag200/mgag200_drv.h | 2 +-
>  drivers/gpu/drm/mgag200/mgag200_fb.c  | 8 +-------
>  2 files changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
> index 0aaedc554879..71a235c2d848 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_drv.h
> +++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
> @@ -113,7 +113,7 @@ struct mga_framebuffer {
>  };
>  
>  struct mga_fbdev {
> -	struct drm_fb_helper helper;
> +	struct drm_fb_helper helper; /* must be first */
>  	struct mga_framebuffer mfb;
>  	void *sysram;
>  	int size;
> diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c
> index 6893934b26c0..5b7e64cac004 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_fb.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c
> @@ -195,8 +195,6 @@ static int mgag200fb_create(struct drm_fb_helper *helper,
>  		goto err_alloc_fbi;
>  	}
>  
> -	info->par = mfbdev;
> -
>  	ret = mgag200_framebuffer_init(dev, &mfbdev->mfb, &mode_cmd, gobj);
>  	if (ret)
>  		goto err_alloc_fbi;
> @@ -209,17 +207,13 @@ static int mgag200fb_create(struct drm_fb_helper *helper,
>  	/* setup helper */
>  	mfbdev->helper.fb = fb;
>  
> -	strcpy(info->fix.id, "mgadrmfb");
> -
>  	info->fbops = &mgag200fb_ops;
>  
>  	/* setup aperture base/size for vesafb takeover */
>  	info->apertures->ranges[0].base = mdev->dev->mode_config.fb_base;
>  	info->apertures->ranges[0].size = mdev->mc.vram_size;
>  
> -	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
> -	drm_fb_helper_fill_var(info, &mfbdev->helper, sizes->fb_width,
> -			       sizes->fb_height);
> +	drm_fb_helper_fill_info(info, &mfbdev->helper, sizes);
>  
>  	info->screen_base = sysram;
>  	info->screen_size = size;
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 13/21] drm/bochs: Use drm_fb_helper_fill_info
  2019-03-26 13:20   ` [PATCH 13/21] drm/bochs: " Daniel Vetter
@ 2019-03-26 14:42     ` Noralf Trønnes
  2019-03-26 14:45       ` Noralf Trønnes
  0 siblings, 1 reply; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:42 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: linux-arm-msm, Intel Graphics Development, freedreno, Daniel Vetter



Den 26.03.2019 14.20, skrev Daniel Vetter:
> This will change the fb name from "msm" to "msmdrmfb".
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> ---

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 13/21] drm/bochs: Use drm_fb_helper_fill_info
  2019-03-26 14:42     ` Noralf Trønnes
@ 2019-03-26 14:45       ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:45 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: linux-arm-msm, Intel Graphics Development, freedreno, Daniel Vetter



Den 26.03.2019 15.42, skrev Noralf Trønnes:
> 
> 
> Den 26.03.2019 14.20, skrev Daniel Vetter:
>> This will change the fb name from "msm" to "msmdrmfb".
>>
>> v2: Rebase
>>
>> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>> Cc: Rob Clark <robdclark@gmail.com>
>> Cc: linux-arm-msm@vger.kernel.org
>> Cc: freedreno@lists.freedesktop.org
>> ---
> 
> Reviewed-by: Noralf Trønnes <noralf@tronnes.org>

I missed out on one thing, the subject is wrong wrt to the driver: bochs
-> msm.

> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 14/21] drm/nouveau: Use drm_fb_helper_fill_info
  2019-03-26 13:20 ` [PATCH 14/21] drm/nouveau: " Daniel Vetter
@ 2019-03-26 14:47   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:47 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: nouveau, Intel Graphics Development, Ben Skeggs, Daniel Vetter



Den 26.03.2019 14.20, skrev Daniel Vetter:
> This changes the fb name from "nouveaufb" to "nouveaudrmfb".
> 
> Aside: I wonder whether the in_interrupt() check is good enough for
> the nouveau acceleration. Cargo-cult says drm_can_sleep() is needed,
> which isn't actually working if you pick a .config without PREEMPT.
> For the generic fbdev defio support we've gone with offloading
> everything to a worker. For the non-accel callbacks (set_par, blank
> and friends) checking for oops_in_progress is good enough to catch all
> the evil calling contexts.
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: nouveau@lists.freedesktop.org
> ---

Acked-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 15/21] drm/omap: Use drm_fb_helper_fill_info
  2019-03-26 13:20 ` [PATCH 15/21] drm/omap: " Daniel Vetter
@ 2019-03-26 14:49   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:49 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Tomi Valkeinen



Den 26.03.2019 14.20, skrev Daniel Vetter:
> This changes the fb name from "omapdrm" to "omapdrmfb".
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 16/21] drm/radeon: Use drm_fb_helper_fill_info
  2019-03-26 13:20   ` [PATCH 16/21] drm/radeon: " Daniel Vetter
@ 2019-03-26 14:51     ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:51 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Alex Deucher, Daniel Vetter, Intel Graphics Development,
	Christian König, amd-gfx



Den 26.03.2019 14.20, skrev Daniel Vetter:
> This should not result in any changes.
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> ---

Acked-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 17/21] drm/rockchip: Use drm_fb_helper_fill_info
  2019-03-26 13:20 ` [PATCH 17/21] drm/rockchip: " Daniel Vetter
@ 2019-03-26 14:52   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:52 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: linux-rockchip, Intel Graphics Development, linux-arm-kernel,
	Daniel Vetter



Den 26.03.2019 14.20, skrev Daniel Vetter:
> This will set an fb name for the first time!
> 
> v2: Rebase
> 
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Sandy Huang <hjc@rock-chips.com>
> Cc: "Heiko Stübner" <heiko@sntech.de>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-rockchip@lists.infradead.org
> ---

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 18/21] drm/tegra: Use drm_fb_helper_fill_info
  2019-03-26 13:20 ` [PATCH 18/21] drm/tegra: " Daniel Vetter
@ 2019-03-26 14:53   ` Noralf Trønnes
  2019-03-26 14:55   ` Thierry Reding
  1 sibling, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:53 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Intel Graphics Development, Jonathan Hunter, Thierry Reding,
	linux-tegra, Daniel Vetter, Thierry Reding



Den 26.03.2019 14.20, skrev Daniel Vetter:
> Another driver that didn't set fbinfo->fix.id before.
> 
> v2: Fix subject and rebase
> 
> Acked-by: Thierry Reding <treding@nvidia.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: linux-tegra@vger.kernel.org
> ---

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 18/21] drm/tegra: Use drm_fb_helper_fill_info
  2019-03-26 13:20 ` [PATCH 18/21] drm/tegra: " Daniel Vetter
  2019-03-26 14:53   ` Noralf Trønnes
@ 2019-03-26 14:55   ` Thierry Reding
  1 sibling, 0 replies; 49+ messages in thread
From: Thierry Reding @ 2019-03-26 14:55 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Intel Graphics Development, DRI Development, Jonathan Hunter,
	linux-tegra, Daniel Vetter, Thierry Reding


[-- Attachment #1.1: Type: text/plain, Size: 543 bytes --]

On Tue, Mar 26, 2019 at 02:20:05PM +0100, Daniel Vetter wrote:
> Another driver that didn't set fbinfo->fix.id before.
> 
> v2: Fix subject and rebase
> 
> Acked-by: Thierry Reding <treding@nvidia.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: linux-tegra@vger.kernel.org
> ---
>  drivers/gpu/drm/tegra/fb.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 19/21] drm/udl: Use drm_fb_helper_fill_info
  2019-03-26 13:20 ` [PATCH 19/21] drm/udl: " Daniel Vetter
@ 2019-03-26 14:58   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:58 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Emil Lundmark, Greg Kroah-Hartman, Intel Graphics Development,
	Mikulas Patocka, Daniel Vetter, Dave Airlie



Den 26.03.2019 14.20, skrev Daniel Vetter:
> This should not result in any changes.
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: Mikulas Patocka <mpatocka@redhat.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Emil Lundmark <lndmrk@chromium.org>
> ---
>  drivers/gpu/drm/udl/udl_fb.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
> index dd9ffded223b..59e005edf309 100644
> --- a/drivers/gpu/drm/udl/udl_fb.c
> +++ b/drivers/gpu/drm/udl/udl_fb.c
> @@ -32,7 +32,7 @@ module_param(fb_bpp, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
>  module_param(fb_defio, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
>  
>  struct udl_fbdev {
> -	struct drm_fb_helper helper;
> +	struct drm_fb_helper helper; /* must be first */
>  	struct udl_framebuffer ufb;
>  	int fb_count;
>  };
> @@ -402,15 +402,12 @@ static int udlfb_create(struct drm_fb_helper *helper,
>  

You forgot to remove the info->par assignement here. With that:

Acked-by: Noralf Trønnes <noralf@tronnes.org>

>  	ufbdev->helper.fb = fb;
>  
> -	strcpy(info->fix.id, "udldrmfb");
> -
>  	info->screen_base = ufbdev->ufb.obj->vmapping;
>  	info->fix.smem_len = size;
>  	info->fix.smem_start = (unsigned long)ufbdev->ufb.obj->vmapping;
>  
>  	info->fbops = &udlfb_ops;
> -	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
> -	drm_fb_helper_fill_var(info, &ufbdev->helper, sizes->fb_width, sizes->fb_height);
> +	drm_fb_helper_fill_info(info, &ufbdev->helper, sizes);
>  
>  	DRM_DEBUG_KMS("allocated %dx%d vmal %p\n",
>  		      fb->width, fb->height,
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 20/21] drm/vboxvideo: Use drm_fb_helper_fill_info
  2019-03-26 13:20 ` [PATCH 20/21] drm/vboxvideo: " Daniel Vetter
@ 2019-03-26 14:59   ` Noralf Trønnes
  0 siblings, 0 replies; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 14:59 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Alexander Kapshuk, Bartlomiej Zolnierkiewicz, Greg Kroah-Hartman,
	Intel Graphics Development, Hans de Goede, Daniel Vetter



Den 26.03.2019 14.20, skrev Daniel Vetter:
> This should not result in any changes.
> 
> v2: Rebase over vbox changes - vbox gained it's own line to fill
> fix.id.
> 
> v3: Rebase
> 
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (v2)
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Alexander Kapshuk <alexander.kapshuk@gmail.com>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 21/21] drm/fb-helper: Unexport fill_{var, info}
  2019-03-26 13:20 ` [PATCH 21/21] drm/fb-helper: Unexport fill_{var,info} Daniel Vetter
  2019-03-26 14:34   ` Alex Deucher
@ 2019-03-26 15:01   ` Noralf Trønnes
  2019-03-27  9:13     ` Daniel Vetter
  1 sibling, 1 reply; 49+ messages in thread
From: Noralf Trønnes @ 2019-03-26 15:01 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development; +Cc: Daniel Vetter, Intel Graphics Development



Den 26.03.2019 14.20, skrev Daniel Vetter:
> Not used by drivers anymore.
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 21/21] drm/fb-helper: Unexport fill_{var, info}
  2019-03-26 15:01   ` [PATCH 21/21] drm/fb-helper: Unexport fill_{var, info} Noralf Trønnes
@ 2019-03-27  9:13     ` Daniel Vetter
  0 siblings, 0 replies; 49+ messages in thread
From: Daniel Vetter @ 2019-03-27  9:13 UTC (permalink / raw)
  To: Noralf Trønnes
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
	Daniel Vetter

On Tue, Mar 26, 2019 at 04:01:29PM +0100, Noralf Trønnes wrote:
> 
> 
> Den 26.03.2019 14.20, skrev Daniel Vetter:
> > Not used by drivers anymore.
> > 
> > v2: Rebase
> > 
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> 
> Reviewed-by: Noralf Trønnes <noralf@tronnes.org>

Thanks for your review, I pulled in all your suggestions and applied the
entire series.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 11/21] drm/i915: Use drm_fb_helper_fill_info
  2019-03-26 13:19 ` [PATCH 11/21] drm/i915: " Daniel Vetter
  2019-03-26 14:34   ` Noralf Trønnes
@ 2019-03-27 11:10   ` Joonas Lahtinen
  2019-03-27 11:15     ` Daniel Vetter
  1 sibling, 1 reply; 49+ messages in thread
From: Joonas Lahtinen @ 2019-03-27 11:10 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Rodrigo Vivi, Daniel Vetter

Quoting Daniel Vetter (2019-03-26 15:19:58)
> This changes the fb name from "inteldrmfb" to "i915drmfb".

I'm fairly sure I already commented that is is Acked-by in the
case the other drivers are doing the same consolidation.

Just have to make sure we don't break any IGTs that might depend
on the module name.

Regards, Joonas
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 11/21] drm/i915: Use drm_fb_helper_fill_info
  2019-03-27 11:10   ` Joonas Lahtinen
@ 2019-03-27 11:15     ` Daniel Vetter
  0 siblings, 0 replies; 49+ messages in thread
From: Daniel Vetter @ 2019-03-27 11:15 UTC (permalink / raw)
  To: Joonas Lahtinen
  Cc: Daniel Vetter, Intel Graphics Development, DRI Development

On Wed, Mar 27, 2019 at 12:10 PM Joonas Lahtinen
<joonas.lahtinen@linux.intel.com> wrote:
>
> Quoting Daniel Vetter (2019-03-26 15:19:58)
> > This changes the fb name from "inteldrmfb" to "i915drmfb".
>
> I'm fairly sure I already commented that is is Acked-by in the
> case the other drivers are doing the same consolidation.
>
> Just have to make sure we don't break any IGTs that might depend
> on the module name.

Must have missed it, but either way CI is happy. There's also not a
big chance we do have an igt which looks at this, since this is only
the legacy fbdev driver name, not the native drm driver name. I'm not
even sure we have a single testcase for that.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/21] drm/exynos: Use drm_fb_helper_fill_info
  2019-03-26 13:19 ` [PATCH 08/21] drm/exynos: " Daniel Vetter
  2019-03-26 14:27   ` Noralf Trønnes
@ 2019-03-27 22:57   ` Inki Dae
  1 sibling, 0 replies; 49+ messages in thread
From: Inki Dae @ 2019-03-27 22:57 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: linux-samsung-soc, Intel Graphics Development, Seung-Woo Kim,
	Krzysztof Kozlowski, Kyungmin Park, Kukjin Kim, Daniel Vetter,
	linux-arm-kernel



19. 3. 26. 오후 10:19에 Daniel Vetter 이(가) 쓴 글:
> This will give the exynos fbdev a name!
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Acked-by: Inki Dae <inki.dae@samsung.com>

Thanks,
Inki Dae

> Cc: Inki Dae <inki.dae@samsung.com>
> Cc: Joonyoung Shim <jy0922.shim@samsung.com>
> Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> ---
>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> index c30dd88cdb25..581a6a207995 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> @@ -87,11 +87,9 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
>  		return PTR_ERR(fbi);
>  	}
>  
> -	fbi->par = helper;
>  	fbi->fbops = &exynos_drm_fb_ops;
>  
> -	drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth);
> -	drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);
> +	drm_fb_helper_fill_info(fbi, helper, sizes);
>  
>  	nr_pages = exynos_gem->size >> PAGE_SHIFT;
>  
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2019-03-27 22:57 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-26 13:19 [PATCH 01/21] drm/fb-helper: Add fill_info() functions Daniel Vetter
2019-03-26 13:19 ` [PATCH 02/21] drm/fb-helper: set fbi->fix.id in fill_info() Daniel Vetter
2019-03-26 13:56   ` Noralf Trønnes
2019-03-26 13:19 ` [PATCH 03/21] drm/fb_helper: set info->par " Daniel Vetter
2019-03-26 13:57   ` Noralf Trønnes
2019-03-26 13:19 ` [PATCH 04/21] drm/amdgpu: Use drm_fb_helper_fill_info Daniel Vetter
2019-03-26 14:04   ` Noralf Trønnes
2019-03-26 13:19 ` [PATCH 05/21] drm/armada: " Daniel Vetter
2019-03-26 14:06   ` Noralf Trønnes
2019-03-26 13:19 ` [PATCH 06/21] drm/ast: " Daniel Vetter
2019-03-26 14:21   ` Noralf Trønnes
2019-03-26 13:19 ` [PATCH 07/21] drm/cirrus: " Daniel Vetter
2019-03-26 14:24   ` Noralf Trønnes
2019-03-26 13:19 ` [PATCH 08/21] drm/exynos: " Daniel Vetter
2019-03-26 14:27   ` Noralf Trønnes
2019-03-27 22:57   ` Inki Dae
2019-03-26 13:19 ` [PATCH 09/21] drm/gma500: " Daniel Vetter
2019-03-26 14:31   ` Noralf Trønnes
2019-03-26 13:19 ` [PATCH 10/21] drm/hibmc: " Daniel Vetter
2019-03-26 14:32   ` Noralf Trønnes
2019-03-26 13:19 ` [PATCH 11/21] drm/i915: " Daniel Vetter
2019-03-26 14:34   ` Noralf Trønnes
2019-03-27 11:10   ` Joonas Lahtinen
2019-03-27 11:15     ` Daniel Vetter
2019-03-26 13:19 ` [PATCH 12/21] drm/mga200g: " Daniel Vetter
2019-03-26 14:41   ` Noralf Trønnes
2019-03-26 13:20 ` [PATCH 14/21] drm/nouveau: " Daniel Vetter
2019-03-26 14:47   ` Noralf Trønnes
2019-03-26 13:20 ` [PATCH 15/21] drm/omap: " Daniel Vetter
2019-03-26 14:49   ` Noralf Trønnes
     [not found] ` <20190326132008.11781-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2019-03-26 13:20   ` [PATCH 13/21] drm/bochs: " Daniel Vetter
2019-03-26 14:42     ` Noralf Trønnes
2019-03-26 14:45       ` Noralf Trønnes
2019-03-26 13:20   ` [PATCH 16/21] drm/radeon: " Daniel Vetter
2019-03-26 14:51     ` Noralf Trønnes
2019-03-26 13:20 ` [PATCH 17/21] drm/rockchip: " Daniel Vetter
2019-03-26 14:52   ` Noralf Trønnes
2019-03-26 13:20 ` [PATCH 18/21] drm/tegra: " Daniel Vetter
2019-03-26 14:53   ` Noralf Trønnes
2019-03-26 14:55   ` Thierry Reding
2019-03-26 13:20 ` [PATCH 19/21] drm/udl: " Daniel Vetter
2019-03-26 14:58   ` Noralf Trønnes
2019-03-26 13:20 ` [PATCH 20/21] drm/vboxvideo: " Daniel Vetter
2019-03-26 14:59   ` Noralf Trønnes
2019-03-26 13:20 ` [PATCH 21/21] drm/fb-helper: Unexport fill_{var,info} Daniel Vetter
2019-03-26 14:34   ` Alex Deucher
2019-03-26 15:01   ` [PATCH 21/21] drm/fb-helper: Unexport fill_{var, info} Noralf Trønnes
2019-03-27  9:13     ` Daniel Vetter
2019-03-26 13:50 ` [PATCH 01/21] drm/fb-helper: Add fill_info() functions Noralf Trønnes

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).