]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/gpu/drm/i915/i915_pci.c
drm/i915/icl: Add Multi-segmented gamma support
[linux.git] / drivers / gpu / drm / i915 / i915_pci.c
index f893c2cbce15fd29a226f9476135be4b9a0aede3..ed6b1f6402c40e3dfe3f7d4881c9fcf3895cadc9 100644 (file)
@@ -370,6 +370,7 @@ static const struct intel_device_info intel_ironlake_m_info = {
        .has_llc = 1, \
        .has_rc6 = 1, \
        .has_rc6p = 1, \
+       .has_rps = true, \
        .ppgtt_type = INTEL_PPGTT_ALIASING, \
        .ppgtt_size = 31, \
        I9XX_PIPE_OFFSETS, \
@@ -417,6 +418,7 @@ static const struct intel_device_info intel_sandybridge_m_gt2_info = {
        .has_llc = 1, \
        .has_rc6 = 1, \
        .has_rc6p = 1, \
+       .has_rps = true, \
        .ppgtt_type = INTEL_PPGTT_FULL, \
        .ppgtt_size = 31, \
        IVB_PIPE_OFFSETS, \
@@ -470,6 +472,7 @@ static const struct intel_device_info intel_valleyview_info = {
        .num_pipes = 2,
        .has_runtime_pm = 1,
        .has_rc6 = 1,
+       .has_rps = true,
        .display.has_gmch = 1,
        .display.has_hotplug = 1,
        .ppgtt_type = INTEL_PPGTT_FULL,
@@ -565,6 +568,7 @@ static const struct intel_device_info intel_cherryview_info = {
        .has_64bit_reloc = 1,
        .has_runtime_pm = 1,
        .has_rc6 = 1,
+       .has_rps = true,
        .has_logical_ring_contexts = 1,
        .display.has_gmch = 1,
        .ppgtt_type = INTEL_PPGTT_FULL,
@@ -596,8 +600,6 @@ static const struct intel_device_info intel_cherryview_info = {
 
 #define SKL_PLATFORM \
        GEN9_FEATURES, \
-       /* Display WA #0477 WaDisableIPC: skl */ \
-       .display.has_ipc = 0, \
        PLATFORM(INTEL_SKYLAKE)
 
 static const struct intel_device_info intel_skylake_gt1_info = {
@@ -640,6 +642,7 @@ static const struct intel_device_info intel_skylake_gt4_info = {
        .has_runtime_pm = 1, \
        .display.has_csr = 1, \
        .has_rc6 = 1, \
+       .has_rps = true, \
        .display.has_dp_mst = 1, \
        .has_logical_ring_contexts = 1, \
        .has_logical_ring_preemption = 1, \
@@ -744,7 +747,7 @@ static const struct intel_device_info intel_cannonlake_info = {
        GEN(11), \
        .ddb_size = 2048, \
        .has_logical_ring_elsq = 1, \
-       .color = { .degamma_lut_size = 33, .gamma_lut_size = 1024 }
+       .color = { .degamma_lut_size = 33, .gamma_lut_size = 262145 }
 
 static const struct intel_device_info intel_icelake_11_info = {
        GEN11_FEATURES,
@@ -756,7 +759,7 @@ static const struct intel_device_info intel_icelake_11_info = {
 static const struct intel_device_info intel_elkhartlake_info = {
        GEN11_FEATURES,
        PLATFORM(INTEL_ELKHARTLAKE),
-       .is_alpha_support = 1,
+       .require_force_probe = 1,
        .engine_mask = BIT(RCS0) | BIT(BCS0) | BIT(VCS0),
        .ppgtt_size = 36,
 };
@@ -850,16 +853,57 @@ static void i915_pci_remove(struct pci_dev *pdev)
        pci_set_drvdata(pdev, NULL);
 }
 
+/* is device_id present in comma separated list of ids */
+static bool force_probe(u16 device_id, const char *devices)
+{
+       char *s, *p, *tok;
+       bool ret;
+
+       /* FIXME: transitional */
+       if (i915_modparams.alpha_support) {
+               DRM_INFO("i915.alpha_support is deprecated, use i915.force_probe=%04x instead\n",
+                        device_id);
+               return true;
+       }
+
+       if (!devices || !*devices)
+               return false;
+
+       /* match everything */
+       if (strcmp(devices, "*") == 0)
+               return true;
+
+       s = kstrdup(devices, GFP_KERNEL);
+       if (!s)
+               return false;
+
+       for (p = s, ret = false; (tok = strsep(&p, ",")) != NULL; ) {
+               u16 val;
+
+               if (kstrtou16(tok, 16, &val) == 0 && val == device_id) {
+                       ret = true;
+                       break;
+               }
+       }
+
+       kfree(s);
+
+       return ret;
+}
+
 static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        struct intel_device_info *intel_info =
                (struct intel_device_info *) ent->driver_data;
        int err;
 
-       if (IS_ALPHA_SUPPORT(intel_info) && !i915_modparams.alpha_support) {
-               DRM_INFO("The driver support for your hardware in this kernel version is alpha quality\n"
-                        "See CONFIG_DRM_I915_ALPHA_SUPPORT or i915.alpha_support module parameter\n"
-                        "to enable support in this kernel version, or check for kernel updates.\n");
+       if (intel_info->require_force_probe &&
+           !force_probe(pdev->device, i915_modparams.force_probe)) {
+               DRM_INFO("Your graphics device %04x is not properly supported by the driver in this\n"
+                        "kernel version. To force driver probe anyway, use i915.force_probe=%04x\n"
+                        "module parameter or CONFIG_DRM_I915_FORCE_PROBE=%04x configuration option,\n"
+                        "or (recommended) check for kernel updates.\n",
+                        pdev->device, pdev->device, pdev->device);
                return -ENODEV;
        }