]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge tag 'drm-intel-next-fixes-2015-10-22' of git://anongit.freedesktop.org/drm...
authorDave Airlie <airlied@redhat.com>
Thu, 29 Oct 2015 23:45:33 +0000 (09:45 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 29 Oct 2015 23:45:33 +0000 (09:45 +1000)
Bunch of -fixes for 4.4. Well not just, I've left the mmio/register work
from Ville in here since it's low-risk but lots of churn all over.

* tag 'drm-intel-next-fixes-2015-10-22' of git://anongit.freedesktop.org/drm-intel: (23 commits)
  drm/i915: Use round to closest when computing the CEA 1.001 pixel clocks
  drm/i915: Kill the leftover RMW from ivb_sprite_disable()
  drm/i915: restore ggtt double-bind avoidance
  drm/i915/skl: Enable pipe gamma for sprite planes.
  drm/i915/skl+: Enable pipe CSC on cursor planes. (v2)
  MAINTAINERS: add link to the Intel Graphics for Linux web site
  drm/i915: Move skl/bxt gt specific workarounds to ring init
  drm/i915: Drop i915_gem_obj_is_pinned() from set-cache-level
  drm/i915: revert a few more watermark commits
  drm/i915: Remove dev_priv argument from NEEDS_FORCE_WAKE
  drm/i915: Clean up LVDS register handling
  drm/i915: Throw out some useless variables
  drm/i915: Parametrize and fix SWF registers
  drm/i915: s/PIPE_FRMCOUNT_GM45/PIPE_FRMCOUNT_G4X/ etc.
  drm/i915: Turn GEN5_ASSERT_IIR_IS_ZERO() into a function
  drm/i915: Fix a few bad hex numbers in register defines
  drm/i915: Protect register macro arguments
  drm/i915: Include gpio_mmio_base in GMBUS reg defines
  drm/i915: Parametrize HSW video DIP data registers
  drm/i915: Eliminate weird parameter inversion from BXT PPS registers
  ...

1  2 
MAINTAINERS
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c

diff --combined MAINTAINERS
index 5f467845ef725f42cca522e9f02bf93292c42d4a,c8ca988441932f36e072dc46166b1ceb71734ce0..95c6bcb6bf2266d9f5c092e3bcb93cfc968af5dd
@@@ -3584,6 -3584,7 +3584,7 @@@ M:      Daniel Vetter <daniel.vetter@intel.c
  M:    Jani Nikula <jani.nikula@linux.intel.com>
  L:    intel-gfx@lists.freedesktop.org
  L:    dri-devel@lists.freedesktop.org
+ W:    https://01.org/linuxgraphics/
  Q:    http://patchwork.freedesktop.org/project/intel-gfx/
  T:    git git://anongit.freedesktop.org/drm-intel
  S:    Supported
@@@ -4003,7 -4004,7 +4004,7 @@@ S:      Maintaine
  F:    sound/usb/misc/ua101.c
  
  EXTENSIBLE FIRMWARE INTERFACE (EFI)
 -M:    Matt Fleming <matt.fleming@intel.com>
 +M:    Matt Fleming <matt@codeblueprint.co.uk>
  L:    linux-efi@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git
  S:    Maintained
@@@ -4018,7 -4019,7 +4019,7 @@@ F:      include/linux/efi*.
  EFI VARIABLE FILESYSTEM
  M:    Matthew Garrett <matthew.garrett@nebula.com>
  M:    Jeremy Kerr <jk@ozlabs.org>
 -M:    Matt Fleming <matt.fleming@intel.com>
 +M:    Matt Fleming <matt@codeblueprint.co.uk>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git
  L:    linux-efi@vger.kernel.org
  S:    Maintained
@@@ -5957,7 -5958,7 +5958,7 @@@ F:      virt/kvm
  KERNEL VIRTUAL MACHINE (KVM) FOR AMD-V
  M:    Joerg Roedel <joro@8bytes.org>
  L:    kvm@vger.kernel.org
 -W:    http://kvm.qumranet.com
 +W:    http://www.linux-kvm.org/
  S:    Maintained
  F:    arch/x86/include/asm/svm.h
  F:    arch/x86/kvm/svm.c
  KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC
  M:    Alexander Graf <agraf@suse.com>
  L:    kvm-ppc@vger.kernel.org
 -W:    http://kvm.qumranet.com
 +W:    http://www.linux-kvm.org/
  T:    git git://github.com/agraf/linux-2.6.git
  S:    Supported
  F:    arch/powerpc/include/asm/kvm*
@@@ -9914,6 -9915,7 +9915,6 @@@ S:      Maintaine
  F:    drivers/staging/lustre
  
  STAGING - NVIDIA COMPLIANT EMBEDDED CONTROLLER INTERFACE (nvec)
 -M:    Julian Andres Klode <jak@jak-linux.org>
  M:    Marc Dietrich <marvin24@gmx.de>
  L:    ac100@lists.launchpad.net (moderated for non-subscribers)
  L:    linux-tegra@vger.kernel.org
@@@ -11377,6 -11379,15 +11378,6 @@@ W:  http://oops.ghostprotocols.net:81/bl
  S:    Maintained
  F:    drivers/net/wireless/wl3501*
  
 -WM97XX TOUCHSCREEN DRIVERS
 -M:    Mark Brown <broonie@kernel.org>
 -M:    Liam Girdwood <lrg@slimlogic.co.uk>
 -L:    linux-input@vger.kernel.org
 -W:    https://github.com/CirrusLogic/linux-drivers/wiki
 -S:    Supported
 -F:    drivers/input/touchscreen/*wm97*
 -F:    include/linux/wm97xx.h
 -
  WOLFSON MICROELECTRONICS DRIVERS
  L:    patches@opensource.wolfsonmicro.com
  T:    git https://github.com/CirrusLogic/linux-drivers.git
index 3f2a7a7c7cd41392b216ace25f7024cbb013e04c,1676388a62dff9ff96d9075023f02a96235fe192..a3b22bdacd44f539a81429d7e1946d86d8cb4f78
@@@ -956,6 -956,7 +956,6 @@@ static int i915_gem_fence_regs_info(str
        if (ret)
                return ret;
  
 -      seq_printf(m, "Reserved fences = %d\n", dev_priv->fence_reg_start);
        seq_printf(m, "Total fences = %d\n", dev_priv->num_fence_regs);
        for (i = 0; i < dev_priv->num_fence_regs; i++) {
                struct drm_i915_gem_object *obj = dev_priv->fence_regs[i].obj;
@@@ -1850,7 -1851,7 +1850,7 @@@ static int i915_opregion(struct seq_fil
                goto out;
  
        if (opregion->header) {
-               memcpy_fromio(data, opregion->header, OPREGION_SIZE);
+               memcpy(data, opregion->header, OPREGION_SIZE);
                seq_write(m, data, OPREGION_SIZE);
        }
  
index 5adba06a85d1dba61f28e67755c8407b9be3bd2f,dd0429c612a49cfbb98fdb969756a2d1ef6cbcd5..8afda459a26e290fa218450c074089356ce31efb
@@@ -450,14 -450,14 +450,14 @@@ struct opregion_swsci
  struct opregion_asle;
  
  struct intel_opregion {
-       struct opregion_header __iomem *header;
-       struct opregion_acpi __iomem *acpi;
-       struct opregion_swsci __iomem *swsci;
+       struct opregion_header *header;
+       struct opregion_acpi *acpi;
+       struct opregion_swsci *swsci;
        u32 swsci_gbda_sub_functions;
        u32 swsci_sbcb_sub_functions;
-       struct opregion_asle __iomem *asle;
-       void __iomem *vbt;
-       u32 __iomem *lid_state;
+       struct opregion_asle *asle;
+       void *vbt;
+       u32 *lid_state;
        struct work_struct asle_work;
  };
  #define OPREGION_SIZE            (8*1024)
@@@ -628,6 -628,10 +628,10 @@@ struct drm_i915_display_funcs 
                          struct dpll *match_clock,
                          struct dpll *best_clock);
        void (*update_wm)(struct drm_crtc *crtc);
+       void (*update_sprite_wm)(struct drm_plane *plane,
+                                struct drm_crtc *crtc,
+                                uint32_t sprite_width, uint32_t sprite_height,
+                                int pixel_size, bool enable, bool scaled);
        int (*modeset_calc_cdclk)(struct drm_atomic_state *state);
        void (*modeset_commit_cdclk)(struct drm_atomic_state *state);
        /* Returns the active state of the crtc, and if the crtc is active,
@@@ -1031,7 -1035,7 +1035,7 @@@ struct i915_suspend_saved_registers 
        u32 saveMI_ARB_STATE;
        u32 saveSWF0[16];
        u32 saveSWF1[16];
-       u32 saveSWF2[3];
+       u32 saveSWF3[3];
        uint64_t saveFENCE[I915_MAX_NUM_FENCES];
        u32 savePCH_PORT_HOTPLUG;
        u16 saveGCDGMBUS;
@@@ -1782,6 -1786,7 +1786,6 @@@ struct drm_i915_private 
        struct mutex pps_mutex;
  
        struct drm_i915_fence_reg fence_regs[I915_MAX_NUM_FENCES]; /* assume 965 */
 -      int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */
        int num_fence_regs; /* 8 on pre-965, 16 otherwise */
  
        unsigned int fsb_freq, mem_freq, is_ddr3;
index 4fb8a2f5628169cff0a76f154ef93ee0419b7897,e24378ee7edae8805e48f74dad46c7b00ae4d930..d68328fa175b2e82a94f1ac8f572e65eeafcd6c5
@@@ -139,27 -139,30 +139,30 @@@ static const u32 hpd_bxt[HPD_NUM_PINS] 
  /*
   * We should clear IMR at preinstall/uninstall, and just check at postinstall.
   */
- #define GEN5_ASSERT_IIR_IS_ZERO(reg) do { \
-       u32 val = I915_READ(reg); \
-       if (val) { \
-               WARN(1, "Interrupt register 0x%x is not zero: 0x%08x\n", \
-                    (reg), val); \
-               I915_WRITE((reg), 0xffffffff); \
-               POSTING_READ(reg); \
-               I915_WRITE((reg), 0xffffffff); \
-               POSTING_READ(reg); \
-       } \
- } while (0)
+ static void gen5_assert_iir_is_zero(struct drm_i915_private *dev_priv, u32 reg)
+ {
+       u32 val = I915_READ(reg);
+       if (val == 0)
+               return;
+       WARN(1, "Interrupt register 0x%x is not zero: 0x%08x\n",
+            reg, val);
+       I915_WRITE(reg, 0xffffffff);
+       POSTING_READ(reg);
+       I915_WRITE(reg, 0xffffffff);
+       POSTING_READ(reg);
+ }
  
  #define GEN8_IRQ_INIT_NDX(type, which, imr_val, ier_val) do { \
