[openchrome-devel] drm-openchrome: Branch 'drm-next-5.14' - 10 commits - drivers/gpu/drm
Kevin Brace
kevinbrace at kemper.freedesktop.org
Thu Dec 30 23:27:19 UTC 2021
drivers/gpu/drm/openchrome/openchrome_crtc.c | 43 ++++++++++++++++++-------
drivers/gpu/drm/openchrome/openchrome_cursor.c | 23 ++++++++-----
drivers/gpu/drm/openchrome/openchrome_drv.c | 8 ++--
drivers/gpu/drm/openchrome/openchrome_drv.h | 5 +-
drivers/gpu/drm/openchrome/openchrome_fb.c | 2 -
drivers/gpu/drm/openchrome/openchrome_fp.c | 8 ----
drivers/gpu/drm/openchrome/openchrome_ioctl.c | 8 ++--
drivers/gpu/drm/openchrome/openchrome_object.c | 18 ++++++----
8 files changed, 70 insertions(+), 45 deletions(-)
New commits:
commit 1f2d71cc3367aa721936b40bb7182ab9756a1d09
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Dec 27 16:37:24 2021 -0600
drm/openchrome: Version bumped to 3.4.10
This version fixes FP (Flat Panel) support code regression when the
mode setting code was converted to support atomic mode setting.
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 beac0c1fbd77..d501dfb8e1e3 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 4
-#define DRIVER_PATCHLEVEL 9
+#define DRIVER_PATCHLEVEL 10
#define DRIVER_NAME "openchrome"
#define DRIVER_DESC "OpenChrome DRM for VIA Technologies Chrome IGP"
-#define DRIVER_DATE "20210521"
+#define DRIVER_DATE "20211227"
#define DRIVER_AUTHOR "OpenChrome Project"
commit 0d6ae650b0feb2fcfa19788e1e9b572026a8486d
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Dec 27 16:37:07 2021 -0600
drm/openchrome: Fix for sporadic cursor disable code crash
What happens is that openchrome_cursor_atomic_disable() is occassionally
handed a null pointer for its crtc parameter. Just check for a null
pointer before disabling the display of the cursor.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/openchrome/openchrome_cursor.c b/drivers/gpu/drm/openchrome/openchrome_cursor.c
index b9a685488c97..dc662fa02fb1 100644
--- a/drivers/gpu/drm/openchrome/openchrome_cursor.c
+++ b/drivers/gpu/drm/openchrome/openchrome_cursor.c
@@ -49,9 +49,9 @@
#include "openchrome_drv.h"
-static void openchrome_hide_cursor(struct drm_device *dev,
- struct drm_crtc *crtc)
+static void openchrome_hide_cursor(struct drm_crtc *crtc)
{
+ struct drm_device *dev = crtc->dev;
struct pci_dev *pdev = to_pci_dev(dev->dev);
struct via_crtc *iga = container_of(crtc,
struct via_crtc, base);
@@ -396,12 +396,13 @@ void openchrome_cursor_atomic_disable(struct drm_plane *plane,
{
struct drm_plane_state *new_state =
drm_atomic_get_new_plane_state(state, plane);
- struct drm_device *dev = plane->dev;
struct drm_crtc *crtc = new_state->crtc;
DRM_DEBUG_KMS("Entered %s.\n", __func__);
- openchrome_hide_cursor(dev, crtc);
+ if (crtc) {
+ openchrome_hide_cursor(crtc);
+ }
DRM_DEBUG_KMS("Exiting %s.\n", __func__);
}
commit 3bef18990ed2769442be8e501262330f83d9c0a6
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Dec 27 16:36:53 2021 -0600
drm/openchrome: Dual head fix for atomic mode setting
Simultaneous display needs to be disabled for dual head (IGA1 and IGA2)
mode to function properly.
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 509828254bf3..b65e72d0414c 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -79,6 +79,17 @@ static void via_iga_common_init(void __iomem *regs)
* 1: Enable */
svga_wseq_mask(regs, 0x15, BIT(5) | BIT(1), BIT(5) | BIT(1));
+ /*
+ * Disable simultaneous display.
+ * Turning this on causes IGA1 to have a display issue.
+ */
+ /*
+ * 3X5.6B[3] - Simultaneous Display Enable
+ * 0: Disable
+ * 1: Enable
+ */
+ svga_wcrt_mask(regs, 0x6B, 0x00, BIT(3));
+
DRM_DEBUG_KMS("Exiting %s.\n", __func__);
}
commit dbf5833e08f3d63d0a3b23b4a3011766b1fc6514
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Dec 27 16:36:29 2021 -0600
drm/openchrome: Rearrange openchrome_mode_set_nofb() declarations
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 a14205a3b41c..509828254bf3 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -1578,15 +1578,15 @@ via_set_iga2_downscale_source_timing(struct drm_crtc *crtc,
void openchrome_mode_set_nofb(struct drm_crtc *crtc)
{
- struct via_crtc *iga = container_of(crtc,
- struct via_crtc, base);
+ struct drm_device *dev = crtc->dev;
+ struct pci_dev *pdev = to_pci_dev(dev->dev);
struct drm_display_mode *mode = &crtc->state->mode;
struct drm_display_mode *adjusted_mode =
&crtc->state->adjusted_mode;
+ struct via_crtc *iga = container_of(crtc,
+ struct via_crtc, base);
struct openchrome_drm_private *dev_private =
crtc->dev->dev_private;
- struct drm_device *dev = crtc->dev;
- struct pci_dev *pdev = to_pci_dev(dev->dev);
u8 reg_value = 0;
int ret;
commit cc11737b7e883bb9b07bd56eb4bf438dec0ee870
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Dec 27 16:36:17 2021 -0600
drm/openchrome: Use mode{} from crtc->state
This is to make it consistent with adjusted_mode{}. Furthermore,
include/drm/drm_crtc.h warns atomic mode setting code to not
reference mode{} inside crtc{}.
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 d816caccffbd..a14205a3b41c 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -1580,7 +1580,7 @@ void openchrome_mode_set_nofb(struct drm_crtc *crtc)
{
struct via_crtc *iga = container_of(crtc,
struct via_crtc, base);
- struct drm_display_mode *mode = &crtc->mode;
+ struct drm_display_mode *mode = &crtc->state->mode;
struct drm_display_mode *adjusted_mode =
&crtc->state->adjusted_mode;
struct openchrome_drm_private *dev_private =
commit 4bd6987594776f449d763319b88bc544e47e8741
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Dec 27 16:36:08 2021 -0600
drm/openchrome: Remove via_fp_mode_valid() from a member struct
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/openchrome/openchrome_fp.c b/drivers/gpu/drm/openchrome/openchrome_fp.c
index d1d8656deca5..7f86133b05d6 100644
--- a/drivers/gpu/drm/openchrome/openchrome_fp.c
+++ b/drivers/gpu/drm/openchrome/openchrome_fp.c
@@ -1083,7 +1083,6 @@ via_fp_mode_valid(struct drm_connector *connector,
struct drm_connector_helper_funcs via_fp_connector_helper_funcs = {
.get_modes = via_fp_get_modes,
- .mode_valid = via_fp_mode_valid,
};
/*
commit 986e6737e1e1e840a493122258cd3a66a0dabea6
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Dec 27 16:35:58 2021 -0600
drm/openchrome: Remove via_fp_set_property() from a member struct
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/openchrome/openchrome_fp.c b/drivers/gpu/drm/openchrome/openchrome_fp.c
index c36e4c677ab1..d1d8656deca5 100644
--- a/drivers/gpu/drm/openchrome/openchrome_fp.c
+++ b/drivers/gpu/drm/openchrome/openchrome_fp.c
@@ -925,7 +925,6 @@ struct drm_connector_funcs via_fp_connector_funcs = {
.dpms = drm_helper_connector_dpms,
.detect = via_fp_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
- .set_property = via_fp_set_property,
.destroy = via_connector_destroy,
.reset = drm_atomic_helper_connector_reset,
.atomic_duplicate_state =
commit 8e76fd840d6f96fb707efb28b4f6e504d35e5954
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Dec 27 16:35:47 2021 -0600
drm/openchrome: Remove via_lvds_mode_fixup() from a member struct
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/openchrome/openchrome_fp.c b/drivers/gpu/drm/openchrome/openchrome_fp.c
index 345ed837fbe9..c36e4c677ab1 100644
--- a/drivers/gpu/drm/openchrome/openchrome_fp.c
+++ b/drivers/gpu/drm/openchrome/openchrome_fp.c
@@ -793,7 +793,6 @@ static void via_fp_disable(struct drm_encoder *encoder)
const struct drm_encoder_helper_funcs via_lvds_helper_funcs = {
.dpms = via_fp_dpms,
- .mode_fixup = via_lvds_mode_fixup,
.prepare = via_fp_prepare,
.commit = via_fp_commit,
.mode_set = via_fp_mode_set,
commit 5f6e2a8415212af390c4520e0d2b18680869e838
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Dec 27 16:35:37 2021 -0600
drm/openchrome: Stop attaching scaling mode property
This is not supported by atomic mode setting. It is meant for legacy
KMS. It triggers a bug check.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/drivers/gpu/drm/openchrome/openchrome_fp.c b/drivers/gpu/drm/openchrome/openchrome_fp.c
index 5e8be68e5138..345ed837fbe9 100644
--- a/drivers/gpu/drm/openchrome/openchrome_fp.c
+++ b/drivers/gpu/drm/openchrome/openchrome_fp.c
@@ -1376,11 +1376,6 @@ void via_fp_init(struct drm_device *dev)
con->base.doublescan_allowed = false;
con->base.interlace_allowed = false;
- drm_mode_create_scaling_mode_property(dev);
- drm_object_attach_property(&con->base.base,
- dev->mode_config.scaling_mode_property,
- DRM_MODE_SCALE_CENTER);
-
/* Now setup the encoder */
drm_encoder_init(dev, &enc->base, &via_lvds_enc_funcs,
DRM_MODE_ENCODER_LVDS, NULL);
commit 278dca9fd29ff794b0a6691193adec3c065643c1
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Dec 27 16:35:16 2021 -0600
drm/openchrome: use embedded gem object
This commit should have been made 2 years ago, but it was missed.
Based on commit ce77038 (drm/radeon: use embedded gem object).
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 a2efbe6239c7..d816caccffbd 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -1903,9 +1903,9 @@ void openchrome_primary_atomic_update(struct drm_plane *plane,
struct via_crtc *iga = container_of(crtc, struct via_crtc, base);
struct openchrome_drm_private *dev_private =
crtc->dev->dev_private;
- struct drm_gem_object *gem = fb->obj[0];
- struct openchrome_bo *bo = container_of(gem,
- struct openchrome_bo, gem);
+ struct drm_gem_object *gem;
+ struct ttm_buffer_object *ttm_bo;
+ struct openchrome_bo *bo;
DRM_DEBUG_KMS("Entered %s.\n", __func__);
@@ -1917,6 +1917,10 @@ void openchrome_primary_atomic_update(struct drm_plane *plane,
goto exit;
}
+ gem = fb->obj[0];
+ ttm_bo = container_of(gem, struct ttm_buffer_object, base);
+ bo = container_of(ttm_bo, struct openchrome_bo, ttm_bo);
+
if (!iga->index) {
via_iga1_set_color_depth(dev_private, fb->format->depth);
@@ -1970,8 +1974,9 @@ exit:
static int openchrome_primary_prepare_fb(struct drm_plane *plane,
struct drm_plane_state *new_state)
{
- struct openchrome_bo *bo;
struct drm_gem_object *gem;
+ struct ttm_buffer_object *ttm_bo;
+ struct openchrome_bo *bo;
int ret = 0;
DRM_DEBUG_KMS("Entered %s.\n", __func__);
@@ -1981,7 +1986,8 @@ static int openchrome_primary_prepare_fb(struct drm_plane *plane,
}
gem = new_state->fb->obj[0];
- bo = container_of(gem, struct openchrome_bo, gem);
+ ttm_bo = container_of(gem, struct ttm_buffer_object, base);
+ bo = container_of(ttm_bo, struct openchrome_bo, ttm_bo);
ret = ttm_bo_reserve(&bo->ttm_bo, true, false, NULL);
if (ret) {
@@ -1998,8 +2004,9 @@ exit:
static void openchrome_primary_cleanup_fb(struct drm_plane *plane,
struct drm_plane_state *old_state)
{
- struct openchrome_bo *bo;
struct drm_gem_object *gem;
+ struct ttm_buffer_object *ttm_bo;
+ struct openchrome_bo *bo;
int ret;
DRM_DEBUG_KMS("Entered %s.\n", __func__);
@@ -2009,7 +2016,8 @@ static void openchrome_primary_cleanup_fb(struct drm_plane *plane,
}
gem = old_state->fb->obj[0];
- bo = container_of(gem, struct openchrome_bo, gem);
+ ttm_bo = container_of(gem, struct ttm_buffer_object, base);
+ bo = container_of(ttm_bo, struct openchrome_bo, ttm_bo);
ret = ttm_bo_reserve(&bo->ttm_bo, true, false, NULL);
if (ret) {
diff --git a/drivers/gpu/drm/openchrome/openchrome_cursor.c b/drivers/gpu/drm/openchrome/openchrome_cursor.c
index b5ec6c44b1c0..b9a685488c97 100644
--- a/drivers/gpu/drm/openchrome/openchrome_cursor.c
+++ b/drivers/gpu/drm/openchrome/openchrome_cursor.c
@@ -263,6 +263,7 @@ static int openchrome_cursor_prepare_fb(struct drm_plane *plane,
struct drm_plane_state *new_state)
{
struct drm_gem_object *gem;
+ struct ttm_buffer_object *ttm_bo;
struct openchrome_bo *bo;
int ret = 0;
@@ -273,7 +274,8 @@ static int openchrome_cursor_prepare_fb(struct drm_plane *plane,
}
gem = new_state->fb->obj[0];
- bo = container_of(gem, struct openchrome_bo, gem);
+ ttm_bo = container_of(gem, struct ttm_buffer_object, base);
+ bo = container_of(ttm_bo, struct openchrome_bo, ttm_bo);
ret = ttm_bo_reserve(&bo->ttm_bo, true, false, NULL);
if (ret) {
@@ -298,6 +300,7 @@ static void openchrome_cursor_cleanup_fb(struct drm_plane *plane,
struct drm_plane_state *old_state)
{
struct drm_gem_object *gem;
+ struct ttm_buffer_object *ttm_bo;
struct openchrome_bo *bo;
int ret;
@@ -308,7 +311,8 @@ static void openchrome_cursor_cleanup_fb(struct drm_plane *plane,
}
gem = old_state->fb->obj[0];
- bo = container_of(gem, struct openchrome_bo, gem);
+ ttm_bo = container_of(gem, struct ttm_buffer_object, base);
+ bo = container_of(ttm_bo, struct openchrome_bo, ttm_bo);
ttm_bo_kunmap(&bo->kmap);
ret = ttm_bo_reserve(&bo->ttm_bo, true, false, NULL);
@@ -366,14 +370,16 @@ static void openchrome_cursor_atomic_update(struct drm_plane *plane,
struct drm_plane_state *old_state =
drm_atomic_get_old_plane_state(state, plane);
struct drm_crtc *crtc = new_state->crtc;
- struct openchrome_bo *bo;
struct drm_gem_object *gem;
+ struct ttm_buffer_object *ttm_bo;
+ struct openchrome_bo *bo;
DRM_DEBUG_KMS("Entered %s.\n", __func__);
if (new_state->fb != old_state->fb) {
gem = new_state->fb->obj[0];
- bo = container_of(gem, struct openchrome_bo, gem);
+ ttm_bo = container_of(gem, struct ttm_buffer_object, base);
+ bo = container_of(ttm_bo, struct openchrome_bo, ttm_bo);
openchrome_cursor_address(crtc, bo);
}
diff --git a/drivers/gpu/drm/openchrome/openchrome_drv.c b/drivers/gpu/drm/openchrome/openchrome_drv.c
index 9b2c568abf2a..adf817c5729c 100644
--- a/drivers/gpu/drm/openchrome/openchrome_drv.c
+++ b/drivers/gpu/drm/openchrome/openchrome_drv.c
@@ -108,8 +108,8 @@ static int openchrome_driver_dumb_create(
goto exit;
}
- ret = drm_gem_handle_create(file_priv, &bo->gem, &handle);
- drm_gem_object_put(&bo->gem);
+ ret = drm_gem_handle_create(file_priv, &bo->ttm_bo.base, &handle);
+ drm_gem_object_put(&bo->ttm_bo.base);
if (ret) {
goto exit;
}
@@ -129,6 +129,7 @@ static int openchrome_driver_dumb_map_offset(
uint64_t *offset)
{
struct drm_gem_object *gem;
+ struct ttm_buffer_object *ttm_bo;
struct openchrome_bo *bo;
int ret = 0;
@@ -140,7 +141,8 @@ static int openchrome_driver_dumb_map_offset(
goto exit;
}
- bo = container_of(gem, struct openchrome_bo, gem);
+ ttm_bo = container_of(gem, struct ttm_buffer_object, base);
+ bo = container_of(ttm_bo, struct openchrome_bo, ttm_bo);
*offset = drm_vma_node_offset_addr(&bo->ttm_bo.base.vma_node);
drm_gem_object_put(gem);
diff --git a/drivers/gpu/drm/openchrome/openchrome_drv.h b/drivers/gpu/drm/openchrome/openchrome_drv.h
index e2bd242a351c..beac0c1fbd77 100644
--- a/drivers/gpu/drm/openchrome/openchrome_drv.h
+++ b/drivers/gpu/drm/openchrome/openchrome_drv.h
@@ -195,7 +195,6 @@ struct openchrome_bo {
struct ttm_bo_kmap_obj kmap;
struct ttm_placement placement;
struct ttm_place placements[OPENCHROME_TTM_PL_NUM];
- struct drm_gem_object gem;
};
struct openchrome_framebuffer {
diff --git a/drivers/gpu/drm/openchrome/openchrome_fb.c b/drivers/gpu/drm/openchrome/openchrome_fb.c
index 5ce7b99e2275..b1bba29d406c 100644
--- a/drivers/gpu/drm/openchrome/openchrome_fb.c
+++ b/drivers/gpu/drm/openchrome/openchrome_fb.c
@@ -188,7 +188,7 @@ openchrome_fb_probe(struct drm_fb_helper *helper,
goto exit;
}
- gem = &openchrome_fb->bo->gem;
+ gem = &openchrome_fb->bo->ttm_bo.base;
ret = openchrome_framebuffer_init(dev, gem, &mode_cmd, &fb);
if (ret) {
goto free_bo;
diff --git a/drivers/gpu/drm/openchrome/openchrome_ioctl.c b/drivers/gpu/drm/openchrome/openchrome_ioctl.c
index dae01d3b30e3..22109188c869 100644
--- a/drivers/gpu/drm/openchrome/openchrome_ioctl.c
+++ b/drivers/gpu/drm/openchrome/openchrome_ioctl.c
@@ -57,9 +57,9 @@ static int openchrome_gem_create_ioctl(struct drm_device *dev,
goto exit;
}
- ret = drm_gem_handle_create(file_priv, &bo->gem,
+ ret = drm_gem_handle_create(file_priv, &bo->ttm_bo.base,
&handle);
- drm_gem_object_put(&bo->gem);
+ drm_gem_object_put(&bo->ttm_bo.base);
if (ret) {
openchrome_bo_destroy(bo, false);
goto exit;
@@ -80,6 +80,7 @@ static int openchrome_gem_map_ioctl(struct drm_device *dev,
{
struct drm_openchrome_gem_map *args = data;
struct drm_gem_object *gem;
+ struct ttm_buffer_object *ttm_bo;
struct openchrome_bo *bo;
int ret = 0;
@@ -91,7 +92,8 @@ static int openchrome_gem_map_ioctl(struct drm_device *dev,
goto exit;
}
- bo = container_of(gem, struct openchrome_bo, gem);
+ ttm_bo = container_of(gem, struct ttm_buffer_object, base);
+ bo = container_of(ttm_bo, struct openchrome_bo, ttm_bo);
args->map_offset = drm_vma_node_offset_addr(
&bo->ttm_bo.base.vma_node);
diff --git a/drivers/gpu/drm/openchrome/openchrome_object.c b/drivers/gpu/drm/openchrome/openchrome_object.c
index 5afc472382c8..db45e38f44e3 100644
--- a/drivers/gpu/drm/openchrome/openchrome_object.c
+++ b/drivers/gpu/drm/openchrome/openchrome_object.c
@@ -47,11 +47,14 @@
static void openchrome_gem_free(struct drm_gem_object *obj)
{
- struct openchrome_bo *bo = container_of(obj,
- struct openchrome_bo, gem);
+ struct ttm_buffer_object *ttm_bo;
+ struct openchrome_bo *bo;
DRM_DEBUG_KMS("Entered %s.\n", __func__);
+ ttm_bo = container_of(obj, struct ttm_buffer_object, base);
+ bo = container_of(ttm_bo, struct openchrome_bo, ttm_bo);
+
ttm_bo_put(&bo->ttm_bo);
DRM_DEBUG_KMS("Exiting %s.\n", __func__);
@@ -112,12 +115,13 @@ void openchrome_ttm_domain_to_placement(struct openchrome_bo *bo,
void openchrome_ttm_bo_destroy(struct ttm_buffer_object *tbo)
{
- struct openchrome_bo *bo = container_of(tbo,
- struct openchrome_bo, ttm_bo);
+ struct openchrome_bo *bo;
DRM_DEBUG_KMS("Entered %s.\n", __func__);
- drm_gem_object_release(&bo->gem);
+ bo = container_of(tbo, struct openchrome_bo, ttm_bo);
+
+ drm_gem_object_release(&bo->ttm_bo.base);
kfree(bo);
DRM_DEBUG_KMS("Exiting %s.\n", __func__);
@@ -187,13 +191,13 @@ int openchrome_bo_create(struct drm_device *dev,
*/
size = ALIGN(size, PAGE_SIZE);
- ret = drm_gem_object_init(dev, &bo->gem, size);
+ ret = drm_gem_object_init(dev, &bo->ttm_bo.base, size);
if (ret) {
DRM_ERROR("Cannot initialize a GEM object.\n");
goto error;
}
- bo->gem.funcs = &openchrome_gem_object_funcs;
+ bo->ttm_bo.base.funcs = &openchrome_gem_object_funcs;
openchrome_ttm_domain_to_placement(bo, ttm_domain);
ret = ttm_bo_init(&dev_private->bdev,
More information about the openchrome-devel
mailing list