1. 28 3月, 2013 1 次提交
    • D
      drm/i915: add pipe_config->timings_set · 7ae89233
      Daniel Vetter 提交于
      Only used by the lvds encoder. Note that we shouldn't do the same
      simple conversion with the FORCE_6BPC flag, since that's much better
      handled by moving all the pipe_bpc computation around.
      
      This requires that we pass the pipe config around to encoders, so
      that they can set special attributes and set constraints. To do so
      introduce a new ->compute_config encoder callback, which is called in
      stead of the drm crtc helper's ->mode_fixup.
      
      To avoid massive churn all over the codebase we don't want to convert
      all existing ->mode_fixup functions. Instead I've opted to convert
      them on an as-needed basis (mostly to cut down on rebase conflicts and
      to have more freedom to experiment around while developing the
      patches).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7ae89233
  2. 18 3月, 2013 1 次提交
  3. 06 3月, 2013 1 次提交
  4. 20 2月, 2013 1 次提交
    • M
      drm/i915: clean up panel fitter handling in lvds · 9d6d9f19
      Mika Kuoppala 提交于
      With the previous patch "drm/i915: disable shared panel fitter for
      pipe" we now disable the panel fitter at the right spot in the modeset
      sequence in the crtc functions on all platforms. Hence the disabling
      in intel_disable_lvds is no longer required and potentially harmful
      (since the plane is still enabled at this point).
      
      Similarly on the enabling side we enable the panel fitter in the lvds
      callback only once the plane is enabled. Which is too late. Hence move
      this into a new intel_pre_enable_lvds callback.
      
      Finally we can ditch lvds_encoder->pfit_dirty - this was required to
      work around the crtc helper semantics, but with the new i915 modeset
      infrastructure we should enable/disable the pfit only when enabling or
      disabling the entire output pipeline. So separate state tracking for
      the pfit is no longer required.
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      [danvet: Bikeshed the commit message a bit to stress that now we
      enable/disable the pfit on i9xx platforms at the right point of time
      compared to the old code.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9d6d9f19
  5. 14 2月, 2013 2 次提交
    • 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
    • D
      drm/i915: rip out helper->disable noop functions · af5676f1
      Daniel Vetter 提交于
      Now that the driver is in control of whether it needs to disable
      everything at take-over or not, we can rip this all out.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      af5676f1
  6. 21 1月, 2013 1 次提交
    • D
      drm/i915: use drm_modeset_lock_all · a0e99e68
      Daniel Vetter 提交于
      Two exceptions:
      - debugfs files only read information which is not related to crtc, so
        can stay on the modeset_config lock.
      - Same holds for the edp vdd work in intel_dp.c. Add a corresponding
        WARN_ON and a comment next to the intel_dp struct fields for
        documentation.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a0e99e68
  7. 07 1月, 2013 1 次提交
  8. 21 12月, 2012 1 次提交
  9. 29 11月, 2012 6 次提交
  10. 23 11月, 2012 2 次提交
  11. 22 11月, 2012 1 次提交
  12. 27 10月, 2012 1 次提交
  13. 23 10月, 2012 8 次提交
  14. 20 10月, 2012 1 次提交
  15. 03 10月, 2012 2 次提交
  16. 18 9月, 2012 1 次提交
    • D
      drm/i915: fix OOPS in lid_notify · 3b7a89fc
      Daniel Vetter 提交于
      This goes back to
      
      commit c1c7af60
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Thu Sep 10 15:28:03 2009 -0700
      
          drm/i915: force mode set at lid open time
      
      It was used to fix an issue on a i915GM based Thinkpad X41, which
      somehow clobbered the modeset state at lid close time. Since then
      massive amounts of things changed: Tons of fixes to the modeset
      sequence, OpRegion support, better integration with the acpi code.
      Especially OpRegion /should/ allow us to control the display hw
      cooperatively with the firmware, without the firmware clobbering the
      hw state behind our backs.
      
      So it's dubious whether we still need this.
      
      The second issue is that it's unclear who's responsibility it actually
      is to restore the mode - Chris Wilson suggests to just emit a hotplug
      event and let userspace figure things out.
      
      The real reason I've stumbled over this is that the new modeset code
      breaks drm_helper_resume_force_mode - it OOPSes derefing a NULL vfunc
      pointer. The reason this wasn't caught in testing earlier is that in
      
      commit c9354c85
      Author: Linus Torvalds <torvalds@linux-foundation.org>
      Date:   Mon Nov 2 09:29:55 2009 -0800
      
          i915: fix intel graphics suspend breakage due to resume/lid event
          confusion
      
      logic was added to _not_ restore the modeset state after a resume. And
      since most machines are configured to auto-suspend on lid-close, this
      neatly papered over the issue.
      
      Summarizing, this shouldn't be required on any platform supporting
      OpRegion. And none of the really old machines I have here seem to
      require it either. Hence I'm inclined to just rip it out.
      
      But in case that there are really firmwares out there that clobber the
      hw state, replace it with a call to intel_modset_check_state. This
      will ensure that we catch any issues as soon as they happen.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3b7a89fc
  17. 06 9月, 2012 6 次提交
  18. 24 8月, 2012 1 次提交
    • C
      i915: Quirk no_lvds on Gigabyte GA-D525TUD ITX motherboard · a51d4ed0
      Calvin Walton 提交于
      This board is incorrectly detected as having an LVDS connector,
      resulting in the VGA output (the only available output on the board)
      showing the console only in the top-left 1024x768 pixels, and an extra
      LVDS connector appearing in X.
      
      It's a desktop Mini-ITX board using an Atom D525 CPU with an NM10
      chipset.
      
      I've had this board for about a year, but this is the first time I
      noticed the issue because I've been running it headless for most of its
      life.
      Signed-off-by: NCalvin Walton <calvin.walton@kepstin.ca>
      a51d4ed0
  19. 26 7月, 2012 1 次提交
    • D
      drm/i915: simplify possible_clones computation · 66a9278e
      Daniel Vetter 提交于
      Intel hw only has one MUX for encoders, so outputs are either not
      cloneable or all in the same group of cloneable outputs. This neatly
      simplifies the code and allows us to ditch some ugly if cascades in
      the dp and hdmi init code (well, we need these if cascades for other
      stuff still, but that can be taken care of in follow-up patches).
      
      Note that this changes two things:
      - dvo can now be cloned with sdvo, but dvo is gen2 whereas sdvo is
        gen3+, so no problem. Note that the old code had a bug and didn't
        allow cloning crt with dvo (but only the other way round).
      - sdvo-lvds can now be cloned with sdvo-non-tv. Spec says this won't
        work, but the only reason I've found is that you can't use the
        panel-fitter (used for lvds upscaling) with anything else. But we
        don't use the panel fitter for sdvo-lvds. Imo this part of Bspec is
        a) rather confusing b) mostly as a guideline to implementors (i.e.
        explicitly stating what is already implicit from the spec, without
        always going into the details of why). So I think we can ignore this
        - worst case we'll get a bug report from a user with with sdvo-lvds
        and sdvo-tmds and have to add that special case back in.
      
      Because sdvo lvds is a bit special explain in comments why sdvo LVDS
      outputs can be cloned, but native LVDS and eDP can't be cloned - we
      use the panel fitter for the later, but not for sdvo.
      
      Note that this also uncoditionally initializes the panel_vdd work used
      by eDP. Trying to be clever doesn't buy us anything (but strange bugs)
      and this way we can kill the is_edp check.
      
      v2: Incorporate review from Paulo
      - Add in a missing space.
      - Pimp comment message to address his concerns.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      66a9278e
  20. 25 7月, 2012 1 次提交
    • D
      drm/i915/lvds: ditch ->prepare special case · 520c41cf
      Daniel Vetter 提交于
      LVDS is the first output where dpms on/off and prepare/commit don't
      perfectly match. Now the idea behind this special case seems to be
      that for simple resolution changes on the LVDS we don't need to stop
      the pipe, because (at least on newer chips) we can adjust the panel
      fitter on the fly.
      
      There are a few problems with the current code though:
      - We still stop and restart the pipe unconditionally, because the crtc
        helper code isn't flexible enough.
      - We show some ugly flickering, especially when changing crtcs (this
        the crtc helper would actually take into account, but we don't
        implement the encoder->get_crtc callback required to make this work
        properly).
      
      So it doesn't even work as advertised. I agree that it would be nice
      to do resolution changes on LVDS (and also eDP) whithout blacking the
      screen where the panel fitter allows to do that. But imo we should
      implement this as a special case a few layers up in the mode set code,
      akin to how we already detect simple framebuffer changes (and only
      update the required registers with ->mode_set_base).
      
      Until this is all in place, make our lives easier and just rip it out.
      
      Also note that this seems to fix actual bugs with enabling the lvds
      output, see:
      
      http://lists.freedesktop.org/archives/intel-gfx/2012-July/018614.html
      
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Giacomo Comes <comes@naic.edu>
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Tested-by: NTakashi Iwai <tiwai@suse.de>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      520c41cf