summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_mocs.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-08-15 20:42:51 +0200
committerChris Wilson <chris@chris-wilson.co.uk>2018-08-16 00:25:43 +0200
commit805615dae0572087d2def1625496a72b8d6dbd25 (patch)
tree26574365fe7c0c7cf54f0ee67e301f90dd1c23fc /drivers/gpu/drm/i915/intel_mocs.c
parentdrm/i915: Only skip connector output for disable_display (diff)
downloadlinux-805615dae0572087d2def1625496a72b8d6dbd25.tar.xz
linux-805615dae0572087d2def1625496a72b8d6dbd25.zip
drm/i915: Remove useless error return from intel_init_mocs_engine()
As the only error is for a programming error in constructing the static tables describing the register values, replace the error code propagation with an assert. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180815184251.5850-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_mocs.c')
-rw-r--r--drivers/gpu/drm/i915/intel_mocs.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_mocs.c b/drivers/gpu/drm/i915/intel_mocs.c
index 9f0bd6a4cb79..77e9871a8c9a 100644
--- a/drivers/gpu/drm/i915/intel_mocs.c
+++ b/drivers/gpu/drm/i915/intel_mocs.c
@@ -232,20 +232,17 @@ static i915_reg_t mocs_register(enum intel_engine_id engine_id, int index)
*
* This function simply emits a MI_LOAD_REGISTER_IMM command for the
* given table starting at the given address.
- *
- * Return: 0 on success, otherwise the error status.
*/
-int intel_mocs_init_engine(struct intel_engine_cs *engine)
+void intel_mocs_init_engine(struct intel_engine_cs *engine)
{
struct drm_i915_private *dev_priv = engine->i915;
struct drm_i915_mocs_table table;
unsigned int index;
if (!get_mocs_settings(dev_priv, &table))
- return 0;
+ return;
- if (WARN_ON(table.size > GEN9_NUM_MOCS_ENTRIES))
- return -ENODEV;
+ GEM_BUG_ON(table.size > GEN9_NUM_MOCS_ENTRIES);
for (index = 0; index < table.size; index++)
I915_WRITE(mocs_register(engine->id, index),
@@ -262,8 +259,6 @@ int intel_mocs_init_engine(struct intel_engine_cs *engine)
for (; index < GEN9_NUM_MOCS_ENTRIES; index++)
I915_WRITE(mocs_register(engine->id, index),
table.table[0].control_value);
-
- return 0;
}
/**