[openchrome-devel] drm-openchrome: Branch 'drm-next-5.10' - 4 commits - drivers/gpu/drm
Kevin Brace
kevinbrace at kemper.freedesktop.org
Thu Sep 17 02:16:32 UTC 2020
drivers/gpu/drm/openchrome/openchrome_display.c | 12 +++-
drivers/gpu/drm/openchrome/openchrome_drv.h | 12 ++--
drivers/gpu/drm/openchrome/openchrome_fb.c | 60 ++++++++++++------------
drivers/gpu/drm/openchrome/openchrome_init.c | 2
drivers/gpu/drm/openchrome/openchrome_pm.c | 4 -
5 files changed, 48 insertions(+), 42 deletions(-)
New commits:
commit d98037e22e7f38abcc84a5edc43af779d636134e
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Sep 16 19:13:14 2020 -0700
drm/openchrome: Version bumped to 3.3.8
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/openchrome/openchrome_drv.h b/drivers/gpu/drm/openchrome/openchrome_drv.h
index 65b2a7cfd0fc..34302cd52082 100644
--- a/drivers/gpu/drm/openchrome/openchrome_drv.h
+++ b/drivers/gpu/drm/openchrome/openchrome_drv.h
@@ -61,10 +61,10 @@
#define DRIVER_MAJOR 3
#define DRIVER_MINOR 3
-#define DRIVER_PATCHLEVEL 7
+#define DRIVER_PATCHLEVEL 8
#define DRIVER_NAME "openchrome"
#define DRIVER_DESC "OpenChrome DRM for VIA Technologies Chrome IGP"
-#define DRIVER_DATE "20200914"
+#define DRIVER_DATE "20200916"
#define DRIVER_AUTHOR "OpenChrome Project"
commit 124db0c01cc301709d762771c012d72f6bd08053
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Sep 16 18:49:56 2020 -0700
drm/openchrome: Rename via_fbdev* to openchrome_fb*
Also, Rename via_framebuffer_device struct to openchrome_framebuffer.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/openchrome/openchrome_display.c b/drivers/gpu/drm/openchrome/openchrome_display.c
index 170aa22279c1..36c65df1c7d4 100644
--- a/drivers/gpu/drm/openchrome/openchrome_display.c
+++ b/drivers/gpu/drm/openchrome/openchrome_display.c
@@ -525,7 +525,7 @@ via_modeset_init(struct drm_device *dev)
}
/* Initialize the frame buffer device. */
- ret = via_fbdev_init(dev);
+ ret = openchrome_fb_init(dev);
if (ret) {
goto free_crtc;
}
@@ -544,7 +544,7 @@ exit:
void via_modeset_fini(struct drm_device *dev)
{
drm_kms_helper_poll_fini(dev);
- via_fbdev_fini(dev);
+ openchrome_fb_fini(dev);
drm_helper_force_disable_all(dev);
diff --git a/drivers/gpu/drm/openchrome/openchrome_drv.h b/drivers/gpu/drm/openchrome/openchrome_drv.h
index 1969f541d860..65b2a7cfd0fc 100644
--- a/drivers/gpu/drm/openchrome/openchrome_drv.h
+++ b/drivers/gpu/drm/openchrome/openchrome_drv.h
@@ -199,7 +199,7 @@ struct openchrome_bo {
struct drm_gem_object gem;
};
-struct via_framebuffer_device {
+struct openchrome_framebuffer {
struct drm_fb_helper helper;
struct openchrome_bo *bo;
};
@@ -223,7 +223,7 @@ struct openchrome_drm_private {
int revision;
- struct via_framebuffer_device *via_fbdev;
+ struct openchrome_framebuffer *openchrome_fb;
u8 vram_type;
unsigned long long vram_start;
unsigned int vram_size;
@@ -447,8 +447,8 @@ extern void via_set_vclock(struct drm_crtc *crtc, u32 clk);
/* framebuffers */
void openchrome_mode_config_init(
struct openchrome_drm_private *dev_private);
-extern int via_fbdev_init(struct drm_device *dev);
-extern void via_fbdev_fini(struct drm_device *dev);
+extern int openchrome_fb_init(struct drm_device *dev);
+extern void openchrome_fb_fini(struct drm_device *dev);
/* crtc */
extern void via_load_crtc_pixel_timing(struct drm_crtc *crtc,
diff --git a/drivers/gpu/drm/openchrome/openchrome_fb.c b/drivers/gpu/drm/openchrome/openchrome_fb.c
index cc6e3a918a32..d36a42d484db 100644
--- a/drivers/gpu/drm/openchrome/openchrome_fb.c
+++ b/drivers/gpu/drm/openchrome/openchrome_fb.c
@@ -156,8 +156,8 @@ openchrome_fb_probe(struct drm_fb_helper *helper,
struct drm_device *dev = helper->dev;
struct openchrome_drm_private *dev_private =
helper->dev->dev_private;
- struct via_framebuffer_device *via_fbdev = container_of(helper,
- struct via_framebuffer_device, helper);
+ struct openchrome_framebuffer *openchrome_fb = container_of(helper,
+ struct openchrome_framebuffer, helper);
struct drm_framebuffer *fb;
struct drm_gem_object *gem;
struct fb_info *info = helper->fbdev;
@@ -186,12 +186,12 @@ openchrome_fb_probe(struct drm_fb_helper *helper,
ttm_bo_type_kernel,
TTM_PL_FLAG_VRAM,
true,
- &via_fbdev->bo);
+ &openchrome_fb->bo);
if (ret) {
goto exit;
}
- gem = &via_fbdev->bo->gem;
+ gem = &openchrome_fb->bo->gem;
ret = openchrome_framebuffer_init(dev, gem, &mode_cmd, &fb);
if (ret) {
goto free_bo;
@@ -203,20 +203,20 @@ openchrome_fb_probe(struct drm_fb_helper *helper,
goto cleanup_fb;
}
- via_fbdev->helper.fb = fb;
- via_fbdev->helper.fbdev = info;
+ openchrome_fb->helper.fb = fb;
+ openchrome_fb->helper.fbdev = info;
info->fbops = &via_fb_ops;
- info->fix.smem_start = via_fbdev->bo->kmap.bo->mem.bus.base +
- via_fbdev->bo->kmap.bo->mem.bus.offset;
+ info->fix.smem_start = openchrome_fb->bo->kmap.bo->mem.bus.base +
+ openchrome_fb->bo->kmap.bo->mem.bus.offset;
info->fix.smem_len = size;
- info->screen_base = via_fbdev->bo->kmap.virtual;
+ info->screen_base = openchrome_fb->bo->kmap.virtual;
info->screen_size = size;
- info->apertures->ranges[0].size = via_fbdev->bo->kmap.bo->bdev->
- man[via_fbdev->bo->kmap.bo->mem.mem_type].size;
- info->apertures->ranges[0].base = via_fbdev->bo->kmap.bo->mem.bus.base;
+ info->apertures->ranges[0].size = openchrome_fb->bo->kmap.bo->bdev->
+ man[openchrome_fb->bo->kmap.bo->mem.mem_type].size;
+ info->apertures->ranges[0].base = openchrome_fb->bo->kmap.bo->mem.bus.base;
drm_fb_helper_fill_info(info, helper, sizes);
goto exit;
@@ -230,8 +230,8 @@ cleanup_fb:
*/
kfree(fb);
free_bo:
- openchrome_bo_destroy(via_fbdev->bo, true);
- via_fbdev->bo = NULL;
+ openchrome_bo_destroy(openchrome_fb->bo, true);
+ openchrome_fb->bo = NULL;
exit:
DRM_DEBUG_KMS("Exiting %s.\n", __func__);
return ret;
@@ -241,53 +241,53 @@ static struct drm_fb_helper_funcs openchrome_drm_fb_helper_funcs = {
.fb_probe = openchrome_fb_probe,
};
-int via_fbdev_init(struct drm_device *dev)
+int openchrome_fb_init(struct drm_device *dev)
{
struct openchrome_drm_private *dev_private = dev->dev_private;
- struct via_framebuffer_device *via_fbdev;
+ struct openchrome_framebuffer *openchrome_fb;
int bpp_sel = 32;
int ret = 0;
DRM_DEBUG_KMS("Entered %s.\n", __func__);
- via_fbdev = kzalloc(sizeof(struct via_framebuffer_device),
+ openchrome_fb = kzalloc(sizeof(struct openchrome_framebuffer),
GFP_KERNEL);
- if (!via_fbdev) {
+ if (!openchrome_fb) {
ret = -ENOMEM;
goto exit;
}
- dev_private->via_fbdev = via_fbdev;
+ dev_private->openchrome_fb = openchrome_fb;
- drm_fb_helper_prepare(dev, &via_fbdev->helper,
+ drm_fb_helper_prepare(dev, &openchrome_fb->helper,
&openchrome_drm_fb_helper_funcs);
- ret = drm_fb_helper_init(dev, &via_fbdev->helper);
+ ret = drm_fb_helper_init(dev, &openchrome_fb->helper);
if (ret) {
goto free_fbdev;
}
drm_helper_disable_unused_functions(dev);
- ret = drm_fb_helper_initial_config(&via_fbdev->helper, bpp_sel);
+ ret = drm_fb_helper_initial_config(&openchrome_fb->helper, bpp_sel);
if (ret) {
goto free_fb_helper;
}
goto exit;
free_fb_helper:
- drm_fb_helper_fini(&via_fbdev->helper);
+ drm_fb_helper_fini(&openchrome_fb->helper);
free_fbdev:
- kfree(via_fbdev);
+ kfree(openchrome_fb);
exit:
DRM_DEBUG_KMS("Exiting %s.\n", __func__);
return ret;
}
-void via_fbdev_fini(struct drm_device *dev)
+void openchrome_fb_fini(struct drm_device *dev)
{
struct openchrome_drm_private *dev_private = dev->dev_private;
struct drm_fb_helper *fb_helper = &dev_private->
- via_fbdev->helper;
+ openchrome_fb->helper;
struct fb_info *info;
DRM_DEBUG_KMS("Entered %s.\n", __func__);
@@ -304,10 +304,10 @@ void via_fbdev_fini(struct drm_device *dev)
fb_helper->fbdev = NULL;
}
- drm_fb_helper_fini(&dev_private->via_fbdev->helper);
- if (dev_private->via_fbdev) {
- kfree(dev_private->via_fbdev);
- dev_private->via_fbdev = NULL;
+ drm_fb_helper_fini(&dev_private->openchrome_fb->helper);
+ if (dev_private->openchrome_fb) {
+ kfree(dev_private->openchrome_fb);
+ dev_private->openchrome_fb = NULL;
}
exit:
DRM_DEBUG_KMS("Exiting %s.\n", __func__);
diff --git a/drivers/gpu/drm/openchrome/openchrome_pm.c b/drivers/gpu/drm/openchrome/openchrome_pm.c
index d3b79d180ce3..335779e94bab 100644
--- a/drivers/gpu/drm/openchrome/openchrome_pm.c
+++ b/drivers/gpu/drm/openchrome/openchrome_pm.c
@@ -43,7 +43,7 @@ int openchrome_dev_pm_ops_suspend(struct device *dev)
DRM_DEBUG_KMS("Entered %s.\n", __func__);
console_lock();
- drm_fb_helper_set_suspend(&dev_private->via_fbdev->helper,
+ drm_fb_helper_set_suspend(&dev_private->openchrome_fb->helper,
true);
/*
@@ -161,7 +161,7 @@ int openchrome_dev_pm_ops_resume(struct device *dev)
vga_wcrt(VGABASE, 0x3f, dev_private->saved_cr3f);
drm_helper_resume_force_mode(drm_dev);
- drm_fb_helper_set_suspend(&dev_private->via_fbdev->helper, false);
+ drm_fb_helper_set_suspend(&dev_private->openchrome_fb->helper, false);
console_unlock();
DRM_DEBUG_KMS("Exiting %s.\n", __func__);
commit 536c2eed2f23f59323ab206de152b69630d85f28
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Sep 16 09:10:49 2020 -0700
drm/openchrome: Add 'MB' to the VRAM size being detected
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/openchrome/openchrome_init.c b/drivers/gpu/drm/openchrome/openchrome_init.c
index 5b1a8ae23f80..9ac56e094150 100644
--- a/drivers/gpu/drm/openchrome/openchrome_init.c
+++ b/drivers/gpu/drm/openchrome/openchrome_init.c
@@ -1053,7 +1053,7 @@ int openchrome_vram_init(struct openchrome_drm_private *dev_private)
"Physical Address: 0x%08llx\n",
dev_private->vram_start);
DRM_INFO("VIA Technologies Chrome IGP VRAM "
- "Size: %llu\n",
+ "Size: %llu MB\n",
(unsigned long long) dev_private->vram_size >> 20);
DRM_DEBUG_KMS("Exiting %s.\n", __func__);
commit d386c2b2e2853801f35af9745ccc26d4016d4690
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Sep 16 08:37:57 2020 -0700
drm/openchrome: Check for I2C bus initialization failure
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/openchrome/openchrome_display.c b/drivers/gpu/drm/openchrome/openchrome_display.c
index 9b91fd091282..170aa22279c1 100644
--- a/drivers/gpu/drm/openchrome/openchrome_display.c
+++ b/drivers/gpu/drm/openchrome/openchrome_display.c
@@ -474,8 +474,14 @@ via_modeset_init(struct drm_device *dev)
dev_private->number_dvi = 0;
via_display_init(dev);
+
via_i2c_reg_init(dev_private);
- via_i2c_init(dev);
+ ret = via_i2c_init(dev);
+ if (ret) {
+ DRM_ERROR("Failed to initialize I2C bus!\n");
+ goto exit;
+ }
+
via_hwcursor_init(dev_private);
ret = openchrome_plane_init(dev_private, &primary, &cursor);
More information about the openchrome-devel
mailing list