1. 06 5月, 2017 1 次提交
    • V
      drm/i915: Fix rawclk readout for g4x · 6f38123e
      Ville Syrjälä 提交于
      Turns out our skills in decoding the CLKCFG register weren't good
      enough. On this particular elk the answer we got was 400 MHz when
      in reality the clock was running at 266 MHz, which then caused us
      to program a bogus AUX clock divider that caused all AUX communication
      to fail.
      
      Sadly the docs are now in bit heaven, so the fix will have to be based
      on empirical evidence. Using another elk machine I was able to frob
      the FSB frequency from the BIOS and see how it affects the CLKCFG
      register. The machine seesm to use a frequency of 266 MHz by default,
      and fortunately it still boot even with the 50% CPU overclock that
      we get when we bump the FSB up to 400 MHz.
      
      It turns out the actual FSB frequency and the register have no real
      link whatsoever. The register value is based on some straps or something,
      but fortunately those too can be configured from the BIOS on this board,
      although it doesn't seem to respect the settings 100%. In the end I was
      able to derive the following relationship:
      
      BIOS FSB / strap | CLKCFG
      -------------------------
      200              | 0x2
      266              | 0x0
      333              | 0x4
      400              | 0x4
      
      So only the 200 and 400 MHz cases actually match how we're currently
      decoding that register. But as the comment next to some of the defines
      says, we have been just guessing anyway.
      
      So let's fix things up so that at least the 266 MHz case will work
      correctly as that is actually the setting used by both the buggy
      machine and my test machine.
      
      The fact that 333 and 400 MHz BIOS settings result in the same register
      value is a little disappointing, as that means we can't tell them apart.
      However, according to the gmch datasheet for both elk and ctg 400 Mhz is
      not even a supported FSB frequency, so I'm going to make the assumption
      that we should decode it as 333 MHz instead.
      
      Cc: stable@vger.kernel.org
      Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
      Reported-by: NTomi Sarvela <tomi.p.sarvela@intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100926Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170504181530.6908-1-ville.syrjala@linux.intel.comAcked-by: NJani Nikula <jani.nikula@intel.com>
      Tested-by: NTomi Sarvela <tomi.p.sarvela@intel.com>
      6f38123e
  2. 04 5月, 2017 6 次提交
  3. 03 5月, 2017 20 次提交
  4. 02 5月, 2017 4 次提交
  5. 29 4月, 2017 8 次提交
    • M
      drm/nouveau/fb/gf100-: Fix 32 bit wraparound in new ram detection · 271393ba
      Mario Kleiner 提交于
      A missing u64 cast causes a 32-Bit wraparound from
      4096 MiB to 0 MiB and therefore total 0 MiB VRAM detected
      if card has 4096 Mib per FBP.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Reviewed-by: NKarol Herbst <karolherbst@gmail.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      271393ba
    • W
      drm/nouveau/secboot/gm20b: fix the error return code in gm20b_secboot_tegra_read_wpr() · 48907c23
      Wei Yongjun 提交于
      The error return code PTR_ERR(mc) is always 0 since mc is
      equal to 0 in this error handling case.
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      48907c23
    • M
      drm/nouveau/kms: Increase max retries in scanout position queries. · 60b95d70
      Mario Kleiner 提交于
      So far we only allowed for 1 retry and just failed the query
      - and thereby high precision vblank timestamping - if we did
      not get a reasonable result, as such a failure wasn't considered
      all too horrible. There are a few NVidia gpu models out there which
      may need a bit more than 1 retry to get a successful query result
      under some conditions.
      
      Since Linux 4.4 the update code for vblank counter and timestamp
      in drm_update_vblank_count() changed so that the implementation
      assumes that high precision vblank timestamping of a kms driver
      either consistently succeeds or consistently fails for a given
      video mode and encoder/connector combo. Iow. switching from success
      to fail or vice versa on a modeset or connector change is ok, but
      spurious temporary failure for a given setup can confuse the core
      code and potentially cause bad miscounting of vblanks and confusion
      or hangs in userspace clients which rely on vblank  stuff, e.g.,
      desktop compositors.
      
      Therefore change the max retry count to a larger number - more than
      any gpu so far is known to need to succeed, but still low enough
      so that these queries which do also happen in vblank interrupt are
      still fast enough to be not disastrously long if something would
      go badly wrong with them.
      
      As such sporadic retries only happen seldom even on affected gpu's,
      this could mean a vblank irq could take a few dozen microseconds
      longer every few hours of uptime -- better than a desktop compositor
      randomly hanging every couple of hours or days of uptime in a hard
      to reproduce manner.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      60b95d70
    • B
      drm/nouveau/bios/bitP: check that table is long enough for optional pointers · a7cb78ba
      Ben Skeggs 提交于
      Fixes OOB VBIOS accesses on some boards.
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      a7cb78ba
    • I
      eef4988a
    • D
      Merge tag 'drm-intel-next-fixes-2017-04-27' of... · 73ba2d5c
      Dave Airlie 提交于
      Merge tag 'drm-intel-next-fixes-2017-04-27' of git://anongit.freedesktop.org/git/drm-intel into drm-next
      
      drm/i915 and gvt fixes for drm-next/v4.12
      
      * tag 'drm-intel-next-fixes-2017-04-27' of git://anongit.freedesktop.org/git/drm-intel:
        drm/i915: Confirm the request is still active before adding it to the await
        drm/i915: Avoid busy-spinning on VLV_GLTC_PW_STATUS mmio
        drm/i915/selftests: Allocate inode/file dynamically
        drm/i915: Fix system hang with EI UP masked on Haswell
        drm/i915: checking for NULL instead of IS_ERR() in mock selftests
        drm/i915: Perform link quality check unconditionally during long pulse
        drm/i915: Fix use after free in lpe_audio_platdev_destroy()
        drm/i915: Use the right mapping_gfp_mask for final shmem allocation
        drm/i915: Make legacy cursor updates more unsynced
        drm/i915: Apply a cond_resched() to the saturated signaler
        drm/i915: Park the signaler before sleeping
        drm/i915/gvt: fix a bounds check in ring_id_to_context_switch_event()
        drm/i915/gvt: Fix PTE write flush for taking runtime pm properly
        drm/i915/gvt: remove some debug messages in scheduler timer handler
        drm/i915/gvt: add mmio init for virtual display
        drm/i915/gvt: use directly assignment for structure copying
        drm/i915/gvt: remove redundant ring id check which cause significant CPU misprediction
        drm/i915/gvt: remove redundant platform check for mocs load/restore
        drm/i915/gvt: Align render mmio list to cacheline
        drm/i915/gvt: cleanup some too chatty scheduler message
      73ba2d5c
    • D
      Merge branch 'drm-vmwgfx-next' of git://people.freedesktop.org/~syeh/repos_linux into drm-next · 53cecf1b
      Dave Airlie 提交于
      trivial patch.
      
      * 'drm-vmwgfx-next' of git://people.freedesktop.org/~syeh/repos_linux:
        drm/vmwgfx: Convert macro to octal representation
      53cecf1b
    • D
      Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next · 97643d75
      Dave Airlie 提交于
      Latest updates on Mali DP, adding support for colour management,
      plane scaling and power management.
      
      (these have been in -next for a while).
      
      * 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld:
        drm: mali-dp: use div_u64 for expensive 64-bit divisions
        drm: mali-dp: Check the mclk rate and allow up/down scaling
        drm: mali-dp: Enable image enhancement when scaling
        drm: mali-dp: Add plane upscaling support
        drm/mali-dp: Add core_id file to the sysfs interface
        drm: mali-dp: Add CTM support
        drm: mali-dp: enable gamma support
        drm: mali-dp: add malidp_crtc_state struct
        drm: mali-dp: add custom reset hook for planes
        drm: mali-dp: remove unused variable
        drm: mali-dp: add atomic_print_state for planes
        drm: mali-dp: Enable power management for the device.
        drm: mali-dp: Update the state of all planes before re-enabling active CRTCs.
      97643d75
  6. 28 4月, 2017 1 次提交