1. 23 4月, 2013 5 次提交
  2. 22 4月, 2013 1 次提交
  3. 18 4月, 2013 10 次提交
    • J
      drm/i915: turbo & RC6 support for VLV v7 · 0a073b84
      Jesse Barnes 提交于
      Uses slightly different interfaces than other platforms.
      
      v2: track actual set freq, not requested (Rohit)
          fix debug prints in init code (Jesse)
      v3: don't write sleep reg (Jesse)
          re-add RC6 wake limit write (Ben)
          fixup thresholds to match other platforms (Ben)
          clean up mem freq calculation (Ben)
          clean up debug prints (Ben)
      v4: move defines from punit patch (Ville)
      v5: remove writes to nonexistent regs (Jesse)
          put RP and RC regs together (Jesse)
          fix RC6 enable (Jesse)
      v6: use correct fuse reads from NC (Jesse)
          split out min/max funcs for use in sysfs (Jesse)
          add debugfs & sysfs freq controls (Jesse)
      v7: update with Ben's hw_max changes (Jesse)
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: Ben Widawsky <ben@bwidawsk.net> (v6)
      [danvet: Follow checkpatch sugggestion to use min_t to avoid casting
      fun.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0a073b84
    • J
      drm/i915: VLV GPU frequency to opcode functions · 855ba3be
      Jesse Barnes 提交于
      When requesting frequency changes or querying status from the Punit, we
      need to use an opcode that corresponds to the frequency, taking into
      account the memory frequency.
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Acked-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      855ba3be
    • V
      drm/i915: Use alphabetical names for sprites · 06da8da2
      Ville Syrjälä 提交于
      Add sprite_name() macro which should be used with the kind of sprites
      that are fixed to pipes (gen4.5+).
      
      Also use dev_priv->num_plane to calculate the sprite index insted
      assuming two sprites per pipe. This should make it print the right
      name.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      06da8da2
    • P
      drm/i915: set CPT FDI RX polarity bits based on VBT · 3f704fa2
      Paulo Zanoni 提交于
      Check the VBT to see if the machine has inverted FDI RX polarity on
      CPT. Based on this bit, set the appropriate bit on the TRANS_CHICKEN2
      registers.
      
      This should fix some machines that were showing black screens on all
      outputs.
      
      Cc: stable@vger.kernel.org
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60029Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3f704fa2
    • E
      drm/i915: Add Reenable Timer to turn Hotplug Detection back on (v4) · ac4c16c5
      Egbert Eich 提交于
      We disable hoptplug detection when we encounter a hotplug event
      storm. Still hotplug detection is required on some outputs (like
      Display Port). The interrupt storm may be only temporary (on certain
      Dell Laptops for instance it happens at certain charging states of
      the system). Thus we enable it after a certain grace period (2 minutes).
      Should the interrupt storm persist it will be detected immediately
      and it will be disabled again.
      
      v2: Reordered drm_i915_private: moved hotplug_reenable_timer to hpd state tracker.
      v3: Clarified loop start value,
          Removed superfluous test for Ivybridge and Haswell,
          Restructured loop to avoid deep nesting (all suggested by Ville Syrjälä)
      v4: Fixed two bugs pointed out by Jani Nikula.
      Signed-off-by: NEgbert Eich <eich@suse.de>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ac4c16c5
    • E
      drm/i915: Add HPD IRQ storm detection (v5) · b543fb04
      Egbert Eich 提交于
      Add a hotplug IRQ storm detection (triggered when a hotplug interrupt
      fires more than 5 times / sec).
      Rationale:
      Despite of the many attempts to fix the problem with noisy hotplug
      interrupt lines we are still seeing systems which have issues:
      Once cause of noise seems to be bad routing of the hotplug line
      on the board: cross talk from other signals seems to cause erronous
      hotplug interrupts. This has been documented as an erratum for the
      the i945GM chipset and thus hotplug support was disabled for this
      chipset model but others seem to have this problem, too.
      
      We have seen this issue on a G35 motherboard for example:
      Even different motherboards of the same model seem to behave
      differently: while some only see only around 10-100 interrupts/s
      others seem to see 5k or more.
      We've also observed a dependency on the selected video mode.
      
      Also on certain laptops interrupt noise seems to occur duing
      battery charging when the battery is at a certain charge levels.
      
      Thus we add a simple algorithm here that detects an 'interrupt storm'
      condition.
      
      v2: Fixed comment.
      v3: Reordered drm_i915_private: moved hpd state tracking to hotplug work stuff.
      v4: Followed by Jesse Barnes to use a time_..() macro.
      v5: Fixed coding style as suggested by Jani Nikula.
      Signed-off-by: NEgbert Eich <eich@suse.de>
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b543fb04
    • V
      drm/i915: IVB/HSW have 32 fence register · 42b5aeab
      Ville Syrjälä 提交于
      Increase the number of fence registers to 32 on IVB/HSW. VLV however
      only has 16 fence registers according to the docs.
      
      Increasing the number of fences was attempted before [1], but there was
      some uncertainty about the maximum CPU fence number for FBC. Since then
      BSpec has been updated to state that there are in fact 32 fence registers,
      and the CPU fence number field in the SNB_DPFC_CTL_SA register is 5 bits,
      and the CPU fence number field in the ILK_DPFC_CONTROL register must be
      zero. So now it all makes sense.
      
      [1] http://lists.freedesktop.org/archives/intel-gfx/2011-October/012865.html
      
      v2: Include some background information based on the previous attempt
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      42b5aeab
    • B
      drm/i915: Better overclock support · 31c77388
      Ben Widawsky 提交于
      Most importantly this will allow users to set overclock frequencies in
      sysfs. Previously the max was limited by the RP0 max as opposed to the
      overclock max. This is useful if one wants to either limit the max
      overclock frequency, or set the minimum frequency to be in the overclock
      range. It also fixes an issue where if one sets the max frequency to be
      below the overclock max, they wouldn't be able to set back the proper
      overclock max.
      
      In addition I've added a couple of other bits:
      Show the overclock freq. as max in sysfs
      Print the overclock max in debugfs.
      Print a warning if the user sets the min frequency to be in the
      overclock range.
      
      In this patch I've decided to store the hw_max when we read it from the
      pcode at init. The reason I do this is the pcode reads can fail, and are
      slow.
      
      v2: Report when user requested overclocked max (Daniel)
      Remove when user sets min to overclock range (Daniel)
      
      Reported-by: freezer from #intel-gfx on irc
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      [danvet: Fixup the s/100MHz/50MHz/ confusion in an unrelated comment
      that Mika spotted.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      31c77388
    • B
      drm/i915: Allow PPGTT enable to fail · b7c36d25
      Ben Widawsky 提交于
      I'm really not happy that we have to support this, but this will be the
      simplest way to handle cases where PPGTT init can fail, which I promise
      will be coming in the future.
      
      v2: Resolve conflicts due to patch series reordering.
      
      Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v1)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b7c36d25
    • B
      drm/i915: Abstract PPGTT enabling · 6197349b
      Ben Widawsky 提交于
      Since we've already set up a nice vtable to abstract other PPGTT
      functions, also abstract the actual register programming to enable
      things.
      
      This function will probably need to change a bit as we implement real
      processes.
      
      v2: Resolve conflicts due to patch series reordering.
      
      Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v1)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6197349b
  4. 07 4月, 2013 1 次提交
    • B
      drm/i915: PCH_NOP · 40c7ead9
      Ben Widawsky 提交于
      Given certain fusing options discussed in the previous patch, it's
      possible to end up with platforms that normally have PCH but that PCH
      doesn't actually exist. In many cases, this is easily remedied with
      setting 0 pipes. This covers the other corners.
      
      Requiring this is a symptom of improper code splitting (using
      HAS_PCH_SPLIT instead of proper GEN checking, basically). I do not want
      to fix this.
      
      v2: Remove PCH reflck after change in previous patch (Daniel)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      40c7ead9
  5. 03 4月, 2013 3 次提交
  6. 02 4月, 2013 1 次提交
  7. 28 3月, 2013 3 次提交
  8. 27 3月, 2013 2 次提交
  9. 24 3月, 2013 1 次提交
  10. 23 3月, 2013 2 次提交
  11. 18 3月, 2013 1 次提交
  12. 05 3月, 2013 1 次提交
    • B
      drm/i915: Capture current context on error · 8c123e54
      Ben Widawsky 提交于
      On error, this represents the state of the currently running context at
      the time it was loaded.
      
      Unfortunately, since we're hung and can't switch out the context this
      may not tell us too much about the most current state of the context,
      but does give clues about what has happened since loading.
      
      Thanks to recent doc updates, we have a little more confidence regarding
      what is actually in this memory, and perhaps it will help us gain more
      insight into certain bugs. AFAICT, the most interesting info is in the
      first page. To save space, we only capture the first page. In the
      future, we might want to dump more.
      
      Sample of the relevant part of error state:
      render ring --- HW Context = 0x01b20000
      [0000] 00000000 1100105f 00002028 ffff0880
      [0010] 0000209c feff4040 000020c0 efdf0080
      [0020] 00002178 00000001 0000217c 00145855
      [0030] 00002310 00000000 00002314 00000000
      
      v2: Move error collection to the ring error code
      Change format of dump to not confuse intel_error_decode (Chris)
      Put the context error object with the others (Chris)
      Don't search bound_list instead of active_list (chris)
      
      v3: extract and flatten context recording (daniel)
      checkpatch related fixes for the copypasta in debugfs
      
      v4: bug in v3 (Daniel)
      -       if ((ring->id == RCS) && error->ccid)
      +       if ((ring->id != RCS) || !error->ccid)
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=55845
      Reviewed-by (v2): Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      [danvet: Bikeshed away the redudant parenthese around ring->id != RCS]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8c123e54
  13. 04 3月, 2013 1 次提交
  14. 21 2月, 2013 1 次提交
  15. 20 2月, 2013 2 次提交
  16. 15 2月, 2013 2 次提交
  17. 14 2月, 2013 1 次提交
    • Z
      i915: ignore lid open event when resuming · b8efb17b
      Zhang Rui 提交于
      i915 driver needs to do modeset when
      1. system resumes from sleep
      2. lid is opened
      
      In PM_SUSPEND_MEM state, all the GPEs are cleared when system resumes,
      thus it is the i915_resume code does the modeset rather than intel_lid_notify().
      
      But in PM_SUSPEND_FREEZE state, this will be broken because
      system is still responsive to the lid events.
      1. When we close the lid in Freeze state, intel_lid_notify() sets modeset_on_lid.
      2. When we reopen the lid, intel_lid_notify() will do a modeset,
         before the system is resumed.
      here is the error log,
      
      [92146.548074] WARNING: at drivers/gpu/drm/i915/intel_display.c:1028 intel_wait_for_pipe_off+0x184/0x190 [i915]()
      [92146.548076] Hardware name: VGN-Z540N
      [92146.548078] pipe_off wait timed out
      [92146.548167] Modules linked in: hid_generic usbhid hid snd_hda_codec_realtek snd_hda_intel snd_hda_codec parport_pc snd_hwdep ppdev snd_pcm_oss i915 snd_mixer_oss snd_pcm arc4 iwldvm snd_seq_dummy mac80211 snd_seq_oss snd_seq_midi fbcon tileblit font bitblit softcursor drm_kms_helper snd_rawmidi snd_seq_midi_event coretemp drm snd_seq kvm btusb bluetooth snd_timer iwlwifi pcmcia tpm_infineon i2c_algo_bit joydev snd_seq_device intel_agp cfg80211 snd intel_gtt yenta_socket pcmcia_rsrc sony_laptop agpgart microcode psmouse tpm_tis serio_raw mxm_wmi soundcore snd_page_alloc tpm acpi_cpufreq lpc_ich pcmcia_core tpm_bios mperf processor lp parport firewire_ohci firewire_core crc_itu_t sdhci_pci sdhci thermal e1000e
      [92146.548173] Pid: 4304, comm: kworker/0:0 Tainted: G        W    3.8.0-rc3-s0i3-v3-test+ #9
      [92146.548175] Call Trace:
      [92146.548189]  [<c10378e2>] warn_slowpath_common+0x72/0xa0
      [92146.548227]  [<f86398b4>] ? intel_wait_for_pipe_off+0x184/0x190 [i915]
      [92146.548263]  [<f86398b4>] ? intel_wait_for_pipe_off+0x184/0x190 [i915]
      [92146.548270]  [<c10379b3>] warn_slowpath_fmt+0x33/0x40
      [92146.548307]  [<f86398b4>] intel_wait_for_pipe_off+0x184/0x190 [i915]
      [92146.548344]  [<f86399c2>] intel_disable_pipe+0x102/0x190 [i915]
      [92146.548380]  [<f8639ea4>] ? intel_disable_plane+0x64/0x80 [i915]
      [92146.548417]  [<f8639f7c>] i9xx_crtc_disable+0xbc/0x150 [i915]
      [92146.548456]  [<f863ebee>] intel_crtc_update_dpms+0x5e/0x90 [i915]
      [92146.548493]  [<f86437cf>] intel_modeset_setup_hw_state+0x42f/0x8f0 [i915]
      [92146.548535]  [<f8645b0b>] intel_lid_notify+0x9b/0xc0 [i915]
      [92146.548543]  [<c15610d3>] notifier_call_chain+0x43/0x60
      [92146.548550]  [<c105d1e1>] __blocking_notifier_call_chain+0x41/0x80
      [92146.548556]  [<c105d23f>] blocking_notifier_call_chain+0x1f/0x30
      [92146.548563]  [<c131a684>] acpi_lid_send_state+0x78/0xa4
      [92146.548569]  [<c131aa9e>] acpi_button_notify+0x3b/0xf1
      [92146.548577]  [<c12df56a>] ? acpi_os_execute+0x17/0x19
      [92146.548582]  [<c12e591a>] ? acpi_ec_sync_query+0xa5/0xbc
      [92146.548589]  [<c12e2b82>] acpi_device_notify+0x16/0x18
      [92146.548595]  [<c12f4904>] acpi_ev_notify_dispatch+0x38/0x4f
      [92146.548600]  [<c12df0e8>] acpi_os_execute_deferred+0x20/0x2b
      [92146.548607]  [<c1051208>] process_one_work+0x128/0x3f0
      [92146.548613]  [<c1564f73>] ? common_interrupt+0x33/0x38
      [92146.548618]  [<c104f8c0>] ? wake_up_worker+0x30/0x30
      [92146.548624]  [<c12df0c8>] ? acpi_os_wait_events_complete+0x1e/0x1e
      [92146.548629]  [<c10524f9>] worker_thread+0x119/0x3b0
      [92146.548634]  [<c10523e0>] ? manage_workers+0x240/0x240
      [92146.548640]  [<c1056e84>] kthread+0x94/0xa0
      [92146.548647]  [<c1060000>] ? ftrace_raw_output_sched_stat_runtime+0x70/0xf0
      [92146.548652]  [<c15649b7>] ret_from_kernel_thread+0x1b/0x28
      [92146.548658]  [<c1056df0>] ? kthread_create_on_node+0xc0/0xc0
      
      three different modeset flags are introduced in this patch
      MODESET_ON_LID_OPEN: do modeset on next lid open event
      MODESET_DONE:  modeset already done
      MODESET_SUSPENDED:  suspended, only do modeset when system is resumed
      
      In this way,
      1. when lid is closed, MODESET_ON_LID_OPEN is set so that
         we'll do modeset on next lid open event.
      2. when lid is opened, MODESET_DONE is set
         so that duplicate lid open events will be ignored.
      3. when system suspends, MODESET_SUSPENDED is set.
         In this case, we will not do modeset on any lid events.
      
      Plus, locking mechanism is also introduced to avoid racing.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b8efb17b
  18. 31 1月, 2013 2 次提交