-       GEN5_ASSERT_IIR_IS_ZERO(GEN8_##type##_IIR(which)); \
+       gen5_assert_iir_is_zero(dev_priv, GEN8_##type##_IIR(which)); \
        I915_WRITE(GEN8_##type##_IER(which), (ier_val)); \
        I915_WRITE(GEN8_##type##_IMR(which), (imr_val)); \
        POSTING_READ(GEN8_##type##_IMR(which)); \
  } while (0)
  
  #define GEN5_IRQ_INIT(type, imr_val, ier_val) do { \
-       GEN5_ASSERT_IIR_IS_ZERO(type##IIR); \
+       gen5_assert_iir_is_zero(dev_priv, type##IIR); \
        I915_WRITE(type##IER, (ier_val)); \
        I915_WRITE(type##IMR, (imr_val)); \
        POSTING_READ(type##IMR); \
@@@ -650,7 -653,7 +653,7 @@@ static void i915_enable_asle_pipestat(s
   *   of horizontal active on the first line of vertical active
   */
  
 -static u32 i8xx_get_vblank_counter(struct drm_device *dev, int pipe)
 +static u32 i8xx_get_vblank_counter(struct drm_device *dev, unsigned int pipe)
  {
        /* Gen2 doesn't have a hardware frame counter */
        return 0;
  /* Called from drm generic code, passed a 'crtc', which
   * we use as a pipe index
   */
 -static u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)
 +static u32 i915_get_vblank_counter(struct drm_device *dev, unsigned int pipe)
  {
        struct drm_i915_private *dev_priv = dev->dev_private;
        unsigned long high_frame;
        return (((high1 << 8) | low) + (pixel >= vbl_start)) & 0xffffff;
  }
  
- static u32 gm45_get_vblank_counter(struct drm_device *dev, unsigned int pipe)
 -static u32 g4x_get_vblank_counter(struct drm_device *dev, int pipe)
++static u32 g4x_get_vblank_counter(struct drm_device *dev, unsigned int pipe)
  {
        struct drm_i915_private *dev_priv = dev->dev_private;
-       int reg = PIPE_FRMCOUNT_GM45(pipe);
  
-       return I915_READ(reg);
+       return I915_READ(PIPE_FRMCOUNT_G4X(pipe));
  }
  
  /* raw reads, only for fast reads of display block, no need for forcewake etc. */
@@@ -768,7 -770,7 +770,7 @@@ static int __intel_get_crtc_scanline(st
        return (position + crtc->scanline_offset) % vtotal;
  }
  
 -static int i915_get_crtc_scanoutpos(struct drm_device *dev, int pipe,
 +static int i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
                                    unsigned int flags, int *vpos, int *hpos,
                                    ktime_t *stime, ktime_t *etime,
                                    const struct drm_display_mode *mode)
@@@ -905,27 -907,27 +907,27 @@@ int intel_get_crtc_scanline(struct inte
        return position;
  }
  
 -static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe,
 +static int i915_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe,
                              int *max_error,
                              struct timeval *vblank_time,
                              unsigned flags)
  {
        struct drm_crtc *crtc;
  
 -      if (pipe < 0 || pipe >= INTEL_INFO(dev)->num_pipes) {
 -              DRM_ERROR("Invalid crtc %d\n", pipe);
 +      if (pipe >= INTEL_INFO(dev)->num_pipes) {
 +              DRM_ERROR("Invalid crtc %u\n", pipe);
                return -EINVAL;
        }
  
        /* Get drm_crtc to timestamp: */
        crtc = intel_get_crtc_for_pipe(dev, pipe);
        if (crtc == NULL) {
 -              DRM_ERROR("Invalid crtc %d\n", pipe);
 +              DRM_ERROR("Invalid crtc %u\n", pipe);
                return -EINVAL;
        }
  
        if (!crtc->hwmode.crtc_clock) {
 -              DRM_DEBUG_KMS("crtc %d is disabled\n", pipe);
 +              DRM_DEBUG_KMS("crtc %u is disabled\n", pipe);
                return -EBUSY;
        }
  
@@@ -2617,7 -2619,7 +2619,7 @@@ void i915_handle_error(struct drm_devic
  /* Called from drm generic code, passed 'crtc' which
   * we use as a pipe index
   */
 -static int i915_enable_vblank(struct drm_device *dev, int pipe)
 +static int i915_enable_vblank(struct drm_device *dev, unsigned int pipe)
  {
        struct drm_i915_private *dev_priv = dev->dev_private;
        unsigned long irqflags;
        return 0;
  }
  
 -static int ironlake_enable_vblank(struct drm_device *dev, int pipe)
 +static int ironlake_enable_vblank(struct drm_device *dev, unsigned int pipe)
  {
        struct drm_i915_private *dev_priv = dev->dev_private;
        unsigned long irqflags;
        return 0;
  }
  
 -static int valleyview_enable_vblank(struct drm_device *dev, int pipe)
 +static int valleyview_enable_vblank(struct drm_device *dev, unsigned int pipe)
  {
        struct drm_i915_private *dev_priv = dev->dev_private;
        unsigned long irqflags;
        return 0;
  }
  
 -static int gen8_enable_vblank(struct drm_device *dev, int pipe)
 +static int gen8_enable_vblank(struct drm_device *dev, unsigned int pipe)
  {
        struct drm_i915_private *dev_priv = dev->dev_private;
        unsigned long irqflags;
  /* Called from drm generic code, passed 'crtc' which
   * we use as a pipe index
   */
 -static void i915_disable_vblank(struct drm_device *dev, int pipe)
 +static void i915_disable_vblank(struct drm_device *dev, unsigned int pipe)
  {
        struct drm_i915_private *dev_priv = dev->dev_private;
        unsigned long irqflags;
        spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
  }
  
 -static void ironlake_disable_vblank(struct drm_device *dev, int pipe)
 +static void ironlake_disable_vblank(struct drm_device *dev, unsigned int pipe)
  {
        struct drm_i915_private *dev_priv = dev->dev_private;
        unsigned long irqflags;
        spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
  }
  
 -static void valleyview_disable_vblank(struct drm_device *dev, int pipe)
 +static void valleyview_disable_vblank(struct drm_device *dev, unsigned int pipe)
  {
        struct drm_i915_private *dev_priv = dev->dev_private;
        unsigned long irqflags;
        spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
  }
  
 -static void gen8_disable_vblank(struct drm_device *dev, int pipe)
 +static void gen8_disable_vblank(struct drm_device *dev, unsigned int pipe)
  {
        struct drm_i915_private *dev_priv = dev->dev_private;
        unsigned long irqflags;
@@@ -3365,7 -3367,7 +3367,7 @@@ static void ibx_irq_postinstall(struct 
        else
                mask = SDE_GMBUS_CPT | SDE_AUX_MASK_CPT;
  
-       GEN5_ASSERT_IIR_IS_ZERO(SDEIIR);
+       gen5_assert_iir_is_zero(dev_priv, SDEIIR);
        I915_WRITE(SDEIMR, ~mask);
  }
  
@@@ -4397,7 -4399,7 +4399,7 @@@ void intel_irq_init(struct drm_i915_pri
                dev->driver->get_vblank_counter = i8xx_get_vblank_counter;
        } else if (IS_G4X(dev_priv) || INTEL_INFO(dev_priv)->gen >= 5) {
                dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */
-               dev->driver->get_vblank_counter = gm45_get_vblank_counter;
+               dev->driver->get_vblank_counter = g4x_get_vblank_counter;
        } else {
                dev->driver->get_vblank_counter = i915_get_vblank_counter;
                dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */