23 Apr, 2014

1 commit

  • ... our current modeset code isn't good enough yet to handle this. The
    scenario is:

    1. BIOS sets up a cloned config with lvds+external screen on the same
    pipe, e.g. pipe B.

    2. We read out that state for pipe B and assign the gmch_pfit state to
    it.

    3. The initial modeset switches the lvds to pipe A but due to lack of
    atomic modeset we don't recompute the config of pipe B.

    -> both pipes now claim (in the sw pipe config structure) to use the
    gmch_pfit, which just won't work.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74081
    Tested-by: max
    Cc: Alan Stern
    Cc: stable@vger.kernel.org
    Signed-off-by: Daniel Vetter
    Signed-off-by: Jani Nikula

    Daniel Vetter
     

02 Apr, 2014

1 commit

  • Atm we reserve/allocate and free the power context during GT power
    enable/disable time. There is no need to do this, we can reserve/allocate
    the buffer once during driver loading and free it during driver cleanup.
    The re-reservation can also fail in case the driver previously manages to
    allocate something on the given fixed address.

    The buffer isn't exepected to move even if allocated by the BIOS, for
    safety add an assert to check this assumption.

    This also fixed a bug for Ville, where re-reserving the context failed
    during a GPU reset (I assume because something else got allocated on its
    fixed address).

    Tested-by: Ville Syrjälä
    Signed-off-by: Imre Deak
    Reviewed-by: Ville Syrjälä
    Signed-off-by: Daniel Vetter

    Imre Deak
     

21 Mar, 2014

1 commit

  • With this patch we allow larger cursor planes of sizes 128x128
    and 256x256.

    v2: Added more precise check on size while setting cursor plane.

    v3: Changes related to restructuring cursor size restrictions
    and DRM_DEBUG usage.

    v4: Indentation related changes for setting cursor control and
    implementing DRM_CAP_CURSOR_WIDTH and DRM_CAP_CURSOR_HEIGHT

    Testcase: igt/kms_cursor_crc
    Cc: Daniel Vetter
    Cc: Jani Nikula
    Cc: David Airlie
    Cc: dri-devel@lists.freedesktop.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: G, Pallavi
    Signed-off-by: Sagar Kamble
    Reviewed-by: Imre Deak
    Signed-off-by: Daniel Vetter

    Sagar Kamble
     

19 Mar, 2014

5 commits

  • After we removed all the intermediate abstractions, we can rename
    these functions to just hsw_{en,dis}able_pc8.

    v2: - Rebase.

    Reviewed-by: Jesse Barnes
    Signed-off-by: Paulo Zanoni
    Signed-off-by: Daniel Vetter

    Paulo Zanoni
     
  • When other platforms add runtime PM support they will also need to
    disable interrupts, so move the variable to the runtime PM struct.

    Also notice that the longer-term goal is to completely kill the
    regsave struct, and I even have patches for that.

    v2: - Rebase.
    v3: - Rebase.

    Reviewed-by: Jesse Barnes
    Signed-off-by: Paulo Zanoni
    Signed-off-by: Daniel Vetter

    Paulo Zanoni
     
  • Because we already get/put runtime PM every time we get/put any power
    domain, and now PC8 and runtime PM are the same thing.

    With this, we can also now kill the hsw_{en,dis}able_package_c8
    functions.

    v2: - Rebase.
    v3: - Rebase.
    v4: - Rebase.

    Reviewed-by: Jesse Barnes
    Signed-off-by: Paulo Zanoni
    Signed-off-by: Daniel Vetter

    Paulo Zanoni
     
  • Currently, when our driver becomes idle for i915.pc8_timeout (default:
    5s) we enable PC8, so we save some power, but not everything we can.
    Then, while PC8 is enabled, if we stay idle for more
    autosuspend_delay_ms (default: 10s) we'll enter runtime PM and put the
    graphics device in D3 state, saving even more power. The two features
    are separate things with increasing levels of power savings, but if we
    disable PC8 we'll never get into D3.

    While from the modularity point of view it would be nice to keep these
    features as separate, we have reasons to merge them:
    - We are not aware of anybody wanting a "PC8 without D3" environment.
    - If we keep both features as separate, we'll have to to test both
    PC8 and PC8+D3 code paths. We're already having a major pain to
    make QA do automated testing of just one thing, testing both paths
    will cost even more.
    - Only Haswell+ supports PC8, so if we want to add runtime PM support
    to, for example, IVB, we'll have to copy some code from the PC8
    feature to runtime PM, so merging both features as a single thing
    will make it easier for enabling runtime PM on other platforms.

    This patch only does the very basic steps required to have PC8 and
    runtime PM merged on a single feature: the next patches will take care
    of cleaning up everything.

    v2: - Rebase.
    v3: - Rebase.
    - Fully remove the deprecated i915 params since Daniel doesn't
    consider them as part of the ABI.
    v4: - Rebase.
    - Fix typo in the commit message.
    v5: - Rebase, again.
    - Add a huge comment explaining the different forcewake usage
    (Chris, Daniel).
    - Use open-coded forcewake functions (Daniel).

    Signed-off-by: Paulo Zanoni
    Reviewed-by: Imre Deak
    Signed-off-by: Daniel Vetter

    Paulo Zanoni
     
  • Conflicts:
    drivers/gpu/drm/i915/intel_dp.c

    A bit a mess with reverts which differe in details between -fixes and
    -next and some other unrelated shuffling.

    Signed-off-by: Daniel Vetter

    Daniel Vetter
     

