[openchrome-devel] drm-openchrome: Branch 'drm-next-5.3' - 2 commits - drivers/gpu/drm
Kevin Brace
kevinbrace at kemper.freedesktop.org
Wed Jun 5 03:00:38 UTC 2019
drivers/gpu/drm/openchrome/openchrome_crtc.c | 36 ++++++++++++++++++++++-----
drivers/gpu/drm/openchrome/openchrome_drv.h | 2 -
2 files changed, 31 insertions(+), 7 deletions(-)
New commits:
commit 45ea465fd9d56710758138a6b4c86c1f2592122b
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Tue Jun 4 21:59:01 2019 -0500
drm/openchrome: Version bumped to 3.1.9
Eliminated all known compilation warnings.
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 dd0107ff6bea..f4b8f70f0f28 100644
--- a/drivers/gpu/drm/openchrome/openchrome_drv.h
+++ b/drivers/gpu/drm/openchrome/openchrome_drv.h
@@ -51,7 +51,7 @@
#define DRIVER_MAJOR 3
#define DRIVER_MINOR 1
-#define DRIVER_PATCHLEVEL 8
+#define DRIVER_PATCHLEVEL 9
#define DRIVER_NAME "openchrome"
#define DRIVER_DESC "OpenChrome DRM for VIA Technologies Chrome IGP"
#define DRIVER_DATE "20190604"
commit 35a0649325effe29209dee5f70cb0bf489cb6417
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Tue Jun 4 21:45:17 2019 -0500
drm/openchrome: Return an error code after readying display FIFO
This suppresses compilation warning messages.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/openchrome/openchrome_crtc.c b/drivers/gpu/drm/openchrome/openchrome_crtc.c
index a25081273de5..9ddf00062878 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -619,7 +619,7 @@ static void via_load_vpit_regs(
vga_w(VGABASE, VGA_ATT_W, BIT(5));
}
-static void via_iga1_display_fifo_regs(
+static int via_iga1_display_fifo_regs(
struct drm_device *dev,
struct openchrome_drm_private *dev_private,
struct via_crtc *iga,
@@ -632,6 +632,7 @@ static void via_iga1_display_fifo_regs(
unsigned int fifo_high_threshold;
unsigned int display_queue_expire_num;
bool enable_extended_display_fifo = false;
+ int ret = 0;
DRM_DEBUG_KMS("Entered %s.\n", __func__);
@@ -953,9 +954,14 @@ static void via_iga1_display_fifo_regs(
display_queue_expire_num = VX900_IGA1_DISPLAY_QUEUE_EXPIRE_NUM;
break;
default:
+ ret = -EINVAL;
break;
}
+ if (ret) {
+ goto exit;
+ }
+
if ((dev->pdev->device == PCI_DEVICE_ID_VIA_CLE266) ||
(dev->pdev->device == PCI_DEVICE_ID_VIA_KM400) ||
(dev->pdev->device == PCI_DEVICE_ID_VIA_K8M800) ||
@@ -1010,10 +1016,12 @@ static void via_iga1_display_fifo_regs(
reg_value = display_queue_expire_num / 4;
load_value_to_registers(VGABASE, &iga->display_queue, reg_value);
+exit:
DRM_DEBUG_KMS("Exiting %s.\n", __func__);
+ return ret;
}
-static void via_iga2_display_fifo_regs(
+static int via_iga2_display_fifo_regs(
struct drm_device *dev,
struct openchrome_drm_private *dev_private,
struct via_crtc *iga,
@@ -1026,6 +1034,7 @@ static void via_iga2_display_fifo_regs(
unsigned int fifo_high_threshold;
unsigned int display_queue_expire_num;
bool enable_extended_display_fifo = false;
+ int ret = 0;
DRM_DEBUG_KMS("Entered %s.\n", __func__);
@@ -1277,9 +1286,14 @@ static void via_iga2_display_fifo_regs(
display_queue_expire_num = VX900_IGA2_DISPLAY_QUEUE_EXPIRE_NUM;
break;
default:
+ ret = -EINVAL;
break;
}
+ if (ret) {
+ goto exit;
+ }
+
if ((dev->pdev->device == PCI_DEVICE_ID_VIA_CLE266) ||
(dev->pdev->device == PCI_DEVICE_ID_VIA_KM400)) {
if (enable_extended_display_fifo) {
@@ -1318,7 +1332,9 @@ static void via_iga2_display_fifo_regs(
load_value_to_registers(VGABASE, &iga->display_queue, reg_value);
}
+exit:
DRM_DEBUG_KMS("Exiting %s.\n", __func__);
+ return ret;
}
/* Load CRTC Pixel Timing registers */
@@ -2044,8 +2060,12 @@ via_iga1_crtc_mode_set(struct drm_crtc *crtc,
via_iga1_set_hsync_shift(VGABASE, 0x05);
/* Load display FIFO. */
- via_iga1_display_fifo_regs(dev, dev_private, iga,
- adjusted_mode, crtc->primary->fb);
+ ret = via_iga1_display_fifo_regs(dev, dev_private, iga,
+ adjusted_mode,
+ crtc->primary->fb);
+ if (ret) {
+ goto exit;
+ }
/* Set PLL */
if (adjusted_mode->clock) {
@@ -2378,8 +2398,12 @@ via_iga2_crtc_mode_set(struct drm_crtc *crtc,
adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE);
/* Load display FIFO. */
- via_iga2_display_fifo_regs(dev, dev_private, iga,
- adjusted_mode, crtc->primary->fb);
+ ret = via_iga2_display_fifo_regs(dev, dev_private, iga,
+ adjusted_mode,
+ crtc->primary->fb);
+ if (ret) {
+ goto exit;
+ }
/* Set PLL */
if (adjusted_mode->clock) {
More information about the openchrome-devel
mailing list