Skip to content
  1. Oct 22, 2013
  2. Oct 21, 2013
  3. Oct 20, 2013
  4. Oct 19, 2013
  5. Oct 18, 2013
    • Ben Widawsky's avatar
      drm/i915: Disable GGTT PTEs on GEN6+ suspend · 828c7908
      Ben Widawsky authored
      Once the machine gets to a certain point in the suspend process, we
      expect the GPU to be idle. If it is not, we might corrupt memory.
      Empirically (with an early version of this patch) we have seen this is
      not the case. We cannot currently explain why the latent GPU writes
      occur.
      
      In the technical sense, this patch is a workaround in that we have an
      issue we can't explain, and the patch indirectly solves the issue.
      However, it's really better than a workaround because we understand why
      it works, and it really should be a safe thing to do in all cases.
      
      The noticeable effect other than the debug messages would be an increase
      in the suspend time. I have not measure how expensive it actually is.
      
      I think it would be good to spend further time to root cause why we're
      seeing these latent writes, but it shouldn't preclude preventing the
      fallout.
      
      NOTE: It should be safe (and makes some sense IMO) to also keep the
      VALID bit unset on resume when we clear_range(). I've opted not to do
      this as properly clearing those bits at some later point would be extra
      work.
      
      v2: Fix bugzilla link
      
      Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=65496
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59321
      
      
      Tested-by: default avatarTakashi Iwai <tiwai@suse.de>
      Tested-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Tested-By: default avatarTodd Previte <tprevite@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      828c7908
    • Ben Widawsky's avatar
      drm/i915: Make PTE valid encoding optional · b35b380e
      Ben Widawsky authored
      
      
      We need this to work around a corruption when the boot kernel image
      loads the hibernated kernel image from swap on Haswell systems -
      somehow not everything is properly shut off.
      
      This is just the prep work, the next patch will implement the actual
      workaround.
      
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      [danvet: Add a commit message suitable for -fixes and add cc: stable]
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b35b380e
    • Mark Brown's avatar
    • Mark Brown's avatar
    • Mark Brown's avatar
    • Mark Brown's avatar
    • Mark Brown's avatar
    • Mark Brown's avatar
    • Nikolai Kondrashov's avatar
      HID: Fix unit exponent parsing again · ad0e669b
      Nikolai Kondrashov authored
      Revert some changes done in 77463838
      
      .
      
      Revert all changes done in hidinput_calc_abs_res as it mistakingly used
      "Unit" item exponent nibbles to affect resolution value. This wasn't
      breaking resolution calculation of relevant axes of any existing
      devices, though, as they have only one dimension to their units and thus
      1 in the corresponding nible.
      
      Revert to reading "Unit Exponent" item value as a signed integer in
      hid_parser_global to fix reading specification-complying values. This
      fixes resolution calculation of devices complying to the HID standard,
      including Huion, KYE, Waltop and UC-Logic graphics tablets which have
      their report descriptors fixed by the drivers.
      
      Explanations follow.
      
      There are two "unit exponents" in HID specification and it is important
      not to mix them. One is the global "Unit Exponent" item and another is
      nibble values in the global "Unit" item. See 6.2.2.7 Global Items.
      
      The "Unit Exponent" value is just a signed integer and is used to scale
      the integer resolution unit values, so fractions can be expressed.
      
      The nibbles of "Unit" value are used to select the unit system (nibble
      0), and presence of a particular basic unit type in the unit formula and
      its *exponent* (or power, nibbles 1-6). And yes, the latter is in two
      complement and zero means absence of the unit type.
      
      Taking the representation example of (integer) joules from the
      specification:
      
      [mass(grams)][length(centimeters)^2][time(seconds)^-2] * 10^-7
      
      the "Unit Exponent" would be -7 (or 0xF9, if stored as a byte) and the
      "Unit" value would be 0xE121, signifying:
      
      Nibble  Part        Value   Meaning
      -----   ----        -----   -------
      0       System      1       SI Linear
      1       Length      2       Centimeters^2
      2       Mass        1       Grams
      3       Time        -2      Seconds^-2
      
      To give the resolution in e.g. hundredth of joules the "Unit Exponent"
      item value should have been -9.
      
      See also the examples of "Unit" values for some common units in the same
      chapter.
      
      However, there is a common misunderstanding about the "Unit Exponent"
      value encoding, where it is assumed to be stored the same as nibbles in
      "Unit" item. This is most likely due to the specification being a bit
      vague and overloading the term "unit exponent". This also was and still
      is proliferated by the official "HID Descriptor Tool", which makes this
      mistake and stores "Unit Exponent" as such. This format is also
      mentioned in books such as "USB Complete" and in Microsoft's hardware
      design guides.
      
      As a result many devices currently on the market use this encoding and
      so the driver should support them.
      
      Signed-off-by: default avatarNikolai Kondrashov <spbnick@gmail.com>
      Acked-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      ad0e669b
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-fixes' · 981984cb
      Rafael J. Wysocki authored
      * acpi-fixes:
        ACPI / PM: Drop two functions that are not used any more
        ATA / ACPI: remove power dependent device handling
        ACPI / power: Drop automaitc resume of power resource dependent devices
        ACPI: remove /proc/acpi/event from ACPI_BUTTON help
        ACPI / power: Release resource_lock after acpi_power_get_state() return error
      981984cb