18 Mar, 2014

4 commits

  • This is a small follow-up fix to the series of eDP VDD back and forth
    we've had recently. This is effectively a combined revert of three
    commits:

    commit 2c2894f698fffd8ff53e1e1d3834f9e1035b1f39
    Author: Paulo Zanoni
    Date: Fri Mar 7 20:05:20 2014 -0300

    drm/i915: properly disable the VDD when disabling the panel

    commit b3064154dfd37deb386b1e459c54e1ca2460b3d5
    Author: Patrik Jakobsson
    Date: Tue Mar 4 00:42:44 2014 +0100

    drm/i915: Don't just say it, actually force edp vdd

    commit dff392dbd258381a6c3164f38420593f2d291e3b
    Author: Paulo Zanoni
    Date: Fri Dec 6 17:32:41 2013 -0200

    drm/i915: don't touch the VDD when disabling the panel

    which shows that we're pretty close back to where we started
    already. The first two were basically reverting the last, but missing
    the WARN. Add that back. We also OCD the intel_ prefix back to
    intel_edp_panel_vdd_on() which was lost somewhere in between. The circle
    closes.

    For future reference, "drm/i915: don't touch the VDD when disabling the
    panel" failed to take into account

    commit 6cb49835da0426f69a2931bc2a0a8156344b0e41
    Author: Daniel Vetter
    Date: Sun May 20 17:14:50 2012 +0200

    drm/i915: enable vdd when switching off the eDP panel

    and

    commit 35a38556d900b9cb5dfa2529c93944b847f8a8a4
    Author: Daniel Vetter
    Date: Sun Aug 12 22:17:14 2012 +0200

    drm/i915: reorder edp disabling to fix ivb MacBook Air

    Cc: Patrik Jakobsson
    Cc: Paulo Zanoni
    Signed-off-by: Jani Nikula
    Signed-off-by: Daniel Vetter

    Jani Nikula
     
  • Commit b3064154dfd37deb386b1e459c54e1ca2460b3d5 tried to revert commit
    dff392dbd258381a6c3164f38420593f2d291e3b, but wasn't complete, which
    resulted in regressions on Haswell. So this commit should fix
    b3064154dfd37deb386b1e459c54e1ca2460b3d5 by undoing what it did and
    providing an actual complete revert of
    dff392dbd258381a6c3164f38420593f2d291e3b.

    Fixes regression introduced by:
    commit b3064154dfd37deb386b1e459c54e1ca2460b3d5
    Author: Patrik Jakobsson
    Date: Tue Mar 4 00:42:44 2014 +0100
    drm/i915: Don't just say it, actually force edp vdd

    Testcase: igt/pm_pc8
    Signed-off-by: Paulo Zanoni
    Tested-by: Patrik Jakobsson
    Signed-off-by: Daniel Vetter

    Paulo Zanoni
     
  • The functionality remains largerly the same. The main difference is that
    i2c-over-aux defer timeouts are increased to be safe for all use cases
    instead of depending on DP device type and properties.

    Signed-off-by: Jani Nikula
    Reviewed-by: Rodrigo Vivi
    Signed-off-by: Daniel Vetter

    Jani Nikula
     
  • Functionality remains largely the same as before.

    Note that the retry loops and native reply handling all moved into the
    core drm helper functions now.

    Signed-off-by: Jani Nikula
    [danvet: Fix up the stray ; Rodrigo spotted in his review and add a
    note to the commit message to answer Rodrigo's question in his review.]
    Reviewed-by: Rodrigo Vivi
    Signed-off-by: Daniel Vetter

    Jani Nikula
     

11 Mar, 2014

1 commit

  • Currently we allow encoders to indicate whether they can be part of a
    cloned set with just one flag. That's not flexible enough to describe
    the actual hardware capabilities. Instead make it a bitmask of encoder
    types with which the current encoder can be cloned.

    For now we set the bitmask to allow DVO+DVO and DVO+VGA, which should
    match what the old boolean flag allowed. We will add some more cloning
    options in the future.

    Note that this patch also removes the encoder.possible_clones setting
    from encoder setup code - we compute this dynamically.

    Signed-off-by: Ville Syrjälä
    Reviewed-by: Rodrigo Vivi
    [danvet: Add Ville's explanation why removing the encoder
    possible_clones is save.]
    Signed-off-by: Daniel Vetter

    Ville Syrjälä
     

08 Mar, 2014

5 commits

  • By stuffing the fb allocation into the crtc, we get mode set lifetime
    refcounting for free, but have to handle the initial pin & fence
    slightly differently. It also means we can move the shared fb handling
    into the core rather than leaving it out in the fbdev code.

    v2: null out crtc->fb on error (Daniel)
    take fbdev fb ref and remove unused error path (Daniel)

    Requested-by: Daniel Vetter
    Signed-off-by: Jesse Barnes
    Signed-off-by: Daniel Vetter

    Jesse Barnes
     
  • Retrieve current framebuffer config info from the regs and create an fb
    object for the buffer the BIOS or boot loader left us. This should
    allow for smooth transitions to userspace apps once we finish the
    initial configuration construction.

    v2: check for non-native modes and adjust (Jesse)
    fixup aperture and cmap frees (Imre)
    use unlocked unref if init_bios fails (Jesse)
    fix curly brace around DSPADDR check (Imre)
    comment failure path for pin_and_fence (Imre)
    v3: fixup fixup of aperture frees (Chris)
    v4: update to current bits (locking & pin_and_fence hack) (Jesse)
    v5: move fb config fetch to display code (Jesse)
    re-order hw state readout on initial load to suit fb inherit (Jesse)
    re-add pin_and_fence in fbdev code to make sure we refcount properly (Je
    v6: rename to plane_config (Daniel)
    check for valid object when initializing BIOS fb (Jesse)
    split from plane_config readout and other display changes (Jesse)
    drop use_bios_fb option (Chris)
    update comments (Jesse)
    rework fbdev_init_bios for clarity (Jesse)
    drop fb obj ref under lock (Chris)
    v7: use fb object from plane_config instead (Ville)
    take ref on fb object (Jesse)
    v8: put under i915_fastboot option (Jesse)
    fix fb ptr checking (Jesse)
    inform drm_fb_helper if we fail to enable a connector (Jesse)
    drop unnecessary enabled[] modifications in failure cases (Chris)
    split from BIOS connector config readout (Daniel)
    don't memset the fb buffer if preallocated (Chris)
    alloc ifbdev up front and pass to init_bios (Chris)
    check for bad ifbdev in restore_mode too (Chris)
    v9: fix up !fastboot bpp setting (Jesse)
    fix up !fastboot helper alloc (Jesse)
    make sure BIOS fb is sufficient for biggest active pipe (Jesse)
    v10:fix up size calculation for proposed fbs (Chris)
    go back to two pass pipe fb assignment (Chris)
    add warning for active pipes w/o fbs (Chris)
    clean up num_pipes checks in fbdev_init and fbdev_restore_mode (Chris)
    move i915.fastboot into fbdev_init (Chris)
    v11:make BIOS connector config usage unconditional (Daniel)
    v12:fix up fb vs pipe size checking (Chris)

    Signed-off-by: Jesse Barnes
    Signed-off-by: Daniel Vetter

    Jesse Barnes
     
  • Early at init time, we can try to read out the plane config structure
    and try to preserve it if possible.

    v2: alloc fb obj at init time after fetching plane config

    Signed-off-by: Jesse Barnes
    Signed-off-by: Daniel Vetter

    Jesse Barnes
     
  • Based on an early draft from Jesse.

    Add support for powering on/off the dynamic power wells on VLV by
    registering its display and dpio dynamic power wells with the power
    domain framework.

    For now power on all PHY TX lanes regardless of the actual lane
    configuration. Later this can be optimized when the PHY side setup
    enables only the required lanes. Atm, it enables all lanes in all
    cases.

    v2:
    - undef function local COND macro after its last use (Ville)
    - Take dev_priv->irq_lock around the whole sequence of
    intel_set_cpu_fifo_underrun_reporting_nolock() and
    valleyview_disable_display_irqs(). They are short and releasing
    the lock in between only makes proving correctness more difficult.
    - sanitize local var names in vlv_power_well_enabled()
    v3:
    - rebase on latest -nightly

    Signed-off-by: Imre Deak
    Reviewed-by: Jesse Barnes
    [danvet: Resolve conflict due to my changes in the previous patch.
    Also throw in an assert_spin_locked for safety. And finally appease
    checkpatch.]
    Signed-off-by: Daniel Vetter

    Imre Deak
     
  • Parts that poke port specific HW blocks like the encoder HW state
    readout or connector hotplug detect code need a way to check whether
    required power domains are on or enable/disable these. For this purpose
    add a set of power domains that refer to the port HW blocks. Get the
    proper port power domains during modeset.

    For now when requesting the power domain for a DDI port get it for a 4
    lane configuration. This can be optimized later to request only the 2
    lane power domain, when proper support is added on the VLV PHY side for
    this. Atm, the PHY setup code assumes a 4 lane config in all cases.

    Signed-off-by: Imre Deak
    Reviewed-by: Jesse Barnes
    Signed-off-by: Daniel Vetter

    Imre Deak
     

06 Mar, 2014

1 commit


14 Feb, 2014

1 commit

  • Since

    commit d9255d57147e1dbcebdf6670409c2fa0ac3609e6
    Author: Paulo Zanoni
    Date:   Thu Sep 26 20:05:59 2013 -0300

    it became clear that we need to separate the unload sequence into two
    parts:

    1. remove all interfaces through which new operations on some object
    (crtc, encoder, connector) can be started and make sure all pending
    operations are completed
    2. do the actual tear down of the internal representation of the above
    objects

    The above commit achieved this separation for connectors by splitting
    out the sysfs removal part from the connector's destroy callback and
    doing this removal before calling drm_mode_config_cleanup() which does
    the actual tear-down of all the drm objects.

    Since we'll have to customize the interface removal part for different
    types of connectors in the upcoming patches, add a new unregister
    callback and move the interface removal part to it.

    No functional change.

    Signed-off-by: Imre Deak
    Reviewed-by: Antti Koskipää
    Signed-off-by: Daniel Vetter

    Imre Deak
     

13 Feb, 2014

5 commits

  • We want to reuse this in the fbdev initial config code independently
    from any fastboot hacks. So allow a bit more flexibility.

    v2: Forgot to git add ...
    v3: make non-static (Jesse)

    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • Instead of modifying intel_panel in lvds_init_connector/dsi_init/
    edp_init_connector, making changes to move intel_panel->downclock_mode
    initialization to intel_panel_init()

    v2: Jani's review comments incorporated
    Removed downclock_mode local variable in dsi_init and
    edp_init_connector

    Signed-off-by: Vandana Kannan
    Signed-off-by: Pradeep Bhat
    Reviewed-by: Jani Nikula
    Signed-off-by: Daniel Vetter

    Vandana Kannan
     
  • In Jesse's patch to switch the fbdev framebuffer from an embedded
    struct to a pointer the kfree in case of an error was missed. Fix this
    up by using our own internal fb allocation helper directly instead of
    reinventing that wheel.

    We need a to_intel_framebuffer cast unfortunately since all the other
    callers of _create still look better whith using a drm_framebuffer as
    return pointer.

    v2: Add an unlocked __intel_framebuffer_create function since our
    dev->struct_mutex locking is too much a mess. With ppgtt we even need
    it to take a look at the global gtt offset of pinned objects, since
    the vma list might chance from underneath us. At least with the
    current global gtt lookup functions. Reported by Mika.

    Cc: Mika Kuoppala
    Cc: Jesse Barnes
    Reviewed-by: Jesse Barnes
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • Now that it's a normally kmalloce buffer we can use the usual cleanup
    paths. The upside here is that if we get the refcounting wrong will be
    able to catch it, since the drm core will complain about leftover
    framebuffers and kref about underflows.

    v2: Kill intel_framebuffer_fini - no longer needed now that we
    refcount all fbs properly and only confusing.

    v3: We actually still need to call unregister_private to remove the fb
    from the idr and drop the idr reference - the final unref doesn't do
    that. So much for remembering my own fb liftime rules. Reported by
    Imre Deak.

    Cc: Jesse Barnes
    Reviewed-by: Jesse Barnes (v2)
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • Allocate this struct instead, so we can re-use another allocated
    elsewhere if needed.

    Signed-off-by: Jesse Barnes
    [danvet: WARN_ON if there's no backing storage attached to an fb,
    that's a bug.]
    Signed-off-by: Daniel Vetter

    Jesse Barnes
     

27 Jan, 2014

1 commit

  • This debugfs interface will allow intel-gpu-tools test case
    to verify if screen has been updated properly on cases like PSR.

    v2: Accepted all Daniel's suggestions:
    * grab modeset lock
    * loop over connector and check DPMS on
    * return errors
    * use _eDP1 suffix for easy future extension
    * don't cache crc_supported neither latest crc
    * return crc as a full array and read it at once with aux.
    * use 0 to turn TEST_SINK off.
    * split the drm_helpers definitions in another patch.

    v3: Accepted 2 Damien's suggestion: remove h from printf hexa
    and return ENODEV when eDP not present instead of EAGAIN.

    v4: Accepted 2 Jani' s suggestion: 1 path for unlock and remove
    _retry from aux read.

    v5: removing last missing useless _retry (by Damien)

    Cc: Daniel Vetter
    Cc: Damien Lespiau
    Cc: Jani Nikula
    Signed-off-by: Rodrigo Vivi
    Reviewed-by: Damien Lespiau
    Signed-off-by: Daniel Vetter

    Rodrigo Vivi
     

25 Jan, 2014

7 commits

  • We need a bit more flexibility here in the future, bits get shuffled
    around.

    v2: more descriptive commit message (Jani Nikula)

    Reviewed-by: Jani Nikula
    Signed-off-by: Damien Lespiau
    Signed-off-by: Daniel Vetter

    Damien Lespiau
     
  • A tiny clean-up to allow better code separation between platforms.

    v2: Fix comment placement (put in in i9xx_get_aux_clock_divider()) and
    nuke the outdated PCH eDP comment (Jani Nikula)

    Signed-off-by: Damien Lespiau
    Reviewed-by: Jani Nikula
    Signed-off-by: Daniel Vetter

    Damien Lespiau
     
  • For HSW+ platforms, enable the 5.4Ghz (HBR2) link rate for devices that support it. The
    sink device must report that is supports Displayport 1.2 and the HBR2 bit rate in the
    DPCD in order to use HBR2.

    Signed-off-by: Todd Previte
    Signed-off-by: Daniel Vetter

    Todd Previte
     
  • They now also work on vlv, which has the regs somewhere else. And
    daring a glance into the looking glass it seems like this
    functionality will continue to work the same for the next few hardware
    platforms.

    So it's better to just remove that misleading prefix and have a bit
    shorter code for better readability.

    The only exceptions are the panel/backlight functions shared with
    intel_ddi.c, those get an intel_ prefix.

    While at it make the vdd_on/off functions static.

    And one straggler was missing the edp_ in the name, so make everything
    neatly OCD.

    Cc: Paulo Zanoni
    Cc: Jani Nikula
    Reviewed-by: Jani Nikula
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • The eDP spec defines some points where after you do action A, you have
    to wait some time before action B. The thing is that in our driver
    action B does not happen exactly after action A, but we still use
    msleep() calls directly. What this patch does is that we record the
    timestamp of when action A happened, then, just before action B, we
    look at how much time has passed and only sleep the remaining amount
    needed.

    With this change, I am able to save about 5-20ms (out of the total
    200ms) of the backlight_off delay and completely skip the 1ms
    backlight_on delay. The 600ms vdd_off delay doesn't happen during
    normal usage anymore due to a previous patch.

    v2: - Rename ironlake_wait_jiffies_delay to intel_wait_until_after and
    move it to intel_display.c
    - Fix the msleep call: diff is in jiffies
    v3: - Use "tmp_jiffies" so we don't need to worry about the value of
    "jiffies" advancing while we're doing the math.
    v4: - Rename function again.
    - Move function to i915_drv.h.
    - Store last_power_cycle at edp_panel_off too.
    - Use msecs_to_jiffies_timeout, then replace the msleep with an
    open-coded version that avoids the extra +1 jiffy.
    - Try to add units to every variable name so we don't confuse
    jiffies with milliseconds.

    Signed-off-by: Paulo Zanoni
    Reviewed-by: Jani Nikula
    Signed-off-by: Daniel Vetter

    Paulo Zanoni
     
  • Add a new_config pointer to intel_crtc which will point to the new pipe
    config for said crtc while intel_crtc.config will still contain the old
    config during first parts of the modeset operation. This is a step
    towards having the entire new state available during the compute phase,
    so that we can make accurate decisions about global resource usage.

    Signed-off-by: Ville Syrjälä
    Reviewed-by: Imre Deak
    Signed-off-by: Daniel Vetter

    Ville Syrjälä
     
  • Add 'new_enabled' to intel_crtc and precompute it alongside new_encoder
    and new_crtc. This will allow making decisions about shared resources
    that are affected by the set of active pipes, before we've clobbered
    anything for real.

    Signed-off-by: Ville Syrjälä
    Reviewed-by: Imre Deak
    Signed-off-by: Daniel Vetter

    Ville Syrjälä
     

22 Jan, 2014

1 commit

  • On older generations (gen2, gen3) the GPU requires fences for many
    operations, such as blits. The display hardware also requires fences for
    scanouts and this leads to a situation where an arbitrary number of
    fences may be pinned by old scanouts following a pageflip but before we
    have executed the unpin workqueue. This is unpredictable by userspace
    and leads to random EDEADLK when submitting an otherwise benign
    execbuffer. However, we can detect when we have an outstanding flip and
    so cause userspace to wait upon their completion before finally
    declaring that the system is starved of fences. This is really no worse
    than forcing the GPU to stall waiting for older execbuffer to retire and
    release their fences before we can reallocate them for the next
    execbuffer.

    v2: move the test for a pending fb unpin to a common routine for
    later reuse during eviction

    Reported-and-tested-by: dimon@gmx.net
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73696
    Signed-off-by: Chris Wilson
    Reviewed-by: Jon Bloomfield
    Signed-off-by: Daniel Vetter

    Chris Wilson
     

17 Jan, 2014

1 commit

  • Conflicts are getting out of hand, and now we have to shuffle even
    more in -next which was also shuffled in -fixes (the call for
    drm_mode_config_reset needs to move yet again).

    So do a proper backmerge. I wanted to wait with this for the 3.13
    relaese, but alas let's just do this now.

    Conflicts:
    drivers/gpu/drm/i915/i915_reg.h
    drivers/gpu/drm/i915/intel_ddi.c
    drivers/gpu/drm/i915/intel_display.c
    drivers/gpu/drm/i915/intel_pm.c

    Besides the conflict around the forcewake get/put (where we chaged the
    called function in -fixes and added a new parameter in -next) code all
    the current conflicts are of the adjacent lines changed type.

    Signed-off-by: Daniel Vetter

    Daniel Vetter
     

11 Jan, 2014

2 commits


12 Dec, 2013

2 commits

  • The first piece, intel_ddi_pll_select, finds a PLL and assigns it to
    the CRTC, but doesn't write any register. It can also fail in case it
    doesn't find a PLL.

    The second piece, intel_ddi_pll_enable, uses the information stored by
    intel_ddi_pll_select to actually enable the PLL by writing to its
    register. This function can't fail. We also have some refcount sanity
    checks here.

    The idea is that one day we'll remove all the functions that touch
    registers from haswell_crtc_mode_set to haswell_crtc_enable, so we'll
    call intel_ddi_pll_select at haswell_crtc_mode_set and then call
    intel_ddi_pll_enable at haswell_crtc_enable. Since I'm already
    touching this code, let's take care of this particular split today.

    v2: - Clock on the debug message is in KHz
    - Add missing POSTING_READ

    Signed-off-by: Paulo Zanoni
    Reviewed-by: Damien Lespiau
    [danvet: Bikeshed comments.]
    Signed-off-by: Daniel Vetter

    Paulo Zanoni
     
  • It was supposed to have been killed on the same commit that killed the
    function, e1264ebe9ff48e1b3e1dd11805eec9f5b143ab7c, but I guess the
    intel_drv.h reorganization accidentally brought it back.

    Signed-off-by: Paulo Zanoni
    Reviewed-by: Damien Lespiau
    Signed-off-by: Daniel Vetter

    Paulo Zanoni
     

11 Dec, 2013

1 commit

  • This patch adds the initial infrastructure to allow a Runtime PM
    implementation that sets the device to its D3 state. The patch just
    adds the necessary callbacks and the initial infrastructure.

    We still don't have any platform that actually uses this
    infrastructure, we still don't call get/put in all the places we need
    to, and we don't have any function to save/restore the state of the
    registers. This is not a problem since no platform uses the code added
    by this patch. We have a few people simultaneously working on runtime
    PM, so this initial code could help everybody make their plans.

    V2: - Move some functions to intel_pm.c
    - Remove useless pm_runtime_allow() call at init
    - Remove useless pm_runtime_mark_last_busy() call at get
    - Use pm_runtime_get_sync() instead of 2 calls
    - Add a WARN to check if we're really awake

    V3: - Rebase.

    V4: - Don't need to call pci_{save,restore}_state and
    pci_set_power_sate, since they're already called by the PCI
    layer
    - Remove wrong pm_runtime_enable() call at init_runtime_pm

    Signed-off-by: Paulo Zanoni
    Reviewed-by: Rodrigo Vivi
    Signed-off-by: Daniel Vetter

    Paulo Zanoni