Skip to content

Commit

Permalink
Merge tag 'drm-intel-fixes-2018-12-07' of git://anongit.freedesktop.o…
Browse files Browse the repository at this point in the history
…rg/drm/drm-intel into drm-fixes

- Fix for system crash after GPU hang (Bugzilla #107945)
- GVT fix for guest graphics corruption (intel/gvt-linux#61)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181207104352.GA18214@jlahtine-desk.ger.corp.intel.com
  • Loading branch information
airlied committed Dec 12, 2018
2 parents 40e020c + d76b21e commit 71fb553
Show file tree
Hide file tree
Showing 9 changed files with 430 additions and 204 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gvt/fb_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ int intel_vgpu_decode_primary_plane(struct intel_vgpu *vgpu,
plane->bpp = skl_pixel_formats[fmt].bpp;
plane->drm_format = skl_pixel_formats[fmt].drm_format;
} else {
plane->tiled = !!(val & DISPPLANE_TILED);
plane->tiled = val & DISPPLANE_TILED;
fmt = bdw_format_to_drm(val & DISPPLANE_PIXFORMAT_MASK);
plane->bpp = bdw_pixel_formats[fmt].bpp;
plane->drm_format = bdw_pixel_formats[fmt].drm_format;
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,7 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)

intel_uncore_sanitize(dev_priv);

intel_gt_init_workarounds(dev_priv);
i915_gem_load_init_fences(dev_priv);

/* On the 945G/GM, the chipset reports the MSI capability on the
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
#include "intel_ringbuffer.h"
#include "intel_uncore.h"
#include "intel_wopcm.h"
#include "intel_workarounds.h"
#include "intel_uc.h"

#include "i915_gem.h"
Expand Down Expand Up @@ -1805,6 +1806,7 @@ struct drm_i915_private {
int dpio_phy_iosf_port[I915_NUM_PHYS_VLV];

struct i915_workarounds workarounds;
struct i915_wa_list gt_wa_list;

struct i915_frontbuffer_tracking fb_tracking;

Expand Down
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -5305,7 +5305,7 @@ int i915_gem_init_hw(struct drm_i915_private *dev_priv)
}
}

intel_gt_workarounds_apply(dev_priv);
intel_gt_apply_workarounds(dev_priv);

i915_gem_init_swizzling(dev_priv);

Expand Down Expand Up @@ -5677,6 +5677,8 @@ void i915_gem_fini(struct drm_i915_private *dev_priv)
i915_gem_contexts_fini(dev_priv);
mutex_unlock(&dev_priv->drm.struct_mutex);

intel_wa_list_free(&dev_priv->gt_wa_list);

intel_cleanup_gt_powersave(dev_priv);

intel_uc_fini_misc(dev_priv);
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/intel_engine_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,8 @@ void intel_engine_cleanup_common(struct intel_engine_cs *engine)
__intel_context_unpin(i915->kernel_context, engine);

i915_timeline_fini(&engine->timeline);

intel_wa_list_free(&engine->wa_list);
}

u64 intel_engine_get_active_head(const struct intel_engine_cs *engine)
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/i915/intel_lrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,8 @@ static bool unexpected_starting_state(struct intel_engine_cs *engine)

static int gen8_init_common_ring(struct intel_engine_cs *engine)
{
intel_engine_apply_workarounds(engine);

intel_mocs_init_engine(engine);

intel_engine_reset_breadcrumbs(engine);
Expand Down Expand Up @@ -2491,6 +2493,8 @@ int logical_render_ring_init(struct intel_engine_cs *engine)
ret);
}

intel_engine_init_workarounds(engine);

return 0;

err_cleanup_common:
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/intel_ringbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "i915_selftest.h"
#include "i915_timeline.h"
#include "intel_gpu_commands.h"
#include "intel_workarounds.h"

struct drm_printer;
struct i915_sched_attr;
Expand Down Expand Up @@ -440,6 +441,7 @@ struct intel_engine_cs {

struct intel_hw_status_page status_page;
struct i915_ctx_workarounds wa_ctx;
struct i915_wa_list wa_list;
struct i915_vma *scratch;

u32 irq_keep_mask; /* always keep these interrupts */
Expand Down
Loading

0 comments on commit 71fb553

Please sign in to comment.