Commit bfeb122d authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-intel-next-2018-11-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-next

Changes outside i915:
- Connector property to limit max bpc (Radhakrishna)
- Fix LPE audio runtime PM and deinit (Ville)
- DP FEC prep work (Anusha)
- Mark pinned shmemfs pages as unevictable (Kuo-Hsin)
- Backmerge drm-next (Jani)

Inside i915:
- Revert OA UAPI change that lacks userspace (Joonas)
- Register macro cleanup (Jani)
- 32-bit build fixes on pin flags (Chris)
- Fix MG DP mode and PHY gating for HDMI (Imre)
- DP MST race, hpd and irq fixes (Lyude)
- Combo PHY fixes and cleanup (Imre, Lucas)
- Move display init and cleanup under modeset init and cleanup (José)
- PSR fixes (José)
- Subslice size fixes (Daniele)
- Abstract and clean up fixed point helpers (Jani)
- Plane input CSC for YUV to RGB conversion (Uma)
- Break long iterations for get/put shmemfs pages (Chris)
- Improve DDI encoder hw state readout sanity checks (Imre)
- Fix power well leaks for MST (José)
- Scaler fixes (Ville)
- Watermark fixes (Ville)
- Fix VLV/CHV DSI panel orientation readout (Ville)
- ICL rawclock fixes (Paulo)
- Workaround DMC power well request issues (Imre)
- Plane allocation fix (Maarten)
- Transcoder enum value/ordering robustness fixes (Imre)
- UTS_RELEASE build dependency fix (Hans Holmberg)
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87k1l4cesj.fsf@intel.com
parents b239499f b4bf44d2
...@@ -143,7 +143,7 @@ using a number of wrapper functions: ...@@ -143,7 +143,7 @@ using a number of wrapper functions:
Query the address space, and return true if it is completely Query the address space, and return true if it is completely
unevictable. unevictable.
These are currently used in two places in the kernel: These are currently used in three places in the kernel:
(1) By ramfs to mark the address spaces of its inodes when they are created, (1) By ramfs to mark the address spaces of its inodes when they are created,
and this mark remains for the life of the inode. and this mark remains for the life of the inode.
...@@ -154,6 +154,10 @@ These are currently used in two places in the kernel: ...@@ -154,6 +154,10 @@ These are currently used in two places in the kernel:
swapped out; the application must touch the pages manually if it wants to swapped out; the application must touch the pages manually if it wants to
ensure they're in memory. ensure they're in memory.
(3) By the i915 driver to mark pinned address space until it's unpinned. The
amount of unevictable memory marked by i915 driver is roughly the bounded
object size in debugfs/dri/0/i915_gem_objects.
Detecting Unevictable Pages Detecting Unevictable Pages
--------------------------- ---------------------------
......
...@@ -398,6 +398,11 @@ static int drm_atomic_connector_check(struct drm_connector *connector, ...@@ -398,6 +398,11 @@ static int drm_atomic_connector_check(struct drm_connector *connector,
{ {
struct drm_crtc_state *crtc_state; struct drm_crtc_state *crtc_state;
struct drm_writeback_job *writeback_job = state->writeback_job; struct drm_writeback_job *writeback_job = state->writeback_job;
const struct drm_display_info *info = &connector->display_info;
state->max_bpc = info->bpc ? info->bpc : 8;
if (connector->max_bpc_property)
state->max_bpc = min(state->max_bpc, state->max_requested_bpc);
if ((connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) || !writeback_job) if ((connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) || !writeback_job)
return 0; return 0;
......
...@@ -669,6 +669,10 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, ...@@ -669,6 +669,10 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
if (old_connector_state->link_status != if (old_connector_state->link_status !=
new_connector_state->link_status) new_connector_state->link_status)
new_crtc_state->connectors_changed = true; new_crtc_state->connectors_changed = true;
if (old_connector_state->max_requested_bpc !=
new_connector_state->max_requested_bpc)
new_crtc_state->connectors_changed = true;
} }
if (funcs->atomic_check) if (funcs->atomic_check)
......
...@@ -740,6 +740,8 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, ...@@ -740,6 +740,8 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector,
return set_out_fence_for_connector(state->state, connector, return set_out_fence_for_connector(state->state, connector,
fence_ptr); fence_ptr);
} else if (property == connector->max_bpc_property) {
state->max_requested_bpc = val;
} else if (connector->funcs->atomic_set_property) { } else if (connector->funcs->atomic_set_property) {
return connector->funcs->atomic_set_property(connector, return connector->funcs->atomic_set_property(connector,
state, property, val); state, property, val);
...@@ -804,6 +806,8 @@ drm_atomic_connector_get_property(struct drm_connector *connector, ...@@ -804,6 +806,8 @@ drm_atomic_connector_get_property(struct drm_connector *connector,
*val = 0; *val = 0;
} else if (property == config->writeback_out_fence_ptr_property) { } else if (property == config->writeback_out_fence_ptr_property) {
*val = 0; *val = 0;
} else if (property == connector->max_bpc_property) {
*val = state->max_requested_bpc;
} else if (connector->funcs->atomic_get_property) { } else if (connector->funcs->atomic_get_property) {
return connector->funcs->atomic_get_property(connector, return connector->funcs->atomic_get_property(connector,
state, property, val); state, property, val);
......
...@@ -932,6 +932,13 @@ DRM_ENUM_NAME_FN(drm_get_content_protection_name, drm_cp_enum_list) ...@@ -932,6 +932,13 @@ DRM_ENUM_NAME_FN(drm_get_content_protection_name, drm_cp_enum_list)
* is no longer protected and userspace should take appropriate action * is no longer protected and userspace should take appropriate action
* (whatever that might be). * (whatever that might be).
* *
* max bpc:
* This range property is used by userspace to limit the bit depth. When
* used the driver would limit the bpc in accordance with the valid range
* supported by the hardware and sink. Drivers to use the function
* drm_connector_attach_max_bpc_property() to create and attach the
* property to the connector during initialization.
*
* Connectors also have one standardized atomic property: * Connectors also have one standardized atomic property:
* *
* CRTC_ID: * CRTC_ID:
...@@ -1599,6 +1606,40 @@ void drm_connector_set_link_status_property(struct drm_connector *connector, ...@@ -1599,6 +1606,40 @@ void drm_connector_set_link_status_property(struct drm_connector *connector,
} }
EXPORT_SYMBOL(drm_connector_set_link_status_property); EXPORT_SYMBOL(drm_connector_set_link_status_property);
/**
* drm_connector_attach_max_bpc_property - attach "max bpc" property
* @connector: connector to attach max bpc property on.
* @min: The minimum bit depth supported by the connector.
* @max: The maximum bit depth supported by the connector.
*
* This is used to add support for limiting the bit depth on a connector.
*
* Returns:
* Zero on success, negative errno on failure.
*/
int drm_connector_attach_max_bpc_property(struct drm_connector *connector,
int min, int max)
{
struct drm_device *dev = connector->dev;
struct drm_property *prop;
prop = connector->max_bpc_property;
if (!prop) {
prop = drm_property_create_range(dev, 0, "max bpc", min, max);
if (!prop)
return -ENOMEM;
connector->max_bpc_property = prop;
}
drm_object_attach_property(&connector->base, prop, max);
connector->state->max_requested_bpc = max;
connector->state->max_bpc = max;
return 0;
}
EXPORT_SYMBOL(drm_connector_attach_max_bpc_property);
/** /**
* drm_connector_init_panel_orientation_property - * drm_connector_init_panel_orientation_property -
* initialize the connecters panel_orientation property * initialize the connecters panel_orientation property
......
...@@ -1352,3 +1352,93 @@ int drm_dp_read_desc(struct drm_dp_aux *aux, struct drm_dp_desc *desc, ...@@ -1352,3 +1352,93 @@ int drm_dp_read_desc(struct drm_dp_aux *aux, struct drm_dp_desc *desc,
return 0; return 0;
} }
EXPORT_SYMBOL(drm_dp_read_desc); EXPORT_SYMBOL(drm_dp_read_desc);
/**
* DRM DP Helpers for DSC
*/
u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
bool is_edp)
{
u8 slice_cap1 = dsc_dpcd[DP_DSC_SLICE_CAP_1 - DP_DSC_SUPPORT];
if (is_edp) {
/* For eDP, register DSC_SLICE_CAPABILITIES_1 gives slice count */
if (slice_cap1 & DP_DSC_4_PER_DP_DSC_SINK)
return 4;
if (slice_cap1 & DP_DSC_2_PER_DP_DSC_SINK)
return 2;
if (slice_cap1 & DP_DSC_1_PER_DP_DSC_SINK)
return 1;
} else {
/* For DP, use values from DSC_SLICE_CAP_1 and DSC_SLICE_CAP2 */
u8 slice_cap2 = dsc_dpcd[DP_DSC_SLICE_CAP_2 - DP_DSC_SUPPORT];
if (slice_cap2 & DP_DSC_24_PER_DP_DSC_SINK)
return 24;
if (slice_cap2 & DP_DSC_20_PER_DP_DSC_SINK)
return 20;
if (slice_cap2 & DP_DSC_16_PER_DP_DSC_SINK)
return 16;
if (slice_cap1 & DP_DSC_12_PER_DP_DSC_SINK)
return 12;
if (slice_cap1 & DP_DSC_10_PER_DP_DSC_SINK)
return 10;
if (slice_cap1 & DP_DSC_8_PER_DP_DSC_SINK)
return 8;
if (slice_cap1 & DP_DSC_6_PER_DP_DSC_SINK)
return 6;
if (slice_cap1 & DP_DSC_4_PER_DP_DSC_SINK)
return 4;
if (slice_cap1 & DP_DSC_2_PER_DP_DSC_SINK)
return 2;
if (slice_cap1 & DP_DSC_1_PER_DP_DSC_SINK)
return 1;
}
return 0;
}
EXPORT_SYMBOL(drm_dp_dsc_sink_max_slice_count);
u8 drm_dp_dsc_sink_line_buf_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
{
u8 line_buf_depth = dsc_dpcd[DP_DSC_LINE_BUF_BIT_DEPTH - DP_DSC_SUPPORT];
switch (line_buf_depth & DP_DSC_LINE_BUF_BIT_DEPTH_MASK) {
case DP_DSC_LINE_BUF_BIT_DEPTH_9:
return 9;
case DP_DSC_LINE_BUF_BIT_DEPTH_10:
return 10;
case DP_DSC_LINE_BUF_BIT_DEPTH_11:
return 11;
case DP_DSC_LINE_BUF_BIT_DEPTH_12:
return 12;
case DP_DSC_LINE_BUF_BIT_DEPTH_13:
return 13;
case DP_DSC_LINE_BUF_BIT_DEPTH_14:
return 14;
case DP_DSC_LINE_BUF_BIT_DEPTH_15:
return 15;
case DP_DSC_LINE_BUF_BIT_DEPTH_16:
return 16;
case DP_DSC_LINE_BUF_BIT_DEPTH_8:
return 8;
}
return 0;
}
EXPORT_SYMBOL(drm_dp_dsc_sink_line_buf_depth);
u8 drm_dp_dsc_sink_max_color_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
{
u8 color_depth = dsc_dpcd[DP_DSC_DEC_COLOR_DEPTH_CAP - DP_DSC_SUPPORT];
if (color_depth & DP_DSC_12_BPC)
return 12;
if (color_depth & DP_DSC_10_BPC)
return 10;
if (color_depth & DP_DSC_8_BPC)
return 8;
return 0;
}
EXPORT_SYMBOL(drm_dp_dsc_sink_max_color_depth);
...@@ -75,6 +75,7 @@ i915-y += i915_cmd_parser.o \ ...@@ -75,6 +75,7 @@ i915-y += i915_cmd_parser.o \
i915_gemfs.o \ i915_gemfs.o \
i915_query.o \ i915_query.o \
i915_request.o \ i915_request.o \
i915_scheduler.o \
i915_timeline.o \ i915_timeline.o \
i915_trace_points.o \ i915_trace_points.o \
i915_vma.o \ i915_vma.o \
...@@ -112,6 +113,8 @@ i915-y += intel_audio.o \ ...@@ -112,6 +113,8 @@ i915-y += intel_audio.o \
intel_bios.o \ intel_bios.o \
intel_cdclk.o \ intel_cdclk.o \
intel_color.o \ intel_color.o \
intel_combo_phy.o \
intel_connector.o \
intel_display.o \ intel_display.o \
intel_dpio_phy.o \ intel_dpio_phy.o \
intel_dpll_mgr.o \ intel_dpll_mgr.o \
...@@ -120,9 +123,9 @@ i915-y += intel_audio.o \ ...@@ -120,9 +123,9 @@ i915-y += intel_audio.o \
intel_frontbuffer.o \ intel_frontbuffer.o \
intel_hdcp.o \ intel_hdcp.o \
intel_hotplug.o \ intel_hotplug.o \
intel_modes.o \
intel_overlay.o \ intel_overlay.o \
intel_psr.o \ intel_psr.o \
intel_quirks.o \
intel_sideband.o \ intel_sideband.o \
intel_sprite.o intel_sprite.o
i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o
...@@ -142,6 +145,7 @@ i915-y += dvo_ch7017.o \ ...@@ -142,6 +145,7 @@ i915-y += dvo_ch7017.o \
intel_dp_link_training.o \ intel_dp_link_training.o \
intel_dp_mst.o \ intel_dp_mst.o \
intel_dp.o \ intel_dp.o \
intel_dsi.o \
intel_dsi_dcs_backlight.o \ intel_dsi_dcs_backlight.o \
intel_dsi_vbt.o \ intel_dsi_vbt.o \
intel_dvo.o \ intel_dvo.o \
......
...@@ -334,6 +334,28 @@ static void release_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx) ...@@ -334,6 +334,28 @@ static void release_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
i915_gem_object_put(wa_ctx->indirect_ctx.obj); i915_gem_object_put(wa_ctx->indirect_ctx.obj);
} }
static int set_context_ppgtt_from_shadow(struct intel_vgpu_workload *workload,
struct i915_gem_context *ctx)
{
struct intel_vgpu_mm *mm = workload->shadow_mm;
struct i915_hw_ppgtt *ppgtt = ctx->ppgtt;
int i = 0;
if (mm->type != INTEL_GVT_MM_PPGTT || !mm->ppgtt_mm.shadowed)
return -1;
if (mm->ppgtt_mm.root_entry_type == GTT_TYPE_PPGTT_ROOT_L4_ENTRY) {
px_dma(&ppgtt->pml4) = mm->ppgtt_mm.shadow_pdps[0];
} else {
for (i = 0; i < GVT_RING_CTX_NR_PDPS; i++) {
px_dma(ppgtt->pdp.page_directory[i]) =
mm->ppgtt_mm.shadow_pdps[i];
}
}
return 0;
}
/** /**
* intel_gvt_scan_and_shadow_workload - audit the workload by scanning and * intel_gvt_scan_and_shadow_workload - audit the workload by scanning and
* shadow it as well, include ringbuffer,wa_ctx and ctx. * shadow it as well, include ringbuffer,wa_ctx and ctx.
...@@ -358,6 +380,12 @@ int intel_gvt_scan_and_shadow_workload(struct intel_vgpu_workload *workload) ...@@ -358,6 +380,12 @@ int intel_gvt_scan_and_shadow_workload(struct intel_vgpu_workload *workload)
if (workload->req) if (workload->req)
return 0; return 0;
ret = set_context_ppgtt_from_shadow(workload, shadow_ctx);
if (ret < 0) {
gvt_vgpu_err("workload shadow ppgtt isn't ready\n");
return ret;
}
/* pin shadow context by gvt even the shadow context will be pinned /* pin shadow context by gvt even the shadow context will be pinned
* when i915 alloc request. That is because gvt will update the guest * when i915 alloc request. That is because gvt will update the guest
* context from shadow context when workload is completed, and at that * context from shadow context when workload is completed, and at that
......
This diff is collapsed.
...@@ -345,7 +345,7 @@ static int i915_getparam_ioctl(struct drm_device *dev, void *data, ...@@ -345,7 +345,7 @@ static int i915_getparam_ioctl(struct drm_device *dev, void *data,
value = HAS_WT(dev_priv); value = HAS_WT(dev_priv);
break; break;
case I915_PARAM_HAS_ALIASING_PPGTT: case I915_PARAM_HAS_ALIASING_PPGTT:
value = USES_PPGTT(dev_priv); value = min_t(int, INTEL_PPGTT(dev_priv), I915_GEM_PPGTT_FULL);
break; break;
case I915_PARAM_HAS_SEMAPHORES: case I915_PARAM_HAS_SEMAPHORES:
value = HAS_LEGACY_SEMAPHORES(dev_priv); value = HAS_LEGACY_SEMAPHORES(dev_priv);
...@@ -645,6 +645,13 @@ static int i915_load_modeset_init(struct drm_device *dev) ...@@ -645,6 +645,13 @@ static int i915_load_modeset_init(struct drm_device *dev)
if (i915_inject_load_failure()) if (i915_inject_load_failure())
return -ENODEV; return -ENODEV;
if (INTEL_INFO(dev_priv)->num_pipes) {
ret = drm_vblank_init(&dev_priv->drm,
INTEL_INFO(dev_priv)->num_pipes);
if (ret)
goto out;
}
intel_bios_init(dev_priv); intel_bios_init(dev_priv);
/* If we have > 1 VGA cards, then we need to arbitrate access /* If we have > 1 VGA cards, then we need to arbitrate access
...@@ -687,7 +694,7 @@ static int i915_load_modeset_init(struct drm_device *dev) ...@@ -687,7 +694,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
if (ret) if (ret)
goto cleanup_modeset; goto cleanup_modeset;
intel_setup_overlay(dev_priv); intel_overlay_setup(dev_priv);
if (INTEL_INFO(dev_priv)->num_pipes == 0) if (INTEL_INFO(dev_priv)->num_pipes == 0)
return 0; return 0;
...@@ -699,6 +706,8 @@ static int i915_load_modeset_init(struct drm_device *dev) ...@@ -699,6 +706,8 @@ static int i915_load_modeset_init(struct drm_device *dev)
/* Only enable hotplug handling once the fbdev is fully set up. */ /* Only enable hotplug handling once the fbdev is fully set up. */
intel_hpd_init(dev_priv); intel_hpd_init(dev_priv);
intel_init_ipc(dev_priv);
return 0; return 0;
cleanup_gem: cleanup_gem:
...@@ -1030,6 +1039,7 @@ static int i915_driver_init_mmio(struct drm_i915_private *dev_priv) ...@@ -1030,6 +1039,7 @@ static int i915_driver_init_mmio(struct drm_i915_private *dev_priv)
err_uncore: err_uncore:
intel_uncore_fini(dev_priv); intel_uncore_fini(dev_priv);
i915_mmio_cleanup(dev_priv);
err_bridge: err_bridge:
pci_dev_put(dev_priv->bridge_dev); pci_dev_put(dev_priv->bridge_dev);
...@@ -1049,17 +1059,6 @@ static void i915_driver_cleanup_mmio(struct drm_i915_private *dev_priv) ...@@ -1049,17 +1059,6 @@ static void i915_driver_cleanup_mmio(struct drm_i915_private *dev_priv)
static void intel_sanitize_options(struct drm_i915_private *dev_priv) static void intel_sanitize_options(struct drm_i915_private *dev_priv)
{ {
/*
* i915.enable_ppgtt is read-only, so do an early pass to validate the
* user's requested state against the hardware/driver capabilities. We
* do this now so that we can print out any log messages once rather
* than every time we check intel_enable_ppgtt().
*/
i915_modparams.enable_ppgtt =
intel_sanitize_enable_ppgtt(dev_priv,
i915_modparams.enable_ppgtt);
DRM_DEBUG_DRIVER("ppgtt mode: %i\n", i915_modparams.enable_ppgtt);
intel_gvt_sanitize_options(dev_priv); intel_gvt_sanitize_options(dev_priv);
} }
...@@ -1340,7 +1339,7 @@ intel_get_dram_info(struct drm_i915_private *dev_priv) ...@@ -1340,7 +1339,7 @@ intel_get_dram_info(struct drm_i915_private *dev_priv)
/* Need to calculate bandwidth only for Gen9 */ /* Need to calculate bandwidth only for Gen9 */
if (IS_BROXTON(dev_priv)) if (IS_BROXTON(dev_priv))
ret = bxt_get_dram_info(dev_priv); ret = bxt_get_dram_info(dev_priv);
else if (INTEL_GEN(dev_priv) == 9) else if (IS_GEN9(dev_priv))
ret = skl_get_dram_info(dev_priv); ret = skl_get_dram_info(dev_priv);
else else
ret = skl_dram_get_channels_info(dev_priv); ret = skl_dram_get_channels_info(dev_priv);
...@@ -1375,6 +1374,15 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv) ...@@ -1375,6 +1374,15 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
intel_device_info_runtime_init(mkwrite_device_info(dev_priv)); intel_device_info_runtime_init(mkwrite_device_info(dev_priv));
if (HAS_PPGTT(dev_priv)) {
if (intel_vgpu_active(dev_priv) &&
!intel_vgpu_has_full_48bit_ppgtt(dev_priv)) {
i915_report_error(dev_priv,
"incompatible vGPU found, support for isolated ppGTT required\n");
return -ENXIO;
}
}
intel_sanitize_options(dev_priv); intel_sanitize_options(dev_priv);
i915_perf_init(dev_priv); i915_perf_init(dev_priv);
...@@ -1630,14 +1638,16 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1630,14 +1638,16 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent)
(struct intel_device_info *)ent->driver_data; (struct intel_device_info *)ent->driver_data;
struct intel_device_info *device_info; struct intel_device_info *device_info;
struct drm_i915_private *i915; struct drm_i915_private *i915;
int err;
i915 = kzalloc(sizeof(*i915), GFP_KERNEL); i915 = kzalloc(sizeof(*i915), GFP_KERNEL);
if (!i915) if (!i915)
return NULL; return ERR_PTR(-ENOMEM);
if (drm_dev_init(&i915->drm, &driver, &pdev->dev)) { err = drm_dev_init(&i915->drm, &driver, &pdev->dev);
if (err) {
kfree(i915); kfree(i915);
return NULL; return ERR_PTR(err);
} }
i915->drm.pdev = pdev; i915->drm.pdev = pdev;
...@@ -1650,8 +1660,8 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1650,8 +1660,8 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent)
device_info->device_id = pdev->device; device_info->device_id = pdev->device;
BUILD_BUG_ON(INTEL_MAX_PLATFORMS > BUILD_BUG_ON(INTEL_MAX_PLATFORMS >
sizeof(device_info->platform_mask) * BITS_PER_BYTE); BITS_PER_TYPE(device_info->platform_mask));
BUG_ON(device_info->gen > sizeof(device_info->gen_mask) * BITS_PER_BYTE); BUG_ON(device_info->gen > BITS_PER_TYPE(device_info->gen_mask));
return i915; return i915;
} }
...@@ -1686,8 +1696,8 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1686,8 +1696,8 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
int ret; int ret;
dev_priv = i915_driver_create(pdev, ent); dev_priv = i915_driver_create(pdev, ent);
if (!dev_priv) if (IS_ERR(dev_priv))
return -ENOMEM; return PTR_ERR(dev_priv);
/* Disable nuclear pageflip by default on pre-ILK */ /* Disable nuclear pageflip by default on pre-ILK */
if (!i915_modparams.nuclear_pageflip && match_info->gen < 5) if (!i915_modparams.nuclear_pageflip && match_info->gen < 5)
...@@ -1711,26 +1721,12 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1711,26 +1721,12 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
if (ret < 0) if (ret < 0)
goto out_cleanup_mmio; goto out_cleanup_mmio;
/*
* TODO: move the vblank init and parts of modeset init steps into one
* of the i915_driver_init_/i915_driver_register functions according
* to the role/effect of the given init step.
*/
if (INTEL_INFO(dev_priv)->num_pipes) {
ret = drm_vblank_init(&dev_priv->drm,
INTEL_INFO(dev_priv)->num_pipes);
if (ret)
goto out_cleanup_hw;
}
ret = i915_load_modeset_init(&dev_priv->drm); ret = i915_load_modeset_init(&dev_priv->drm);
if (ret < 0) if (ret < 0)
goto out_cleanup_hw; goto out_cleanup_hw;
i915_driver_register(dev_priv); i915_driver_register(dev_priv);
intel_init_ipc(dev_priv);
enable_rpm_wakeref_asserts(dev_priv); enable_rpm_wakeref_asserts(dev_priv);
i915_welcome_messages(dev_priv); i915_welcome_messages(dev_priv);
...@@ -1782,7 +1778,6 @@ void i915_driver_unload(struct drm_device *dev) ...@@ -1782,7 +1778,6 @@ void i915_driver_unload(struct drm_device *dev)
i915_reset_error_state(dev_priv); i915_reset_error_state(dev_priv);
i915_gem_fini(dev_priv); i915_gem_fini(dev_priv);
intel_fbc_cleanup_cfb(dev_priv);
intel_power_domains_fini_hw(dev_priv); intel_power_domains_fini_hw(dev_priv);
...@@ -1920,9 +1915,7 @@ static int i915_drm_suspend(struct drm_device *dev) ...@@ -1920,9 +1915,7 @@ static int i915_drm_suspend(struct drm_device *dev)
i915_save_state(dev_priv); i915_save_state(dev_priv);
opregion_target_state = suspend_to_idle(dev_priv) ? PCI_D1 : PCI_D3cold; opregion_target_state = suspend_to_idle(dev_priv) ? PCI_D1 : PCI_D3cold;
intel_opregion_notify_adapter(dev_priv, opregion_target_state); intel_opregion_suspend(dev_priv, opregion_target_state);
intel_opregion_unregister(dev_priv);
intel_fbdev_set_suspend(dev, FBINFO_STATE_SUSPENDED, true); intel_fbdev_set_suspend(dev, FBINFO_STATE_SUSPENDED, true);
...@@ -1963,7 +1956,7 @@ static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation) ...@@ -1963,7 +1956,7 @@ static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation)
get_suspend_mode(dev_priv, hibernation)); get_suspend_mode(dev_priv, hibernation));
ret = 0; ret = 0;
if (IS_GEN9_LP(dev_priv)) if (INTEL_GEN(dev_priv) >= 11 || IS_GEN9_LP(dev_priv))
bxt_enable_dc9(dev_priv); bxt_enable_dc9(dev_priv);
else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
hsw_enable_pc8(dev_priv); hsw_enable_pc8(dev_priv);
...@@ -2041,7 +2034,6 @@ static int i915_drm_resume(struct drm_device *dev) ...@@ -2041,7 +2034,6 @@ static int i915_drm_resume(struct drm_device *dev)
i915_restore_state(dev_priv); i915_restore_state(dev_priv);
intel_pps_unlock_regs_wa(dev_priv); intel_pps_unlock_regs_wa(dev_priv);
intel_opregion_setup(dev_priv);
intel_init_pch_refclk(dev_priv); intel_init_pch_refclk(dev_priv);
...@@ -2083,12 +2075,10 @@ static int i915_drm_resume(struct drm_device *dev) ...@@ -2083,12 +2075,10 @@ static int i915_drm_resume(struct drm_device *dev)
* */ * */
intel_hpd_init(dev_priv); intel_hpd_init(dev_priv);
intel_opregion_register(dev_priv); intel_opregion_resume(dev_priv);
intel_fbdev_set_suspend(dev, FBINFO_STATE_RUNNING, false); intel_fbdev_set_suspend(dev, FBINFO_STATE_RUNNING, false);
intel_opregion_notify_adapter(dev_priv, PCI_D0);
intel_power_domains_enable(dev_priv); intel_power_domains_enable(dev_priv);
enable_rpm_wakeref_asserts(dev_priv); enable_rpm_wakeref_asserts(dev_priv);
...@@ -2156,7 +2146,7 @@ static int i915_drm_resume_early(struct drm_device *dev) ...@@ -2156,7 +2146,7 @@ static int i915_drm_resume_early(struct drm_device *dev)
intel_uncore_resume_early(dev_priv); intel_uncore_resume_early(dev_priv);
if (IS_GEN9_LP(dev_priv)) { if (INTEL_GEN(dev_priv) >= 11 || IS_GEN9_LP(dev_priv)) {
gen9_sanitize_dc_state(dev_priv); gen9_sanitize_dc_state(dev_priv);
bxt_disable_dc9(dev_priv); bxt_disable_dc9(dev_priv);
} else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) { } else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
...@@ -2923,7 +2913,10 @@ static int intel_runtime_suspend(struct device *kdev) ...@@ -2923,7 +2913,10 @@ static int intel_runtime_suspend(struct device *kdev)
intel_uncore_suspend(dev_priv); intel_uncore_suspend(dev_priv);
ret = 0; ret = 0;
if (IS_GEN9_LP(dev_priv)) { if (INTEL_GEN(dev_priv) >= 11) {
icl_display_core_uninit(dev_priv);
bxt_enable_dc9(dev_priv);
} else if (IS_GEN9_LP(dev_priv)) {
bxt_display_core_uninit(dev_priv); bxt_display_core_uninit(dev_priv);
bxt_enable_dc9(dev_priv); bxt_enable_dc9(dev_priv);
} else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) { } else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
...@@ -3008,7 +3001,18 @@ static int intel_runtime_resume(struct device *kdev) ...@@ -3008,7 +3001,18 @@ static int intel_runtime_resume(struct device *kdev)
if (intel_uncore_unclaimed_mmio(dev_priv)) if (intel_uncore_unclaimed_mmio(dev_priv))
DRM_DEBUG_DRIVER("Unclaimed access during suspend, bios?\n"); DRM_DEBUG_DRIVER("Unclaimed access during suspend, bios?\n");
if (IS_GEN9_LP(dev_priv)) { if (INTEL_GEN(dev_priv) >= 11) {
bxt_disable_dc9(dev_priv);
icl_display_core_init(dev_priv, true);
if (dev_priv->csr.dmc_payload) {
if (dev_priv->csr.allowed_dc_mask &
DC_STATE_EN_UPTO_DC6)
skl_enable_dc6(dev_priv);
else if (dev_priv->csr.allowed_dc_mask &
DC_STATE_EN_UPTO_DC5)
gen9_enable_dc5(dev_priv);
}
} else if (IS_GEN9_LP(dev_priv)) {
bxt_disable_dc9(dev_priv); bxt_disable_dc9(dev_priv);
bxt_display_core_init(dev_priv, true); bxt_display_core_init(dev_priv, true);
if (dev_priv->csr.dmc_payload && if (dev_priv->csr.dmc_payload &&
......
This diff is collapsed.
/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2018 Intel Corporation
*/
#ifndef _I915_FIXED_H_
#define _I915_FIXED_H_
typedef struct {
u32 val;
} uint_fixed_16_16_t;
#define FP_16_16_MAX ((uint_fixed_16_16_t){ .val = UINT_MAX })
static inline bool is_fixed16_zero(uint_fixed_16_16_t val)
{
return val.val == 0;
}
static inline uint_fixed_16_16_t u32_to_fixed16(u32 val)
{
uint_fixed_16_16_t fp = { .val = val << 16 };
WARN_ON(val > U16_MAX);
return fp;
}
static inline u32 fixed16_to_u32_round_up(uint_fixed_16_16_t fp)
{
return DIV_ROUND_UP(fp.val, 1 << 16);
}
static inline u32 fixed16_to_u32(uint_fixed_16_16_t fp)
{
return fp.val >> 16;
}
static inline uint_fixed_16_16_t min_fixed16(uint_fixed_16_16_t min1,
uint_fixed_16_16_t min2)
{
uint_fixed_16_16_t min = { .val = min(min1.val, min2.val) };
return min;
}
static inline uint_fixed_16_16_t max_fixed16(uint_fixed_16_16_t max1,
uint_fixed_16_16_t max2)
{
uint_fixed_16_16_t max = { .val = max(max1.val, max2.val) };
return max;
}
static inline uint_fixed_16_16_t clamp_u64_to_fixed16(u64 val)
{
uint_fixed_16_16_t fp = { .val = (u32)val };
WARN_ON(val > U32_MAX);
return fp;
}
static inline u32 div_round_up_fixed16(uint_fixed_16_16_t val,
uint_fixed_16_16_t d)
{
return DIV_ROUND_UP(val.val, d.val);
}
static inline u32 mul_round_up_u32_fixed16(u32 val, uint_fixed_16_16_t mul)
{
u64 tmp;
tmp = (u64)val * mul.val;
tmp = DIV_ROUND_UP_ULL(tmp, 1 << 16);
WARN_ON(tmp > U32_MAX);
return (u32)tmp;
}
static inline uint_fixed_16_16_t mul_fixed16(uint_fixed_16_16_t val,
uint_fixed_16_16_t mul)
{
u64 tmp;
tmp = (u64)val.val * mul.val;
tmp = tmp >> 16;
return clamp_u64_to_fixed16(tmp);
}
static inline uint_fixed_16_16_t div_fixed16(u32 val, u32 d)
{
u64 tmp;
tmp = (u64)val << 16;
tmp = DIV_ROUND_UP_ULL(tmp, d);
return clamp_u64_to_fixed16(tmp);
}
static inline u32 div_round_up_u32_fixed16(u32 val, uint_fixed_16_16_t d)
{
u64 tmp;
tmp = (u64)val << 16;
tmp = DIV_ROUND_UP_ULL(tmp, d.val);
WARN_ON(tmp > U32_MAX);
return (u32)tmp;
}
static inline uint_fixed_16_16_t mul_u32_fixed16(u32 val, uint_fixed_16_16_t mul)
{
u64 tmp;
tmp = (u64)val * mul.val;
return clamp_u64_to_fixed16(tmp);
}
static inline uint_fixed_16_16_t add_fixed16(uint_fixed_16_16_t add1,
uint_fixed_16_16_t add2)
{
u64 tmp;
tmp = (u64)add1.val + add2.val;
return clamp_u64_to_fixed16(tmp);
}
static inline uint_fixed_16_16_t add_fixed16_u32(uint_fixed_16_16_t add1,
u32 add2)
{
uint_fixed_16_16_t tmp_add2 = u32_to_fixed16(add2);
u64 tmp;
tmp = (u64)add1.val + tmp_add2.val;
return clamp_u64_to_fixed16(tmp);
}
#endif /* _I915_FIXED_H_ */
...@@ -1740,6 +1740,7 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data, ...@@ -1740,6 +1740,7 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
*/ */
err = i915_gem_object_wait(obj, err = i915_gem_object_wait(obj,
I915_WAIT_INTERRUPTIBLE | I915_WAIT_INTERRUPTIBLE |
I915_WAIT_PRIORITY |
(write_domain ? I915_WAIT_ALL : 0), (write_domain ? I915_WAIT_ALL : 0),
MAX_SCHEDULE_TIMEOUT, MAX_SCHEDULE_TIMEOUT,
to_rps_client(file)); to_rps_client(file));
...@@ -2381,11 +2382,23 @@ void __i915_gem_object_invalidate(struct drm_i915_gem_object *obj) ...@@ -2381,11 +2382,23 @@ void __i915_gem_object_invalidate(struct drm_i915_gem_object *obj)
invalidate_mapping_pages(mapping, 0, (loff_t)-1); invalidate_mapping_pages(mapping, 0, (loff_t)-1);
} }
/*
* Move pages to appropriate lru and release the pagevec, decrementing the
* ref count of those pages.
*/
static void check_release_pagevec(struct pagevec *pvec)
{
check_move_unevictable_pages(pvec);
__pagevec_release(pvec);
cond_resched();
}
static void static void
i915_gem_object_put_pages_gtt(struct drm_i915_gem_object *obj, i915_gem_object_put_pages_gtt(struct drm_i915_gem_object *obj,
struct sg_table *pages) struct sg_table *pages)
{ {
struct sgt_iter sgt_iter; struct sgt_iter sgt_iter;
struct pagevec pvec;
struct page *page; struct page *page;
__i915_gem_object_release_shmem(obj, pages, true); __i915_gem_object_release_shmem(obj, pages, true);
...@@ -2395,6 +2408,9 @@ i915_gem_object_put_pages_gtt(struct drm_i915_gem_object *obj, ...@@ -2395,6 +2408,9 @@ i915_gem_object_put_pages_gtt(struct drm_i915_gem_object *obj,
if (i915_gem_object_needs_bit17_swizzle(obj)) if (i915_gem_object_needs_bit17_swizzle(obj))
i915_gem_object_save_bit_17_swizzle(obj, pages); i915_gem_object_save_bit_17_swizzle(obj, pages);
mapping_clear_unevictable(file_inode(obj->base.filp)->i_mapping);
pagevec_init(&pvec);
for_each_sgt_page(page, sgt_iter, pages) { for_each_sgt_page(page, sgt_iter, pages) {
if (obj->mm.dirty) if (obj->mm.dirty)
set_page_dirty(page); set_page_dirty(page);
...@@ -2402,8 +2418,11 @@ i915_gem_object_put_pages_gtt(struct drm_i915_gem_object *obj, ...@@ -2402,8 +2418,11 @@ i915_gem_object_put_pages_gtt(struct drm_i915_gem_object *obj,
if (obj->mm.madv == I915_MADV_WILLNEED) if (obj->mm.madv == I915_MADV_WILLNEED)
mark_page_accessed(page); mark_page_accessed(page);
put_page(page); if (!pagevec_add(&pvec, page))
check_release_pagevec(&pvec);
} }
if (pagevec_count(&pvec))
check_release_pagevec(&pvec);
obj->mm.dirty = false; obj->mm.dirty = false;
sg_free_table(pages); sg_free_table(pages);
...@@ -2483,7 +2502,7 @@ void __i915_gem_object_put_pages(struct drm_i915_gem_object *obj, ...@@ -2483,7 +2502,7 @@ void __i915_gem_object_put_pages(struct drm_i915_gem_object *obj,
mutex_unlock(&obj->mm.lock); mutex_unlock(&obj->mm.lock);
} }
static bool i915_sg_trim(struct sg_table *orig_st) bool i915_sg_trim(struct sg_table *orig_st)
{ {
struct sg_table new_st; struct sg_table new_st;
struct scatterlist *sg, *new_sg; struct scatterlist *sg, *new_sg;
...@@ -2524,6 +2543,7 @@ static int i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj) ...@@ -2524,6 +2543,7 @@ static int i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
unsigned long last_pfn = 0; /* suppress gcc warning */ unsigned long last_pfn = 0; /* suppress gcc warning */
unsigned int max_segment = i915_sg_segment_size(); unsigned int max_segment = i915_sg_segment_size();
unsigned int sg_page_sizes; unsigned int sg_page_sizes;
struct pagevec pvec;
gfp_t noreclaim; gfp_t noreclaim;
int ret; int ret;
...@@ -2559,6 +2579,7 @@ static int i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj) ...@@ -2559,6 +2579,7 @@ static int i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
* Fail silently without starting the shrinker * Fail silently without starting the shrinker
*/ */
mapping = obj->base.filp->f_mapping; mapping = obj->base.filp->f_mapping;
mapping_set_unevictable(mapping);
noreclaim = mapping_gfp_constraint(mapping, ~__GFP_RECLAIM); noreclaim = mapping_gfp_constraint(mapping, ~__GFP_RECLAIM);
noreclaim |= __GFP_NORETRY | __GFP_NOWARN; noreclaim |= __GFP_NORETRY | __GFP_NOWARN;
...@@ -2573,6 +2594,7 @@ static int i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj) ...@@ -2573,6 +2594,7 @@ static int i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
gfp_t gfp = noreclaim; gfp_t gfp = noreclaim;
do { do {
cond_resched();
page = shmem_read_mapping_page_gfp(mapping, i, gfp); page = shmem_read_mapping_page_gfp(mapping, i, gfp);
if (likely(!IS_ERR(page))) if (likely(!IS_ERR(page)))
break; break;
...@@ -2583,7 +2605,6 @@ static int i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj) ...@@ -2583,7 +2605,6 @@ static int i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
} }
i915_gem_shrink(dev_priv, 2 * page_count, NULL, *s++); i915_gem_shrink(dev_priv, 2 * page_count, NULL, *s++);
cond_resched();
/* /*
* We've tried hard to allocate the memory by reaping * We've tried hard to allocate the memory by reaping
...@@ -2673,8 +2694,14 @@ static int i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj) ...@@ -2673,8 +2694,14 @@ static int i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
err_sg: err_sg:
sg_mark_end(sg); sg_mark_end(sg);
err_pages: err_pages:
for_each_sgt_page(page, sgt_iter, st) mapping_clear_unevictable(mapping);
put_page(page); pagevec_init(&pvec);
for_each_sgt_page(page, sgt_iter, st) {
if (!pagevec_add(&pvec, page))
check_release_pagevec(&pvec);
}
if (pagevec_count(&pvec))
check_release_pagevec(&pvec);
sg_free_table(st); sg_free_table(st);
kfree(st); kfree(st);
...@@ -3530,6 +3557,8 @@ static void __sleep_rcu(struct rcu_head *rcu) ...@@ -3530,6 +3557,8 @@ static void __sleep_rcu(struct rcu_head *rcu)
struct sleep_rcu_work *s = container_of(rcu, typeof(*s), rcu); struct sleep_rcu_work *s = container_of(rcu, typeof(*s), rcu);
struct drm_i915_private *i915 = s->i915; struct drm_i915_private *i915 = s->i915;
destroy_rcu_head(&s->rcu);
if (same_epoch(i915, s->epoch)) { if (same_epoch(i915, s->epoch)) {
INIT_WORK(&s->work, __sleep_work); INIT_WORK(&s->work, __sleep_work);
queue_work(i915->wq, &s->work); queue_work(i915->wq, &s->work);
...@@ -3646,6 +3675,7 @@ i915_gem_idle_work_handler(struct work_struct *work) ...@@ -3646,6 +3675,7 @@ i915_gem_idle_work_handler(struct work_struct *work)
if (same_epoch(dev_priv, epoch)) { if (same_epoch(dev_priv, epoch)) {
struct sleep_rcu_work *s = kmalloc(sizeof(*s), GFP_KERNEL); struct sleep_rcu_work *s = kmalloc(sizeof(*s), GFP_KERNEL);
if (s) { if (s) {
init_rcu_head(&s->rcu);
s->i915 = dev_priv; s->i915 = dev_priv;
s->epoch = epoch; s->epoch = epoch;
call_rcu(&s->rcu, __sleep_rcu); call_rcu(&s->rcu, __sleep_rcu);
...@@ -3743,7 +3773,9 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file) ...@@ -3743,7 +3773,9 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
start = ktime_get(); start = ktime_get();
ret = i915_gem_object_wait(obj, ret = i915_gem_object_wait(obj,
I915_WAIT_INTERRUPTIBLE | I915_WAIT_ALL, I915_WAIT_INTERRUPTIBLE |
I915_WAIT_PRIORITY |
I915_WAIT_ALL,
to_wait_timeout(args->timeout_ns), to_wait_timeout(args->timeout_ns),
to_rps_client(file)); to_rps_client(file));
...@@ -4710,6 +4742,8 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj, ...@@ -4710,6 +4742,8 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
INIT_LIST_HEAD(&obj->lut_list); INIT_LIST_HEAD(&obj->lut_list);
INIT_LIST_HEAD(&obj->batch_pool_link); INIT_LIST_HEAD(&obj->batch_pool_link);
init_rcu_head(&obj->rcu);
obj->ops = ops; obj->ops = ops;
reservation_object_init(&obj->__builtin_resv); reservation_object_init(&obj->__builtin_resv);
...@@ -4976,6 +5010,13 @@ static void __i915_gem_free_object_rcu(struct rcu_head *head) ...@@ -4976,6 +5010,13 @@ static void __i915_gem_free_object_rcu(struct rcu_head *head)
container_of(head, typeof(*obj), rcu); container_of(head, typeof(*obj), rcu);
struct drm_i915_private *i915 = to_i915(obj->base.dev); struct drm_i915_private *i915 = to_i915(obj->base.dev);
/*
* We reuse obj->rcu for the freed list, so we had better not treat
* it like a rcu_head from this point forwards. And we expect all
* objects to be freed via this path.
*/
destroy_rcu_head(&obj->rcu);
/* /*
* Since we require blocking on struct_mutex to unbind the freed * Since we require blocking on struct_mutex to unbind the freed
* object from the GPU before releasing resources back to the * object from the GPU before releasing resources back to the
...@@ -5293,18 +5334,6 @@ int i915_gem_init_hw(struct drm_i915_private *dev_priv) ...@@ -5293,18 +5334,6 @@ int i915_gem_init_hw(struct drm_i915_private *dev_priv)
I915_WRITE(MI_PREDICATE_RESULT_2, IS_HSW_GT3(dev_priv) ? I915_WRITE(MI_PREDICATE_RESULT_2, IS_HSW_GT3(dev_priv) ?
LOWER_SLICE_ENABLED : LOWER_SLICE_DISABLED); LOWER_SLICE_ENABLED : LOWER_SLICE_DISABLED);
if (HAS_PCH_NOP(dev_priv)) {
if (IS_IVYBRIDGE(dev_priv)) {
u32 temp = I915_READ(GEN7_MSG_CTL);
temp &= ~(WAIT_FOR_PCH_FLR_ACK | WAIT_FOR_PCH_RESET_ACK);
I915_WRITE(GEN7_MSG_CTL, temp);
} else if (INTEL_GEN(dev_priv) >= 7) {
u32 temp = I915_READ(HSW_NDE_RSTWRN_OPT);
temp &= ~RESET_PCH_HANDSHAKE_ENABLE;
I915_WRITE(HSW_NDE_RSTWRN_OPT, temp);
}
}
intel_gt_workarounds_apply(dev_priv); intel_gt_workarounds_apply(dev_priv);
i915_gem_init_swizzling(dev_priv); i915_gem_init_swizzling(dev_priv);
...@@ -5951,7 +5980,7 @@ void i915_gem_track_fb(struct drm_i915_gem_object *old, ...@@ -5951,7 +5980,7 @@ void i915_gem_track_fb(struct drm_i915_gem_object *old,
* the bits. * the bits.
*/ */
BUILD_BUG_ON(INTEL_FRONTBUFFER_BITS_PER_PIPE * I915_MAX_PIPES > BUILD_BUG_ON(INTEL_FRONTBUFFER_BITS_PER_PIPE * I915_MAX_PIPES >
sizeof(atomic_t) * BITS_PER_BYTE); BITS_PER_TYPE(atomic_t));
if (old) { if (old) {
WARN_ON(!(atomic_read(&old->frontbuffer_bits) & frontbuffer_bits)); WARN_ON(!(atomic_read(&old->frontbuffer_bits) & frontbuffer_bits));
......
...@@ -47,17 +47,19 @@ struct drm_i915_private; ...@@ -47,17 +47,19 @@ struct drm_i915_private;
#define GEM_DEBUG_DECL(var) var #define GEM_DEBUG_DECL(var) var
#define GEM_DEBUG_EXEC(expr) expr #define GEM_DEBUG_EXEC(expr) expr
#define GEM_DEBUG_BUG_ON(expr) GEM_BUG_ON(expr) #define GEM_DEBUG_BUG_ON(expr) GEM_BUG_ON(expr)
#define GEM_DEBUG_WARN_ON(expr) GEM_WARN_ON(expr)
#else #else
#define GEM_SHOW_DEBUG() (0) #define GEM_SHOW_DEBUG() (0)
#define GEM_BUG_ON(expr) BUILD_BUG_ON_INVALID(expr) #define GEM_BUG_ON(expr) BUILD_BUG_ON_INVALID(expr)
#define GEM_WARN_ON(expr) (BUILD_BUG_ON_INVALID(expr), 0) #define GEM_WARN_ON(expr) ({ unlikely(!!(expr)); })
#define GEM_DEBUG_DECL(var) #define GEM_DEBUG_DECL(var)
#define GEM_DEBUG_EXEC(expr) do { } while (0) #define GEM_DEBUG_EXEC(expr) do { } while (0)
#define GEM_DEBUG_BUG_ON(expr) #define GEM_DEBUG_BUG_ON(expr)
#define GEM_DEBUG_WARN_ON(expr) ({ BUILD_BUG_ON_INVALID(expr); 0; })
#endif #endif
#if IS_ENABLED(CONFIG_DRM_I915_TRACE_GEM) #if IS_ENABLED(CONFIG_DRM_I915_TRACE_GEM)
......
...@@ -337,7 +337,7 @@ __create_hw_context(struct drm_i915_private *dev_priv, ...@@ -337,7 +337,7 @@ __create_hw_context(struct drm_i915_private *dev_priv,
kref_init(&ctx->ref); kref_init(&ctx->ref);
list_add_tail(&ctx->link, &dev_priv->contexts.list); list_add_tail(&ctx->link, &dev_priv->contexts.list);
ctx->i915 = dev_priv; ctx->i915 = dev_priv;
ctx->sched.priority = I915_PRIORITY_NORMAL; ctx->sched.priority = I915_USER_PRIORITY(I915_PRIORITY_NORMAL);
for (n = 0; n < ARRAY_SIZE(ctx->__engine); n++) { for (n = 0; n < ARRAY_SIZE(ctx->__engine); n++) {
struct intel_context *ce = &ctx->__engine[n]; struct intel_context *ce = &ctx->__engine[n];
...@@ -414,7 +414,7 @@ i915_gem_create_context(struct drm_i915_private *dev_priv, ...@@ -414,7 +414,7 @@ i915_gem_create_context(struct drm_i915_private *dev_priv,
if (IS_ERR(ctx)) if (IS_ERR(ctx))
return ctx; return ctx;
if (USES_FULL_PPGTT(dev_priv)) { if (HAS_FULL_PPGTT(dev_priv)) {
struct i915_hw_ppgtt *ppgtt; struct i915_hw_ppgtt *ppgtt;
ppgtt = i915_ppgtt_create(dev_priv, file_priv); ppgtt = i915_ppgtt_create(dev_priv, file_priv);
...@@ -457,7 +457,7 @@ i915_gem_context_create_gvt(struct drm_device *dev) ...@@ -457,7 +457,7 @@ i915_gem_context_create_gvt(struct drm_device *dev)
if (ret) if (ret)
return ERR_PTR(ret); return ERR_PTR(ret);
ctx = __create_hw_context(to_i915(dev), NULL); ctx = i915_gem_create_context(to_i915(dev), NULL);
if (IS_ERR(ctx)) if (IS_ERR(ctx))
goto out; goto out;
...@@ -504,7 +504,7 @@ i915_gem_context_create_kernel(struct drm_i915_private *i915, int prio) ...@@ -504,7 +504,7 @@ i915_gem_context_create_kernel(struct drm_i915_private *i915, int prio)
} }
i915_gem_context_clear_bannable(ctx); i915_gem_context_clear_bannable(ctx);
ctx->sched.priority = prio; ctx->sched.priority = I915_USER_PRIORITY(prio);
ctx->ring_size = PAGE_SIZE; ctx->ring_size = PAGE_SIZE;
GEM_BUG_ON(!i915_gem_context_is_kernel(ctx)); GEM_BUG_ON(!i915_gem_context_is_kernel(ctx));
...@@ -879,7 +879,7 @@ int i915_gem_context_getparam_ioctl(struct drm_device *dev, void *data, ...@@ -879,7 +879,7 @@ int i915_gem_context_getparam_ioctl(struct drm_device *dev, void *data,
args->value = i915_gem_context_is_bannable(ctx); args->value = i915_gem_context_is_bannable(ctx);
break; break;
case I915_CONTEXT_PARAM_PRIORITY: case I915_CONTEXT_PARAM_PRIORITY:
args->value = ctx->sched.priority; args->value = ctx->sched.priority >> I915_USER_PRIORITY_SHIFT;
break; break;
default: default:
ret = -EINVAL; ret = -EINVAL;
...@@ -948,7 +948,8 @@ int i915_gem_context_setparam_ioctl(struct drm_device *dev, void *data, ...@@ -948,7 +948,8 @@ int i915_gem_context_setparam_ioctl(struct drm_device *dev, void *data,
!capable(CAP_SYS_NICE)) !capable(CAP_SYS_NICE))
ret = -EPERM; ret = -EPERM;
else else
ctx->sched.priority = priority; ctx->sched.priority =
I915_USER_PRIORITY(priority);
} }
break; break;
......
...@@ -163,6 +163,7 @@ struct i915_gem_context { ...@@ -163,6 +163,7 @@ struct i915_gem_context {
/** engine: per-engine logical HW state */ /** engine: per-engine logical HW state */
struct intel_context { struct intel_context {
struct i915_gem_context *gem_context; struct i915_gem_context *gem_context;
struct intel_engine_cs *active;
struct i915_vma *state; struct i915_vma *state;
struct intel_ring *ring; struct intel_ring *ring;
u32 *lrc_reg_state; u32 *lrc_reg_state;
......
...@@ -1268,7 +1268,7 @@ relocate_entry(struct i915_vma *vma, ...@@ -1268,7 +1268,7 @@ relocate_entry(struct i915_vma *vma,
else if (gen >= 4) else if (gen >= 4)
len = 4; len = 4;
else else
len = 3; len = 6;
batch = reloc_gpu(eb, vma, len); batch = reloc_gpu(eb, vma, len);
if (IS_ERR(batch)) if (IS_ERR(batch))
...@@ -1309,6 +1309,11 @@ relocate_entry(struct i915_vma *vma, ...@@ -1309,6 +1309,11 @@ relocate_entry(struct i915_vma *vma,
*batch++ = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL; *batch++ = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;
*batch++ = addr; *batch++ = addr;
*batch++ = target_offset; *batch++ = target_offset;
/* And again for good measure (blb/pnv) */
*batch++ = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;
*batch++ = addr;
*batch++ = target_offset;
} }
goto out; goto out;
......
This diff is collapsed.
...@@ -289,6 +289,7 @@ struct i915_address_space { ...@@ -289,6 +289,7 @@ struct i915_address_space {
struct mutex mutex; /* protects vma and our lists */ struct mutex mutex; /* protects vma and our lists */
u64 scratch_pte;
struct i915_page_dma scratch_page; struct i915_page_dma scratch_page;
struct i915_page_table *scratch_pt; struct i915_page_table *scratch_pt;
struct i915_page_directory *scratch_pd; struct i915_page_directory *scratch_pd;
...@@ -335,12 +336,11 @@ struct i915_address_space { ...@@ -335,12 +336,11 @@ struct i915_address_space {
/* Some systems support read-only mappings for GGTT and/or PPGTT */ /* Some systems support read-only mappings for GGTT and/or PPGTT */
bool has_read_only:1; bool has_read_only:1;
/* FIXME: Need a more generic return type */ u64 (*pte_encode)(dma_addr_t addr,
gen6_pte_t (*pte_encode)(dma_addr_t addr, enum i915_cache_level level,
enum i915_cache_level level, u32 flags); /* Create a valid PTE */
u32 flags); /* Create a valid PTE */
/* flags for pte_encode */
#define PTE_READ_ONLY (1<<0) #define PTE_READ_ONLY (1<<0)
int (*allocate_va_range)(struct i915_address_space *vm, int (*allocate_va_range)(struct i915_address_space *vm,
u64 start, u64 length); u64 start, u64 length);
void (*clear_range)(struct i915_address_space *vm, void (*clear_range)(struct i915_address_space *vm,
...@@ -422,7 +422,6 @@ struct gen6_hw_ppgtt { ...@@ -422,7 +422,6 @@ struct gen6_hw_ppgtt {
struct i915_vma *vma; struct i915_vma *vma;
gen6_pte_t __iomem *pd_addr; gen6_pte_t __iomem *pd_addr;
gen6_pte_t scratch_pte;
unsigned int pin_count; unsigned int pin_count;
bool scan_for_unused_pt; bool scan_for_unused_pt;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
* *
*/ */
#include <generated/utsrelease.h> #include <linux/utsname.h>
#include <linux/stop_machine.h> #include <linux/stop_machine.h>
#include <linux/zlib.h> #include <linux/zlib.h>
#include <drm/drm_print.h> #include <drm/drm_print.h>
...@@ -512,7 +512,7 @@ static void error_print_engine(struct drm_i915_error_state_buf *m, ...@@ -512,7 +512,7 @@ static void error_print_engine(struct drm_i915_error_state_buf *m,
err_printf(m, " SYNC_2: 0x%08x\n", err_printf(m, " SYNC_2: 0x%08x\n",
ee->semaphore_mboxes[2]); ee->semaphore_mboxes[2]);
} }
if (USES_PPGTT(m->i915)) { if (HAS_PPGTT(m->i915)) {
err_printf(m, " GFX_MODE: 0x%08x\n", ee->vm_info.gfx_mode); err_printf(m, " GFX_MODE: 0x%08x\n", ee->vm_info.gfx_mode);
if (INTEL_GEN(m->i915) >= 8) { if (INTEL_GEN(m->i915) >= 8) {
...@@ -648,9 +648,12 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m, ...@@ -648,9 +648,12 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
return 0; return 0;
} }
if (IS_ERR(error))
return PTR_ERR(error);
if (*error->error_msg) if (*error->error_msg)
err_printf(m, "%s\n", error->error_msg); err_printf(m, "%s\n", error->error_msg);
err_printf(m, "Kernel: " UTS_RELEASE "\n"); err_printf(m, "Kernel: %s\n", init_utsname()->release);
ts = ktime_to_timespec64(error->time); ts = ktime_to_timespec64(error->time);
err_printf(m, "Time: %lld s %ld us\n", err_printf(m, "Time: %lld s %ld us\n",
(s64)ts.tv_sec, ts.tv_nsec / NSEC_PER_USEC); (s64)ts.tv_sec, ts.tv_nsec / NSEC_PER_USEC);
...@@ -999,7 +1002,6 @@ i915_error_object_create(struct drm_i915_private *i915, ...@@ -999,7 +1002,6 @@ i915_error_object_create(struct drm_i915_private *i915,
} }
compress_fini(&compress, dst); compress_fini(&compress, dst);
ggtt->vm.clear_range(&ggtt->vm, slot, PAGE_SIZE);
return dst; return dst;
} }
...@@ -1268,7 +1270,7 @@ static void error_record_engine_registers(struct i915_gpu_state *error, ...@@ -1268,7 +1270,7 @@ static void error_record_engine_registers(struct i915_gpu_state *error,
ee->reset_count = i915_reset_engine_count(&dev_priv->gpu_error, ee->reset_count = i915_reset_engine_count(&dev_priv->gpu_error,
engine); engine);
if (USES_PPGTT(dev_priv)) { if (HAS_PPGTT(dev_priv)) {
int i; int i;
ee->vm_info.gfx_mode = I915_READ(RING_MODE_GEN7(engine)); ee->vm_info.gfx_mode = I915_READ(RING_MODE_GEN7(engine));
...@@ -1785,6 +1787,14 @@ static unsigned long capture_find_epoch(const struct i915_gpu_state *error) ...@@ -1785,6 +1787,14 @@ static unsigned long capture_find_epoch(const struct i915_gpu_state *error)
return epoch; return epoch;
} }
static void capture_finish(struct i915_gpu_state *error)
{
struct i915_ggtt *ggtt = &error->i915->ggtt;
const u64 slot = ggtt->error_capture.start;
ggtt->vm.clear_range(&ggtt->vm, slot, PAGE_SIZE);
}
static int capture(void *data) static int capture(void *data)
{ {
struct i915_gpu_state *error = data; struct i915_gpu_state *error = data;
...@@ -1809,6 +1819,7 @@ static int capture(void *data) ...@@ -1809,6 +1819,7 @@ static int capture(void *data)
error->epoch = capture_find_epoch(error); error->epoch = capture_find_epoch(error);
capture_finish(error);
return 0; return 0;
} }
...@@ -1859,6 +1870,7 @@ void i915_capture_error_state(struct drm_i915_private *i915, ...@@ -1859,6 +1870,7 @@ void i915_capture_error_state(struct drm_i915_private *i915,
error = i915_capture_gpu_state(i915); error = i915_capture_gpu_state(i915);
if (!error) { if (!error) {
DRM_DEBUG_DRIVER("out of memory, not capturing error state\n"); DRM_DEBUG_DRIVER("out of memory, not capturing error state\n");
i915_disable_error_state(i915, -ENOMEM);
return; return;
} }
...@@ -1914,5 +1926,14 @@ void i915_reset_error_state(struct drm_i915_private *i915) ...@@ -1914,5 +1926,14 @@ void i915_reset_error_state(struct drm_i915_private *i915)
i915->gpu_error.first_error = NULL; i915->gpu_error.first_error = NULL;
spin_unlock_irq(&i915->gpu_error.lock); spin_unlock_irq(&i915->gpu_error.lock);
i915_gpu_state_put(error); if (!IS_ERR(error))
i915_gpu_state_put(error);
}
void i915_disable_error_state(struct drm_i915_private *i915, int err)
{
spin_lock_irq(&i915->gpu_error.lock);
if (!i915->gpu_error.first_error)
i915->gpu_error.first_error = ERR_PTR(err);
spin_unlock_irq(&i915->gpu_error.lock);
} }
...@@ -343,6 +343,7 @@ static inline void i915_gpu_state_put(struct i915_gpu_state *gpu) ...@@ -343,6 +343,7 @@ static inline void i915_gpu_state_put(struct i915_gpu_state *gpu)
struct i915_gpu_state *i915_first_error_state(struct drm_i915_private *i915); struct i915_gpu_state *i915_first_error_state(struct drm_i915_private *i915);
void i915_reset_error_state(struct drm_i915_private *i915); void i915_reset_error_state(struct drm_i915_private *i915);
void i915_disable_error_state(struct drm_i915_private *i915, int err);
#else #else
...@@ -355,13 +356,18 @@ static inline void i915_capture_error_state(struct drm_i915_private *dev_priv, ...@@ -355,13 +356,18 @@ static inline void i915_capture_error_state(struct drm_i915_private *dev_priv,
static inline struct i915_gpu_state * static inline struct i915_gpu_state *
i915_first_error_state(struct drm_i915_private *i915) i915_first_error_state(struct drm_i915_private *i915)
{ {
return NULL; return ERR_PTR(-ENODEV);
} }
static inline void i915_reset_error_state(struct drm_i915_private *i915) static inline void i915_reset_error_state(struct drm_i915_private *i915)
{ {
} }
static inline void i915_disable_error_state(struct drm_i915_private *i915,
int err)
{
}
#endif /* IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) */ #endif /* IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) */
#endif /* _I915_GPU_ERROR_H_ */ #endif /* _I915_GPU_ERROR_H_ */
...@@ -2887,21 +2887,39 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl) ...@@ -2887,21 +2887,39 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
return ret; return ret;
} }
static inline u32 gen8_master_intr_disable(void __iomem * const regs)
{
raw_reg_write(regs, GEN8_MASTER_IRQ, 0);
/*
* Now with master disabled, get a sample of level indications
* for this interrupt. Indications will be cleared on related acks.
* New indications can and will light up during processing,
* and will generate new interrupt after enabling master.
*/
return raw_reg_read(regs, GEN8_MASTER_IRQ);
}
static inline void gen8_master_intr_enable(void __iomem * const regs)
{
raw_reg_write(regs, GEN8_MASTER_IRQ, GEN8_MASTER_IRQ_CONTROL);
}
static irqreturn_t gen8_irq_handler(int irq, void *arg) static irqreturn_t gen8_irq_handler(int irq, void *arg)
{ {
struct drm_i915_private *dev_priv = to_i915(arg); struct drm_i915_private *dev_priv = to_i915(arg);
void __iomem * const regs = dev_priv->regs;
u32 master_ctl; u32 master_ctl;
u32 gt_iir[4]; u32 gt_iir[4];
if (!intel_irqs_enabled(dev_priv)) if (!intel_irqs_enabled(dev_priv))
return IRQ_NONE; return IRQ_NONE;
master_ctl = I915_READ_FW(GEN8_MASTER_IRQ); master_ctl = gen8_master_intr_disable(regs);
master_ctl &= ~GEN8_MASTER_IRQ_CONTROL; if (!master_ctl) {
if (!master_ctl) gen8_master_intr_enable(regs);
return IRQ_NONE; return IRQ_NONE;
}
I915_WRITE_FW(GEN8_MASTER_IRQ, 0);
/* Find, clear, then process each source of interrupt */ /* Find, clear, then process each source of interrupt */
gen8_gt_irq_ack(dev_priv, master_ctl, gt_iir); gen8_gt_irq_ack(dev_priv, master_ctl, gt_iir);
...@@ -2913,7 +2931,7 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg) ...@@ -2913,7 +2931,7 @@ static irqreturn_t gen8_irq_handler(int irq, void *arg)
enable_rpm_wakeref_asserts(dev_priv); enable_rpm_wakeref_asserts(dev_priv);
} }
I915_WRITE_FW(GEN8_MASTER_IRQ, GEN8_MASTER_IRQ_CONTROL); gen8_master_intr_enable(regs);
gen8_gt_irq_handler(dev_priv, master_ctl, gt_iir); gen8_gt_irq_handler(dev_priv, master_ctl, gt_iir);
...@@ -3111,6 +3129,24 @@ gen11_gu_misc_irq_handler(struct drm_i915_private *dev_priv, const u32 iir) ...@@ -3111,6 +3129,24 @@ gen11_gu_misc_irq_handler(struct drm_i915_private *dev_priv, const u32 iir)
intel_opregion_asle_intr(dev_priv); intel_opregion_asle_intr(dev_priv);
} }
static inline u32 gen11_master_intr_disable(void __iomem * const regs)
{
raw_reg_write(regs, GEN11_GFX_MSTR_IRQ, 0);
/*
* Now with master disabled, get a sample of level indications
* for this interrupt. Indications will be cleared on related acks.
* New indications can and will light up during processing,
* and will generate new interrupt after enabling master.
*/
return raw_reg_read(regs, GEN11_GFX_MSTR_IRQ);
}
static inline void gen11_master_intr_enable(void __iomem * const regs)
{
raw_reg_write(regs, GEN11_GFX_MSTR_IRQ, GEN11_MASTER_IRQ);
}
static irqreturn_t gen11_irq_handler(int irq, void *arg) static irqreturn_t gen11_irq_handler(int irq, void *arg)
{ {
struct drm_i915_private * const i915 = to_i915(arg); struct drm_i915_private * const i915 = to_i915(arg);
...@@ -3121,13 +3157,11 @@ static irqreturn_t gen11_irq_handler(int irq, void *arg) ...@@ -3121,13 +3157,11 @@ static irqreturn_t gen11_irq_handler(int irq, void *arg)
if (!intel_irqs_enabled(i915)) if (!intel_irqs_enabled(i915))
return IRQ_NONE; return IRQ_NONE;
master_ctl = raw_reg_read(regs, GEN11_GFX_MSTR_IRQ); master_ctl = gen11_master_intr_disable(regs);
master_ctl &= ~GEN11_MASTER_IRQ; if (!master_ctl) {
if (!master_ctl) gen11_master_intr_enable(regs);
return IRQ_NONE; return IRQ_NONE;
}
/* Disable interrupts. */
raw_reg_write(regs, GEN11_GFX_MSTR_IRQ, 0);
/* Find, clear, then process each source of interrupt. */ /* Find, clear, then process each source of interrupt. */
gen11_gt_irq_handler(i915, master_ctl); gen11_gt_irq_handler(i915, master_ctl);
...@@ -3147,8 +3181,7 @@ static irqreturn_t gen11_irq_handler(int irq, void *arg) ...@@ -3147,8 +3181,7 @@ static irqreturn_t gen11_irq_handler(int irq, void *arg)
gu_misc_iir = gen11_gu_misc_irq_ack(i915, master_ctl); gu_misc_iir = gen11_gu_misc_irq_ack(i915, master_ctl);
/* Acknowledge and enable interrupts. */ gen11_master_intr_enable(regs);
raw_reg_write(regs, GEN11_GFX_MSTR_IRQ, GEN11_MASTER_IRQ | master_ctl);
gen11_gu_misc_irq_handler(i915, gu_misc_iir); gen11_gu_misc_irq_handler(i915, gu_misc_iir);
...@@ -3598,8 +3631,7 @@ static void gen8_irq_reset(struct drm_device *dev) ...@@ -3598,8 +3631,7 @@ static void gen8_irq_reset(struct drm_device *dev)
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
int pipe; int pipe;
I915_WRITE(GEN8_MASTER_IRQ, 0); gen8_master_intr_disable(dev_priv->regs);
POSTING_READ(GEN8_MASTER_IRQ);
gen8_gt_irq_reset(dev_priv); gen8_gt_irq_reset(dev_priv);
...@@ -3641,13 +3673,15 @@ static void gen11_irq_reset(struct drm_device *dev) ...@@ -3641,13 +3673,15 @@ static void gen11_irq_reset(struct drm_device *dev)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int pipe; int pipe;
I915_WRITE(GEN11_GFX_MSTR_IRQ, 0); gen11_master_intr_disable(dev_priv->regs);
POSTING_READ(GEN11_GFX_MSTR_IRQ);
gen11_gt_irq_reset(dev_priv); gen11_gt_irq_reset(dev_priv);
I915_WRITE(GEN11_DISPLAY_INT_CTL, 0); I915_WRITE(GEN11_DISPLAY_INT_CTL, 0);
I915_WRITE(EDP_PSR_IMR, 0xffffffff);
I915_WRITE(EDP_PSR_IIR, 0xffffffff);
for_each_pipe(dev_priv, pipe) for_each_pipe(dev_priv, pipe)
if (intel_display_power_is_enabled(dev_priv, if (intel_display_power_is_enabled(dev_priv,
POWER_DOMAIN_PIPE(pipe))) POWER_DOMAIN_PIPE(pipe)))
...@@ -4244,8 +4278,7 @@ static int gen8_irq_postinstall(struct drm_device *dev) ...@@ -4244,8 +4278,7 @@ static int gen8_irq_postinstall(struct drm_device *dev)
if (HAS_PCH_SPLIT(dev_priv)) if (HAS_PCH_SPLIT(dev_priv))
ibx_irq_postinstall(dev); ibx_irq_postinstall(dev);
I915_WRITE(GEN8_MASTER_IRQ, GEN8_MASTER_IRQ_CONTROL); gen8_master_intr_enable(dev_priv->regs);
POSTING_READ(GEN8_MASTER_IRQ);
return 0; return 0;
} }
...@@ -4307,8 +4340,7 @@ static int gen11_irq_postinstall(struct drm_device *dev) ...@@ -4307,8 +4340,7 @@ static int gen11_irq_postinstall(struct drm_device *dev)
I915_WRITE(GEN11_DISPLAY_INT_CTL, GEN11_DISPLAY_IRQ_ENABLE); I915_WRITE(GEN11_DISPLAY_INT_CTL, GEN11_DISPLAY_IRQ_ENABLE);
I915_WRITE(GEN11_GFX_MSTR_IRQ, GEN11_MASTER_IRQ); gen11_master_intr_enable(dev_priv->regs);
POSTING_READ(GEN11_GFX_MSTR_IRQ);
return 0; return 0;
} }
...@@ -4834,6 +4866,13 @@ void intel_irq_init(struct drm_i915_private *dev_priv) ...@@ -4834,6 +4866,13 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
dev_priv->display_irqs_enabled = false; dev_priv->display_irqs_enabled = false;
dev_priv->hotplug.hpd_storm_threshold = HPD_STORM_DEFAULT_THRESHOLD; dev_priv->hotplug.hpd_storm_threshold = HPD_STORM_DEFAULT_THRESHOLD;
/* If we have MST support, we want to avoid doing short HPD IRQ storm
* detection, as short HPD storms will occur as a natural part of
* sideband messaging with MST.
* On older platforms however, IRQ storms can occur with both long and
* short pulses, as seen on some G4x systems.
*/
dev_priv->hotplug.hpd_short_storm_enabled = !HAS_DP_MST(dev_priv);
dev->driver->get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos; dev->driver->get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos;
dev->driver->get_scanout_position = i915_get_crtc_scanoutpos; dev->driver->get_scanout_position = i915_get_crtc_scanoutpos;
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_BDW_H__ #ifndef __I915_OA_BDW_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_BXT_H__ #ifndef __I915_OA_BXT_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_CFLGT2_H__ #ifndef __I915_OA_CFLGT2_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_CFLGT3_H__ #ifndef __I915_OA_CFLGT3_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_CHV_H__ #ifndef __I915_OA_CHV_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_CNL_H__ #ifndef __I915_OA_CNL_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_GLK_H__ #ifndef __I915_OA_GLK_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_HSW_H__ #ifndef __I915_OA_HSW_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_ICL_H__ #ifndef __I915_OA_ICL_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_KBLGT2_H__ #ifndef __I915_OA_KBLGT2_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_KBLGT3_H__ #ifndef __I915_OA_KBLGT3_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_SKLGT2_H__ #ifndef __I915_OA_SKLGT2_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_SKLGT3_H__ #ifndef __I915_OA_SKLGT3_H__
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#include <linux/sysfs.h> #include <linux/sysfs.h>
......
/* /*
* Autogenerated file by GPU Top : https://github.com/rib/gputop * SPDX-License-Identifier: MIT
* DO NOT EDIT manually!
*
*
* Copyright (c) 2015 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Copyright © 2018 Intel Corporation
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
* *
* Autogenerated file by GPU Top : https://github.com/rib/gputop
* DO NOT EDIT manually!
*/ */
#ifndef __I915_OA_SKLGT4_H__ #ifndef __I915_OA_SKLGT4_H__
......
...@@ -82,10 +82,6 @@ i915_param_named_unsafe(enable_hangcheck, bool, 0644, ...@@ -82,10 +82,6 @@ i915_param_named_unsafe(enable_hangcheck, bool, 0644,
"WARNING: Disabling this can cause system wide hangs. " "WARNING: Disabling this can cause system wide hangs. "
"(default: true)"); "(default: true)");
i915_param_named_unsafe(enable_ppgtt, int, 0400,
"Override PPGTT usage. "
"(-1=auto [default], 0=disabled, 1=aliasing, 2=full, 3=full with extended address space)");
i915_param_named_unsafe(enable_psr, int, 0600, i915_param_named_unsafe(enable_psr, int, 0600,
"Enable PSR " "Enable PSR "
"(0=disabled, 1=enabled) " "(0=disabled, 1=enabled) "
...@@ -171,8 +167,10 @@ i915_param_named_unsafe(inject_load_failure, uint, 0400, ...@@ -171,8 +167,10 @@ i915_param_named_unsafe(inject_load_failure, uint, 0400,
i915_param_named(enable_dpcd_backlight, bool, 0600, i915_param_named(enable_dpcd_backlight, bool, 0600,
"Enable support for DPCD backlight control (default:false)"); "Enable support for DPCD backlight control (default:false)");
#if IS_ENABLED(CONFIG_DRM_I915_GVT)
i915_param_named(enable_gvt, bool, 0400, i915_param_named(enable_gvt, bool, 0400,
"Enable support for Intel GVT-g graphics virtualization host support(default:false)"); "Enable support for Intel GVT-g graphics virtualization host support(default:false)");
#endif
static __always_inline void _print_param(struct drm_printer *p, static __always_inline void _print_param(struct drm_printer *p,
const char *name, const char *name,
...@@ -188,7 +186,8 @@ static __always_inline void _print_param(struct drm_printer *p, ...@@ -188,7 +186,8 @@ static __always_inline void _print_param(struct drm_printer *p,
else if (!__builtin_strcmp(type, "char *")) else if (!__builtin_strcmp(type, "char *"))
drm_printf(p, "i915.%s=%s\n", name, *(const char **)x); drm_printf(p, "i915.%s=%s\n", name, *(const char **)x);
else else
BUILD_BUG(); WARN_ONCE(1, "no printer defined for param type %s (i915.%s)\n",
type, name);
} }
/** /**
......
...@@ -41,7 +41,6 @@ struct drm_printer; ...@@ -41,7 +41,6 @@ struct drm_printer;
param(int, vbt_sdvo_panel_type, -1) \ param(int, vbt_sdvo_panel_type, -1) \
param(int, enable_dc, -1) \ param(int, enable_dc, -1) \
param(int, enable_fbc, -1) \ param(int, enable_fbc, -1) \
param(int, enable_ppgtt, -1) \
param(int, enable_psr, -1) \ param(int, enable_psr, -1) \
param(int, disable_power_well, -1) \ param(int, disable_power_well, -1) \
param(int, enable_ips, 1) \ param(int, enable_ips, 1) \
......
...@@ -33,19 +33,30 @@ ...@@ -33,19 +33,30 @@
#define GEN(x) .gen = (x), .gen_mask = BIT((x) - 1) #define GEN(x) .gen = (x), .gen_mask = BIT((x) - 1)
#define GEN_DEFAULT_PIPEOFFSETS \ #define GEN_DEFAULT_PIPEOFFSETS \
.pipe_offsets = { PIPE_A_OFFSET, PIPE_B_OFFSET, \ .pipe_offsets = { \
PIPE_C_OFFSET, PIPE_EDP_OFFSET }, \ [TRANSCODER_A] = PIPE_A_OFFSET, \
.trans_offsets = { TRANSCODER_A_OFFSET, TRANSCODER_B_OFFSET, \ [TRANSCODER_B] = PIPE_B_OFFSET, \
TRANSCODER_C_OFFSET, TRANSCODER_EDP_OFFSET }, \ [TRANSCODER_C] = PIPE_C_OFFSET, \
.palette_offsets = { PALETTE_A_OFFSET, PALETTE_B_OFFSET } [TRANSCODER_EDP] = PIPE_EDP_OFFSET, \
}, \
.trans_offsets = { \
[TRANSCODER_A] = TRANSCODER_A_OFFSET, \
[TRANSCODER_B] = TRANSCODER_B_OFFSET, \
[TRANSCODER_C] = TRANSCODER_C_OFFSET, \
[TRANSCODER_EDP] = TRANSCODER_EDP_OFFSET, \
}
#define GEN_CHV_PIPEOFFSETS \ #define GEN_CHV_PIPEOFFSETS \
.pipe_offsets = { PIPE_A_OFFSET, PIPE_B_OFFSET, \ .pipe_offsets = { \
CHV_PIPE_C_OFFSET }, \ [TRANSCODER_A] = PIPE_A_OFFSET, \
.trans_offsets = { TRANSCODER_A_OFFSET, TRANSCODER_B_OFFSET, \ [TRANSCODER_B] = PIPE_B_OFFSET, \
CHV_TRANSCODER_C_OFFSET, }, \ [TRANSCODER_C] = CHV_PIPE_C_OFFSET, \
.palette_offsets = { PALETTE_A_OFFSET, PALETTE_B_OFFSET, \ }, \
CHV_PALETTE_C_OFFSET } .trans_offsets = { \
[TRANSCODER_A] = TRANSCODER_A_OFFSET, \
[TRANSCODER_B] = TRANSCODER_B_OFFSET, \
[TRANSCODER_C] = CHV_TRANSCODER_C_OFFSET, \
}
#define CURSOR_OFFSETS \ #define CURSOR_OFFSETS \
.cursor_offsets = { CURSOR_A_OFFSET, CURSOR_B_OFFSET, CHV_CURSOR_C_OFFSET } .cursor_offsets = { CURSOR_A_OFFSET, CURSOR_B_OFFSET, CHV_CURSOR_C_OFFSET }
...@@ -252,7 +263,7 @@ static const struct intel_device_info intel_ironlake_m_info = { ...@@ -252,7 +263,7 @@ static const struct intel_device_info intel_ironlake_m_info = {
.has_llc = 1, \ .has_llc = 1, \
.has_rc6 = 1, \ .has_rc6 = 1, \
.has_rc6p = 1, \ .has_rc6p = 1, \
.has_aliasing_ppgtt = 1, \ .ppgtt = INTEL_PPGTT_ALIASING, \
GEN_DEFAULT_PIPEOFFSETS, \ GEN_DEFAULT_PIPEOFFSETS, \
GEN_DEFAULT_PAGE_SIZES, \ GEN_DEFAULT_PAGE_SIZES, \
CURSOR_OFFSETS CURSOR_OFFSETS
...@@ -297,8 +308,7 @@ static const struct intel_device_info intel_sandybridge_m_gt2_info = { ...@@ -297,8 +308,7 @@ static const struct intel_device_info intel_sandybridge_m_gt2_info = {
.has_llc = 1, \ .has_llc = 1, \
.has_rc6 = 1, \ .has_rc6 = 1, \
.has_rc6p = 1, \ .has_rc6p = 1, \
.has_aliasing_ppgtt = 1, \ .ppgtt = INTEL_PPGTT_FULL, \
.has_full_ppgtt = 1, \
GEN_DEFAULT_PIPEOFFSETS, \ GEN_DEFAULT_PIPEOFFSETS, \
GEN_DEFAULT_PAGE_SIZES, \ GEN_DEFAULT_PAGE_SIZES, \
IVB_CURSOR_OFFSETS IVB_CURSOR_OFFSETS
...@@ -351,8 +361,7 @@ static const struct intel_device_info intel_valleyview_info = { ...@@ -351,8 +361,7 @@ static const struct intel_device_info intel_valleyview_info = {
.has_rc6 = 1, .has_rc6 = 1,
.has_gmch_display = 1, .has_gmch_display = 1,
.has_hotplug = 1, .has_hotplug = 1,
.has_aliasing_ppgtt = 1, .ppgtt = INTEL_PPGTT_FULL,
.has_full_ppgtt = 1,
.has_snoop = true, .has_snoop = true,
.has_coherent_ggtt = false, .has_coherent_ggtt = false,
.ring_mask = RENDER_RING | BSD_RING | BLT_RING, .ring_mask = RENDER_RING | BSD_RING | BLT_RING,
...@@ -399,7 +408,7 @@ static const struct intel_device_info intel_haswell_gt3_info = { ...@@ -399,7 +408,7 @@ static const struct intel_device_info intel_haswell_gt3_info = {
.page_sizes = I915_GTT_PAGE_SIZE_4K | \ .page_sizes = I915_GTT_PAGE_SIZE_4K | \
I915_GTT_PAGE_SIZE_2M, \ I915_GTT_PAGE_SIZE_2M, \
.has_logical_ring_contexts = 1, \ .has_logical_ring_contexts = 1, \
.has_full_48bit_ppgtt = 1, \ .ppgtt = INTEL_PPGTT_FULL_4LVL, \
.has_64bit_reloc = 1, \ .has_64bit_reloc = 1, \
.has_reset_engine = 1 .has_reset_engine = 1
...@@ -443,8 +452,7 @@ static const struct intel_device_info intel_cherryview_info = { ...@@ -443,8 +452,7 @@ static const struct intel_device_info intel_cherryview_info = {
.has_rc6 = 1, .has_rc6 = 1,
.has_logical_ring_contexts = 1, .has_logical_ring_contexts = 1,
.has_gmch_display = 1, .has_gmch_display = 1,
.has_aliasing_ppgtt = 1, .ppgtt = INTEL_PPGTT_FULL,
.has_full_ppgtt = 1,
.has_reset_engine = 1, .has_reset_engine = 1,
.has_snoop = true, .has_snoop = true,
.has_coherent_ggtt = false, .has_coherent_ggtt = false,
...@@ -472,6 +480,8 @@ static const struct intel_device_info intel_cherryview_info = { ...@@ -472,6 +480,8 @@ static const struct intel_device_info intel_cherryview_info = {
#define SKL_PLATFORM \ #define SKL_PLATFORM \
GEN9_FEATURES, \ GEN9_FEATURES, \
/* Display WA #0477 WaDisableIPC: skl */ \
.has_ipc = 0, \
PLATFORM(INTEL_SKYLAKE) PLATFORM(INTEL_SKYLAKE)
static const struct intel_device_info intel_skylake_gt1_info = { static const struct intel_device_info intel_skylake_gt1_info = {
...@@ -518,9 +528,7 @@ static const struct intel_device_info intel_skylake_gt4_info = { ...@@ -518,9 +528,7 @@ static const struct intel_device_info intel_skylake_gt4_info = {
.has_logical_ring_contexts = 1, \ .has_logical_ring_contexts = 1, \
.has_logical_ring_preemption = 1, \ .has_logical_ring_preemption = 1, \
.has_guc = 1, \ .has_guc = 1, \
.has_aliasing_ppgtt = 1, \ .ppgtt = INTEL_PPGTT_FULL_4LVL, \
.has_full_ppgtt = 1, \
.has_full_48bit_ppgtt = 1, \
.has_reset_engine = 1, \ .has_reset_engine = 1, \
.has_snoop = true, \ .has_snoop = true, \
.has_coherent_ggtt = false, \ .has_coherent_ggtt = false, \
...@@ -598,6 +606,22 @@ static const struct intel_device_info intel_cannonlake_info = { ...@@ -598,6 +606,22 @@ static const struct intel_device_info intel_cannonlake_info = {
#define GEN11_FEATURES \ #define GEN11_FEATURES \
GEN10_FEATURES, \ GEN10_FEATURES, \
.pipe_offsets = { \
[TRANSCODER_A] = PIPE_A_OFFSET, \
[TRANSCODER_B] = PIPE_B_OFFSET, \
[TRANSCODER_C] = PIPE_C_OFFSET, \
[TRANSCODER_EDP] = PIPE_EDP_OFFSET, \
[TRANSCODER_DSI_0] = PIPE_DSI0_OFFSET, \
[TRANSCODER_DSI_1] = PIPE_DSI1_OFFSET, \
}, \
.trans_offsets = { \
[TRANSCODER_A] = TRANSCODER_A_OFFSET, \
[TRANSCODER_B] = TRANSCODER_B_OFFSET, \
[TRANSCODER_C] = TRANSCODER_C_OFFSET, \
[TRANSCODER_EDP] = TRANSCODER_EDP_OFFSET, \
[TRANSCODER_DSI_0] = TRANSCODER_DSI0_OFFSET, \
[TRANSCODER_DSI_1] = TRANSCODER_DSI1_OFFSET, \
}, \
GEN(11), \ GEN(11), \
.ddb_size = 2048, \ .ddb_size = 2048, \
.has_logical_ring_elsq = 1 .has_logical_ring_elsq = 1
...@@ -663,7 +687,7 @@ static const struct pci_device_id pciidlist[] = { ...@@ -663,7 +687,7 @@ static const struct pci_device_id pciidlist[] = {
INTEL_KBL_GT2_IDS(&intel_kabylake_gt2_info), INTEL_KBL_GT2_IDS(&intel_kabylake_gt2_info),
INTEL_KBL_GT3_IDS(&intel_kabylake_gt3_info), INTEL_KBL_GT3_IDS(&intel_kabylake_gt3_info),
INTEL_KBL_GT4_IDS(&intel_kabylake_gt3_info), INTEL_KBL_GT4_IDS(&intel_kabylake_gt3_info),
INTEL_AML_GT2_IDS(&intel_kabylake_gt2_info), INTEL_AML_KBL_GT2_IDS(&intel_kabylake_gt2_info),
INTEL_CFL_S_GT1_IDS(&intel_coffeelake_gt1_info), INTEL_CFL_S_GT1_IDS(&intel_coffeelake_gt1_info),
INTEL_CFL_S_GT2_IDS(&intel_coffeelake_gt2_info), INTEL_CFL_S_GT2_IDS(&intel_coffeelake_gt2_info),
INTEL_CFL_H_GT2_IDS(&intel_coffeelake_gt2_info), INTEL_CFL_H_GT2_IDS(&intel_coffeelake_gt2_info),
...@@ -671,6 +695,7 @@ static const struct pci_device_id pciidlist[] = { ...@@ -671,6 +695,7 @@ static const struct pci_device_id pciidlist[] = {
INTEL_CFL_U_GT3_IDS(&intel_coffeelake_gt3_info), INTEL_CFL_U_GT3_IDS(&intel_coffeelake_gt3_info),
INTEL_WHL_U_GT1_IDS(&intel_coffeelake_gt1_info), INTEL_WHL_U_GT1_IDS(&intel_coffeelake_gt1_info),
INTEL_WHL_U_GT2_IDS(&intel_coffeelake_gt2_info), INTEL_WHL_U_GT2_IDS(&intel_coffeelake_gt2_info),
INTEL_AML_CFL_GT2_IDS(&intel_coffeelake_gt2_info),
INTEL_WHL_U_GT3_IDS(&intel_coffeelake_gt3_info), INTEL_WHL_U_GT3_IDS(&intel_coffeelake_gt3_info),
INTEL_CNL_IDS(&intel_cannonlake_info), INTEL_CNL_IDS(&intel_cannonlake_info),
INTEL_ICL_11_IDS(&intel_icelake_11_info), INTEL_ICL_11_IDS(&intel_icelake_11_info),
......
...@@ -890,8 +890,8 @@ static int gen8_oa_read(struct i915_perf_stream *stream, ...@@ -890,8 +890,8 @@ static int gen8_oa_read(struct i915_perf_stream *stream,
DRM_DEBUG("OA buffer overflow (exponent = %d): force restart\n", DRM_DEBUG("OA buffer overflow (exponent = %d): force restart\n",
dev_priv->perf.oa.period_exponent); dev_priv->perf.oa.period_exponent);
dev_priv->perf.oa.ops.oa_disable(dev_priv); dev_priv->perf.oa.ops.oa_disable(stream);
dev_priv->perf.oa.ops.oa_enable(dev_priv); dev_priv->perf.oa.ops.oa_enable(stream);
/* /*
* Note: .oa_enable() is expected to re-init the oabuffer and * Note: .oa_enable() is expected to re-init the oabuffer and
...@@ -1114,8 +1114,8 @@ static int gen7_oa_read(struct i915_perf_stream *stream, ...@@ -1114,8 +1114,8 @@ static int gen7_oa_read(struct i915_perf_stream *stream,
DRM_DEBUG("OA buffer overflow (exponent = %d): force restart\n", DRM_DEBUG("OA buffer overflow (exponent = %d): force restart\n",
dev_priv->perf.oa.period_exponent); dev_priv->perf.oa.period_exponent);
dev_priv->perf.oa.ops.oa_disable(dev_priv); dev_priv->perf.oa.ops.oa_disable(stream);
dev_priv->perf.oa.ops.oa_enable(dev_priv); dev_priv->perf.oa.ops.oa_enable(stream);
oastatus1 = I915_READ(GEN7_OASTATUS1); oastatus1 = I915_READ(GEN7_OASTATUS1);
} }
...@@ -1528,8 +1528,6 @@ static int alloc_oa_buffer(struct drm_i915_private *dev_priv) ...@@ -1528,8 +1528,6 @@ static int alloc_oa_buffer(struct drm_i915_private *dev_priv)
goto err_unpin; goto err_unpin;
} }
dev_priv->perf.oa.ops.init_oa_buffer(dev_priv);
DRM_DEBUG_DRIVER("OA Buffer initialized, gtt offset = 0x%x, vaddr = %p\n", DRM_DEBUG_DRIVER("OA Buffer initialized, gtt offset = 0x%x, vaddr = %p\n",
i915_ggtt_offset(dev_priv->perf.oa.oa_buffer.vma), i915_ggtt_offset(dev_priv->perf.oa.oa_buffer.vma),
dev_priv->perf.oa.oa_buffer.vaddr); dev_priv->perf.oa.oa_buffer.vaddr);
...@@ -1563,9 +1561,11 @@ static void config_oa_regs(struct drm_i915_private *dev_priv, ...@@ -1563,9 +1561,11 @@ static void config_oa_regs(struct drm_i915_private *dev_priv,
} }
} }
static int hsw_enable_metric_set(struct drm_i915_private *dev_priv, static int hsw_enable_metric_set(struct i915_perf_stream *stream)
const struct i915_oa_config *oa_config)
{ {
struct drm_i915_private *dev_priv = stream->dev_priv;
const struct i915_oa_config *oa_config = stream->oa_config;
/* PRM: /* PRM:
* *
* OA unit is using “crclk” for its functionality. When trunk * OA unit is using “crclk” for its functionality. When trunk
...@@ -1767,9 +1767,10 @@ static int gen8_configure_all_contexts(struct drm_i915_private *dev_priv, ...@@ -1767,9 +1767,10 @@ static int gen8_configure_all_contexts(struct drm_i915_private *dev_priv,
return 0; return 0;
} }
static int gen8_enable_metric_set(struct drm_i915_private *dev_priv, static int gen8_enable_metric_set(struct i915_perf_stream *stream)
const struct i915_oa_config *oa_config)
{ {
struct drm_i915_private *dev_priv = stream->dev_priv;
const struct i915_oa_config *oa_config = stream->oa_config;
int ret; int ret;
/* /*
...@@ -1837,10 +1838,10 @@ static void gen10_disable_metric_set(struct drm_i915_private *dev_priv) ...@@ -1837,10 +1838,10 @@ static void gen10_disable_metric_set(struct drm_i915_private *dev_priv)
I915_READ(RPM_CONFIG1) & ~GEN10_GT_NOA_ENABLE); I915_READ(RPM_CONFIG1) & ~GEN10_GT_NOA_ENABLE);
} }
static void gen7_oa_enable(struct drm_i915_private *dev_priv) static void gen7_oa_enable(struct i915_perf_stream *stream)
{ {
struct i915_gem_context *ctx = struct drm_i915_private *dev_priv = stream->dev_priv;
dev_priv->perf.oa.exclusive_stream->ctx; struct i915_gem_context *ctx = stream->ctx;
u32 ctx_id = dev_priv->perf.oa.specific_ctx_id; u32 ctx_id = dev_priv->perf.oa.specific_ctx_id;
bool periodic = dev_priv->perf.oa.periodic; bool periodic = dev_priv->perf.oa.periodic;
u32 period_exponent = dev_priv->perf.oa.period_exponent; u32 period_exponent = dev_priv->perf.oa.period_exponent;
...@@ -1867,8 +1868,9 @@ static void gen7_oa_enable(struct drm_i915_private *dev_priv) ...@@ -1867,8 +1868,9 @@ static void gen7_oa_enable(struct drm_i915_private *dev_priv)
GEN7_OACONTROL_ENABLE); GEN7_OACONTROL_ENABLE);
} }
static void gen8_oa_enable(struct drm_i915_private *dev_priv) static void gen8_oa_enable(struct i915_perf_stream *stream)
{ {
struct drm_i915_private *dev_priv = stream->dev_priv;
u32 report_format = dev_priv->perf.oa.oa_buffer.format; u32 report_format = dev_priv->perf.oa.oa_buffer.format;
/* /*
...@@ -1905,7 +1907,7 @@ static void i915_oa_stream_enable(struct i915_perf_stream *stream) ...@@ -1905,7 +1907,7 @@ static void i915_oa_stream_enable(struct i915_perf_stream *stream)
{ {
struct drm_i915_private *dev_priv = stream->dev_priv; struct drm_i915_private *dev_priv = stream->dev_priv;
dev_priv->perf.oa.ops.oa_enable(dev_priv); dev_priv->perf.oa.ops.oa_enable(stream);
if (dev_priv->perf.oa.periodic) if (dev_priv->perf.oa.periodic)
hrtimer_start(&dev_priv->perf.oa.poll_check_timer, hrtimer_start(&dev_priv->perf.oa.poll_check_timer,
...@@ -1913,8 +1915,10 @@ static void i915_oa_stream_enable(struct i915_perf_stream *stream) ...@@ -1913,8 +1915,10 @@ static void i915_oa_stream_enable(struct i915_perf_stream *stream)
HRTIMER_MODE_REL_PINNED); HRTIMER_MODE_REL_PINNED);
} }
static void gen7_oa_disable(struct drm_i915_private *dev_priv) static void gen7_oa_disable(struct i915_perf_stream *stream)
{ {
struct drm_i915_private *dev_priv = stream->dev_priv;
I915_WRITE(GEN7_OACONTROL, 0); I915_WRITE(GEN7_OACONTROL, 0);
if (intel_wait_for_register(dev_priv, if (intel_wait_for_register(dev_priv,
GEN7_OACONTROL, GEN7_OACONTROL_ENABLE, 0, GEN7_OACONTROL, GEN7_OACONTROL_ENABLE, 0,
...@@ -1922,8 +1926,10 @@ static void gen7_oa_disable(struct drm_i915_private *dev_priv) ...@@ -1922,8 +1926,10 @@ static void gen7_oa_disable(struct drm_i915_private *dev_priv)
DRM_ERROR("wait for OA to be disabled timed out\n"); DRM_ERROR("wait for OA to be disabled timed out\n");
} }
static void gen8_oa_disable(struct drm_i915_private *dev_priv) static void gen8_oa_disable(struct i915_perf_stream *stream)
{ {
struct drm_i915_private *dev_priv = stream->dev_priv;
I915_WRITE(GEN8_OACONTROL, 0); I915_WRITE(GEN8_OACONTROL, 0);
if (intel_wait_for_register(dev_priv, if (intel_wait_for_register(dev_priv,
GEN8_OACONTROL, GEN8_OA_COUNTER_ENABLE, 0, GEN8_OACONTROL, GEN8_OA_COUNTER_ENABLE, 0,
...@@ -1943,7 +1949,7 @@ static void i915_oa_stream_disable(struct i915_perf_stream *stream) ...@@ -1943,7 +1949,7 @@ static void i915_oa_stream_disable(struct i915_perf_stream *stream)
{ {
struct drm_i915_private *dev_priv = stream->dev_priv; struct drm_i915_private *dev_priv = stream->dev_priv;
dev_priv->perf.oa.ops.oa_disable(dev_priv); dev_priv->perf.oa.ops.oa_disable(stream);
if (dev_priv->perf.oa.periodic) if (dev_priv->perf.oa.periodic)
hrtimer_cancel(&dev_priv->perf.oa.poll_check_timer); hrtimer_cancel(&dev_priv->perf.oa.poll_check_timer);
...@@ -1998,7 +2004,7 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream, ...@@ -1998,7 +2004,7 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
return -EINVAL; return -EINVAL;
} }
if (!dev_priv->perf.oa.ops.init_oa_buffer) { if (!dev_priv->perf.oa.ops.enable_metric_set) {
DRM_DEBUG("OA unit not supported\n"); DRM_DEBUG("OA unit not supported\n");
return -ENODEV; return -ENODEV;
} }
...@@ -2092,8 +2098,7 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream, ...@@ -2092,8 +2098,7 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
if (ret) if (ret)
goto err_lock; goto err_lock;
ret = dev_priv->perf.oa.ops.enable_metric_set(dev_priv, ret = dev_priv->perf.oa.ops.enable_metric_set(stream);
stream->oa_config);
if (ret) { if (ret) {
DRM_DEBUG("Unable to enable metric set\n"); DRM_DEBUG("Unable to enable metric set\n");
goto err_enable; goto err_enable;
...@@ -3387,7 +3392,6 @@ void i915_perf_init(struct drm_i915_private *dev_priv) ...@@ -3387,7 +3392,6 @@ void i915_perf_init(struct drm_i915_private *dev_priv)
dev_priv->perf.oa.ops.is_valid_mux_reg = dev_priv->perf.oa.ops.is_valid_mux_reg =
hsw_is_valid_mux_addr; hsw_is_valid_mux_addr;
dev_priv->perf.oa.ops.is_valid_flex_reg = NULL; dev_priv->perf.oa.ops.is_valid_flex_reg = NULL;
dev_priv->perf.oa.ops.init_oa_buffer = gen7_init_oa_buffer;
dev_priv->perf.oa.ops.enable_metric_set = hsw_enable_metric_set; dev_priv->perf.oa.ops.enable_metric_set = hsw_enable_metric_set;
dev_priv->perf.oa.ops.disable_metric_set = hsw_disable_metric_set; dev_priv->perf.oa.ops.disable_metric_set = hsw_disable_metric_set;
dev_priv->perf.oa.ops.oa_enable = gen7_oa_enable; dev_priv->perf.oa.ops.oa_enable = gen7_oa_enable;
...@@ -3406,7 +3410,6 @@ void i915_perf_init(struct drm_i915_private *dev_priv) ...@@ -3406,7 +3410,6 @@ void i915_perf_init(struct drm_i915_private *dev_priv)
*/ */
dev_priv->perf.oa.oa_formats = gen8_plus_oa_formats; dev_priv->perf.oa.oa_formats = gen8_plus_oa_formats;
dev_priv->perf.oa.ops.init_oa_buffer = gen8_init_oa_buffer;
dev_priv->perf.oa.ops.oa_enable = gen8_oa_enable; dev_priv->perf.oa.ops.oa_enable = gen8_oa_enable;
dev_priv->perf.oa.ops.oa_disable = gen8_oa_disable; dev_priv->perf.oa.ops.oa_disable = gen8_oa_disable;
dev_priv->perf.oa.ops.read = gen8_oa_read; dev_priv->perf.oa.ops.read = gen8_oa_read;
......
...@@ -27,8 +27,7 @@ static int query_topology_info(struct drm_i915_private *dev_priv, ...@@ -27,8 +27,7 @@ static int query_topology_info(struct drm_i915_private *dev_priv,
slice_length = sizeof(sseu->slice_mask); slice_length = sizeof(sseu->slice_mask);
subslice_length = sseu->max_slices * subslice_length = sseu->max_slices *
DIV_ROUND_UP(sseu->max_subslices, DIV_ROUND_UP(sseu->max_subslices, BITS_PER_BYTE);
sizeof(sseu->subslice_mask[0]) * BITS_PER_BYTE);
eu_length = sseu->max_slices * sseu->max_subslices * eu_length = sseu->max_slices * sseu->max_subslices *
DIV_ROUND_UP(sseu->max_eus_per_subslice, BITS_PER_BYTE); DIV_ROUND_UP(sseu->max_eus_per_subslice, BITS_PER_BYTE);
......
This diff is collapsed.
This diff is collapsed.
...@@ -277,8 +277,9 @@ long i915_request_wait(struct i915_request *rq, ...@@ -277,8 +277,9 @@ long i915_request_wait(struct i915_request *rq,
__attribute__((nonnull(1))); __attribute__((nonnull(1)));
#define I915_WAIT_INTERRUPTIBLE BIT(0) #define I915_WAIT_INTERRUPTIBLE BIT(0)
#define I915_WAIT_LOCKED BIT(1) /* struct_mutex held, handle GPU reset */ #define I915_WAIT_LOCKED BIT(1) /* struct_mutex held, handle GPU reset */
#define I915_WAIT_ALL BIT(2) /* used by i915_gem_object_wait() */ #define I915_WAIT_PRIORITY BIT(2) /* small priority bump for the request */
#define I915_WAIT_FOR_IDLE_BOOST BIT(3) #define I915_WAIT_ALL BIT(3) /* used by i915_gem_object_wait() */
#define I915_WAIT_FOR_IDLE_BOOST BIT(4)
static inline bool intel_engine_has_started(struct intel_engine_cs *engine, static inline bool intel_engine_has_started(struct intel_engine_cs *engine,
u32 seqno); u32 seqno);
...@@ -332,14 +333,6 @@ static inline bool i915_request_completed(const struct i915_request *rq) ...@@ -332,14 +333,6 @@ static inline bool i915_request_completed(const struct i915_request *rq)
return __i915_request_completed(rq, seqno); return __i915_request_completed(rq, seqno);
} }
static inline bool i915_sched_node_signaled(const struct i915_sched_node *node)
{
const struct i915_request *rq =
container_of(node, const struct i915_request, sched);
return i915_request_completed(rq);
}
void i915_retire_requests(struct drm_i915_private *i915); void i915_retire_requests(struct drm_i915_private *i915);
/* /*
......
This diff is collapsed.
...@@ -8,9 +8,14 @@ ...@@ -8,9 +8,14 @@
#define _I915_SCHEDULER_H_ #define _I915_SCHEDULER_H_
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/kernel.h>
#include <uapi/drm/i915_drm.h> #include <uapi/drm/i915_drm.h>
struct drm_i915_private;
struct i915_request;
struct intel_engine_cs;
enum { enum {
I915_PRIORITY_MIN = I915_CONTEXT_MIN_USER_PRIORITY - 1, I915_PRIORITY_MIN = I915_CONTEXT_MIN_USER_PRIORITY - 1,
I915_PRIORITY_NORMAL = I915_CONTEXT_DEFAULT_PRIORITY, I915_PRIORITY_NORMAL = I915_CONTEXT_DEFAULT_PRIORITY,
...@@ -19,6 +24,15 @@ enum { ...@@ -19,6 +24,15 @@ enum {
I915_PRIORITY_INVALID = INT_MIN I915_PRIORITY_INVALID = INT_MIN
}; };
#define I915_USER_PRIORITY_SHIFT 2
#define I915_USER_PRIORITY(x) ((x) << I915_USER_PRIORITY_SHIFT)
#define I915_PRIORITY_COUNT BIT(I915_USER_PRIORITY_SHIFT)
#define I915_PRIORITY_MASK (I915_PRIORITY_COUNT - 1)
#define I915_PRIORITY_WAIT ((u8)BIT(0))
#define I915_PRIORITY_NEWCLIENT ((u8)BIT(1))
struct i915_sched_attr { struct i915_sched_attr {
/** /**
* @priority: execution and service priority * @priority: execution and service priority
...@@ -69,4 +83,26 @@ struct i915_dependency { ...@@ -69,4 +83,26 @@ struct i915_dependency {
#define I915_DEPENDENCY_ALLOC BIT(0) #define I915_DEPENDENCY_ALLOC BIT(0)
}; };
void i915_sched_node_init(struct i915_sched_node *node);
bool __i915_sched_node_add_dependency(struct i915_sched_node *node,
struct i915_sched_node *signal,
struct i915_dependency *dep,
unsigned long flags);
int i915_sched_node_add_dependency(struct drm_i915_private *i915,
struct i915_sched_node *node,
struct i915_sched_node *signal);
void i915_sched_node_fini(struct drm_i915_private *i915,
struct i915_sched_node *node);
void i915_schedule(struct i915_request *request,
const struct i915_sched_attr *attr);
void i915_schedule_bump_priority(struct i915_request *rq, unsigned int bump);
struct list_head *
i915_sched_lookup_priolist(struct intel_engine_cs *engine, int prio);
#endif /* _I915_SCHEDULER_H_ */ #endif /* _I915_SCHEDULER_H_ */
...@@ -92,7 +92,7 @@ void i915_syncmap_init(struct i915_syncmap **root) ...@@ -92,7 +92,7 @@ void i915_syncmap_init(struct i915_syncmap **root)
{ {
BUILD_BUG_ON_NOT_POWER_OF_2(KSYNCMAP); BUILD_BUG_ON_NOT_POWER_OF_2(KSYNCMAP);
BUILD_BUG_ON_NOT_POWER_OF_2(SHIFT); BUILD_BUG_ON_NOT_POWER_OF_2(SHIFT);
BUILD_BUG_ON(KSYNCMAP > BITS_PER_BYTE * sizeof((*root)->bitmap)); BUILD_BUG_ON(KSYNCMAP > BITS_PER_TYPE((*root)->bitmap));
*root = NULL; *root = NULL;
} }
......
...@@ -83,6 +83,25 @@ void i915_timeline_init(struct drm_i915_private *i915, ...@@ -83,6 +83,25 @@ void i915_timeline_init(struct drm_i915_private *i915,
const char *name); const char *name);
void i915_timeline_fini(struct i915_timeline *tl); void i915_timeline_fini(struct i915_timeline *tl);
static inline void
i915_timeline_set_subclass(struct i915_timeline *timeline,
unsigned int subclass)
{
lockdep_set_subclass(&timeline->lock, subclass);
/*
* Due to an interesting quirk in lockdep's internal debug tracking,
* after setting a subclass we must ensure the lock is used. Otherwise,
* nr_unused_locks is incremented once too often.
*/
#ifdef CONFIG_DEBUG_LOCK_ALLOC
local_irq_disable();
lock_map_acquire(&timeline->lock.dep_map);
lock_map_release(&timeline->lock.dep_map);
local_irq_enable();
#endif
}
struct i915_timeline * struct i915_timeline *
i915_timeline_create(struct drm_i915_private *i915, const char *name); i915_timeline_create(struct drm_i915_private *i915, const char *name);
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
/* Note we don't consider signbits :| */ /* Note we don't consider signbits :| */
#define overflows_type(x, T) \ #define overflows_type(x, T) \
(sizeof(x) > sizeof(T) && (x) >> (sizeof(T) * BITS_PER_BYTE)) (sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
#define ptr_mask_bits(ptr, n) ({ \ #define ptr_mask_bits(ptr, n) ({ \
unsigned long __v = (unsigned long)(ptr); \ unsigned long __v = (unsigned long)(ptr); \
......
...@@ -305,12 +305,12 @@ int i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level, ...@@ -305,12 +305,12 @@ int i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level,
GEM_BUG_ON(!drm_mm_node_allocated(&vma->node)); GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
GEM_BUG_ON(vma->size > vma->node.size); GEM_BUG_ON(vma->size > vma->node.size);
if (GEM_WARN_ON(range_overflows(vma->node.start, if (GEM_DEBUG_WARN_ON(range_overflows(vma->node.start,
vma->node.size, vma->node.size,
vma->vm->total))) vma->vm->total)))
return -ENODEV; return -ENODEV;
if (GEM_WARN_ON(!flags)) if (GEM_DEBUG_WARN_ON(!flags))
return -EINVAL; return -EINVAL;
bind_flags = 0; bind_flags = 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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