Commit b364f3cd authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Andi Shyti

drm/i915: Simplify expression &to_i915(dev)->drm

to_i915 is defined as

	container_of(dev, struct drm_i915_private, drm);

So for a struct drm_device *dev, to_i915(dev)->drm is just dev. Simplify
accordingly.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230721212133.271118-1-u.kleine-koenig@pengutronix.de
parent e91a777a
...@@ -819,8 +819,7 @@ static ssize_t i915_displayport_test_active_write(struct file *file, ...@@ -819,8 +819,7 @@ static ssize_t i915_displayport_test_active_write(struct file *file,
if (IS_ERR(input_buffer)) if (IS_ERR(input_buffer))
return PTR_ERR(input_buffer); return PTR_ERR(input_buffer);
drm_dbg(&to_i915(dev)->drm, drm_dbg(dev, "Copied %d bytes from user\n", (unsigned int)len);
"Copied %d bytes from user\n", (unsigned int)len);
drm_connector_list_iter_begin(dev, &conn_iter); drm_connector_list_iter_begin(dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) { drm_for_each_connector_iter(connector, &conn_iter) {
...@@ -839,8 +838,7 @@ static ssize_t i915_displayport_test_active_write(struct file *file, ...@@ -839,8 +838,7 @@ static ssize_t i915_displayport_test_active_write(struct file *file,
status = kstrtoint(input_buffer, 10, &val); status = kstrtoint(input_buffer, 10, &val);
if (status < 0) if (status < 0)
break; break;
drm_dbg(&to_i915(dev)->drm, drm_dbg(dev, "Got %d for test active\n", val);
"Got %d for test active\n", val);
/* To prevent erroneous activation of the compliance /* To prevent erroneous activation of the compliance
* testing code, only accept an actual value of 1 here * testing code, only accept an actual value of 1 here
*/ */
......
...@@ -818,7 +818,7 @@ i915_gem_object_save_bit_17_swizzle(struct drm_i915_gem_object *obj, ...@@ -818,7 +818,7 @@ i915_gem_object_save_bit_17_swizzle(struct drm_i915_gem_object *obj,
if (obj->bit_17 == NULL) { if (obj->bit_17 == NULL) {
obj->bit_17 = bitmap_zalloc(page_count, GFP_KERNEL); obj->bit_17 = bitmap_zalloc(page_count, GFP_KERNEL);
if (obj->bit_17 == NULL) { if (obj->bit_17 == NULL) {
drm_err(&to_i915(obj->base.dev)->drm, drm_err(obj->base.dev,
"Failed to allocate memory for bit 17 record\n"); "Failed to allocate memory for bit 17 record\n");
return; return;
} }
......
...@@ -74,14 +74,14 @@ static void vma_print_allocator(struct i915_vma *vma, const char *reason) ...@@ -74,14 +74,14 @@ static void vma_print_allocator(struct i915_vma *vma, const char *reason)
char buf[512]; char buf[512];
if (!vma->node.stack) { if (!vma->node.stack) {
drm_dbg(&to_i915(vma->obj->base.dev)->drm, drm_dbg(vma->obj->base.dev,
"vma.node [%08llx + %08llx] %s: unknown owner\n", "vma.node [%08llx + %08llx] %s: unknown owner\n",
vma->node.start, vma->node.size, reason); vma->node.start, vma->node.size, reason);
return; return;
} }
stack_depot_snprint(vma->node.stack, buf, sizeof(buf), 0); stack_depot_snprint(vma->node.stack, buf, sizeof(buf), 0);
drm_dbg(&to_i915(vma->obj->base.dev)->drm, drm_dbg(vma->obj->base.dev,
"vma.node [%08llx + %08llx] %s: inserted at %s\n", "vma.node [%08llx + %08llx] %s: inserted at %s\n",
vma->node.start, vma->node.size, reason, buf); vma->node.start, vma->node.size, reason, buf);
} }
...@@ -805,7 +805,7 @@ i915_vma_insert(struct i915_vma *vma, struct i915_gem_ww_ctx *ww, ...@@ -805,7 +805,7 @@ i915_vma_insert(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
* attempt to find space. * attempt to find space.
*/ */
if (size > end - 2 * guard) { if (size > end - 2 * guard) {
drm_dbg(&to_i915(vma->obj->base.dev)->drm, drm_dbg(vma->obj->base.dev,
"Attempting to bind an object larger than the aperture: request=%llu > %s aperture=%llu\n", "Attempting to bind an object larger than the aperture: request=%llu > %s aperture=%llu\n",
size, flags & PIN_MAPPABLE ? "mappable" : "total", end); size, flags & PIN_MAPPABLE ? "mappable" : "total", end);
return -ENOSPC; return -ENOSPC;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment