1. 12 6月, 2015 12 次提交
  2. 28 5月, 2015 1 次提交
    • V
      drm/i915: Kill intel_flush_primary_plane() · b12ce1d8
      Ville Syrjälä 提交于
      The primary plane frobbing was removed from the sprite code in
       commit ecce87ea
       Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
       Date:   Tue Apr 21 17:12:50 2015 +0300
      
          drm/i915: Remove implicitly disabling primary plane for now
      
      but the intel_flush_primary_plane() calls were left behind. Replace them
      with straight forward POSTING_READ() of the sprite surface address
      register.
      
      The other user of intel_flush_primary_plane() is g4x_disable_trickle_feed()
      where we can just inline the steps directly.
      
      This allows intel_flush_primary_plane() to be killed off.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b12ce1d8
  3. 22 5月, 2015 2 次提交
    • D
      drm/i915/skl: Deinit/init the display at suspend/resume · 5d96d8af
      Damien Lespiau 提交于
      We need to re-init the display hardware when going out of suspend. This
      includes:
      
        - Hooking the PCH to the reset logic
        - Restoring CDCDLK
        - Enabling the DDB power
      
      Among those, only the CDCDLK one is a bit tricky. There's some
      complexity in that:
      
        - DPLL0 (which is the source for CDCLK) has two VCOs, each with a set
          of supported frequencies. As eDP also uses DPLL0 for its link rate,
          once DPLL0 is on, we restrict the possible eDP link rates the chosen
          VCO.
        - CDCLK also limits the bandwidth available to push pixels.
      
      So, as a first step, this commit restore what the BIOS set, until I can
      do more testing.
      
      In case that's of interest for the reviewer, I've unit tested the
      function that derives the decimal frequency field:
      
        #include <stdio.h>
        #include <stdint.h>
        #include <assert.h>
      
        #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
      
        static const struct dpll_freq {
                unsigned int freq;
                unsigned int decimal;
        } freqs[] = {
                { .freq = 308570, .decimal = 0b01001100111},
                { .freq = 337500, .decimal = 0b01010100001},
                { .freq = 432000, .decimal = 0b01101011110},
                { .freq = 450000, .decimal = 0b01110000010},
                { .freq = 540000, .decimal = 0b10000110110},
                { .freq = 617140, .decimal = 0b10011010000},
                { .freq = 675000, .decimal = 0b10101000100},
        };
      
        static void intbits(unsigned int v)
        {
                int i;
      
                for(i = 10; i >= 0; i--)
                        putchar('0' + ((v >> i) & 1));
        }
      
        static unsigned int freq_decimal(unsigned int freq /* in kHz */)
        {
                return (freq - 1000) / 500;
        }
      
        static void test_freq(const struct dpll_freq *entry)
        {
                unsigned int decimal = freq_decimal(entry->freq);
      
                printf("freq: %d, expected: ", entry->freq);
                intbits(entry->decimal);
                printf(", got: ");
                intbits(decimal);
                putchar('\n');
      
                assert(decimal == entry->decimal);
        }
      
        int main(int argc, char **argv)
        {
                int i;
      
                for (i = 0; i < ARRAY_SIZE(freqs); i++)
                        test_freq(&freqs[i]);
      
                return 0;
        }
      
      v2:
        - Rebase on top of -nightly
        - Use (freq - 1000) / 500 for the decimal frequency (Ville)
        - Fix setting the enable bit of HSW_NDE_RSTWRN_OPT (Ville)
        - Rename skl_display_{resume,suspend} to skl_{init,uninit}_cdclk to
          be consistent with the BXT code (Ville)
        - Store boot CDCLK in ddi_pll_init (Ville)
        - Merge dev_priv's skl_boot_cdclk into cdclk_freq
        - Use LCPLL_PLL_LOCK instead of (1 << 30) (Ville)
        - Replace various '0' by SKL_DPLL0 to be a bit more explicit that
          we're programming DPLL0
        - Busy poll the PCU before doing the frequency change. It takes about
          3/4 cycles, each separated by 10us, to get the ACK from the CPU
          (Ville)
      
      v3:
        - Restore dev_priv->skl_boot_cdclk, leaving unification with
          dev_priv->cdclk_freq for a later patch (Daniel, Ville)
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5d96d8af
    • C
      drm/i915: Free RPS boosts for all laggards · e61b9958
      Chris Wilson 提交于
      If the client stalls on a congested request, chosen to be 20ms old to
      match throttling, allow the client a free RPS boost.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: s/rq/req/]
      [danvet: s/0/NULL/ reported by 0-day build]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e61b9958
  4. 21 5月, 2015 3 次提交
    • C
      drm/i915: Convert RPS tracking to a intel_rps_client struct · 2e1b8730
      Chris Wilson 提交于
      Now that we have internal clients, rather than faking a whole
      drm_i915_file_private just for tracking RPS boosts, create a new struct
      intel_rps_client and pass it along when waiting.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: s/rq/req/]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2e1b8730
    • C
      drm/i915: Limit mmio flip RPS boosts · bcafc4e3
      Chris Wilson 提交于
      Since we will often pageflip to an active surface, we will often have to
      wait for the surface to be written before issuing the flip. Also we are
      likely to wait on that surface in plenty of time before the vblank.
      Since we have a mechanism for boosting when a flip misses the expected
      vblank, curtain the number of times we RPS boost when simply waiting for
      mmioflip.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: s/rq/req/]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bcafc4e3
    • D
      drm/i915: s/\<rq\>/req/g · eed29a5b
      Daniel Vetter 提交于
      The merged seqno->request conversion from John called request
      variables req, but some (not all) of Chris' recent patches changed
      those to just rq. We've had a lenghty (and inconclusive) discussion on
      irc which is the more meaningful name with maybe at most a slight bias
      towards req.
      
      Given that the "don't change names without good reason to avoid
      conflicts" rule applies, so lets go back to a req everywhere for
      consistency. I'll sed any patches for which this will cause conflicts
      before applying.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: John Harrison <John.C.Harrison@Intel.com>
      [danvet: s/origina/merged/ as pointed out by Chris - the first
      mass-conversion patch was from Chris, the merged one from John.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      eed29a5b
  5. 20 5月, 2015 3 次提交
  6. 08 5月, 2015 14 次提交
    • V
      drm/i915: Only wait for required lanes in vlv_wait_port_ready() · 9b6de0a1
      Ville Syrjälä 提交于
      Currently vlv_wait_port_ready() waits for all four lanes on the
      appropriate channel. This no longer works on CHV when the unused
      lanes may be power gated. So pass in a mask of lanes that the
      caller is expecting to be ready.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by:  Deepak S<deepak.s@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9b6de0a1
    • A
      drm/i915: Remove save/restore logic from intel_crtc_set_config() · 7cbf41d6
      Ander Conselvan de Oliveira 提交于
      This is no longer necessary since we only update the staged config on
      successfull modeset. The new configuration is stored in an atomic state
      struct which is freed in case of failure.
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7cbf41d6
    • M
      drm/i915: Move toggling planes out of crtc enable/disable. · ce22dba9
      Maarten Lankhorst 提交于
      This makes disabling planes more explicit.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      [anderco: fixed warning due to using drm_crtc instead of intel_crtc]
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ce22dba9
    • M
    • M
      drm/i915: get rid of primary_enabled and use atomic state · b70709a6
      Maarten Lankhorst 提交于
      This was an optimization from way back before we had primary plane
      support to be able to disable the primary plane. But with primary
      plane support userspace can tell the kernel this directly, so there's
      no big need for this any more. And it's getting in the way of the
      atomic conversion.
      
      If need be we can resurrect this later on properly again.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      [danvet: Explain why removing this is ok.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b70709a6
    • M
      drm/i915: Add a way to disable planes without updating state · a8ad0d8e
      Maarten Lankhorst 提交于
      This is used by the next commit to disable all planes on a crtc
      without caring what type it is.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a8ad0d8e
    • M
      drm/i915: Remove implicitly disabling primary plane for now · ecce87ea
      Maarten Lankhorst 提交于
      Some of the flags that were used are still useful when transitioning
      to atomic, so keep those around for now. This removes some of the
      complications of crtc->primary_enabled, making it easier to remove.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ecce87ea
    • T
      drm/i915: Implement the intel_dp_autotest_edid function for DP EDID complaince tests · 559be30c
      Todd Previte 提交于
      Updates the EDID compliance test function to perform the analyze and react to
      the EDID data read as a result of a hot plug event. The results of this
      analysis are handed off to userspace so that the userspace app can set the
      display mode appropriately for the test result/response.
      
      The compliance_test_active flag now appears at the end of the individual
      test handling functions. This is so that the kernel-side operations can
      be completed without the risk of interruption from the userspace app
      that is polling on that flag.
      
      V2:
      - Addressed mailing list feedback
      - Removed excess debug messages
      - Removed extraneous comments
      - Fixed formatting issues (line length > 80)
      - Updated the debug message in compute_edid_checksum to output hex values
        instead of decimal
      V3:
      - Addressed more list feedback
      - Added the test_active flag to the autotest function
      - Removed test_active flag from handler
      - Added failsafe check on the compliance test active flag
        at the end of the test handler
      - Fixed checkpatch.pl issues
      V4:
      - Removed the checksum computation function and its use as it has been
        rendered superfluous by changes to the core DRM EDID functions
      - Updated to use the raw header corruption detection mechanism
      - Moved the declaration of the test_data variable here
      V5:
      - Update test active flag variable name to match the change in the
        first patch of the series.
      - Relocated the test active flag declaration and initialization
        to this patch
      V6:
      - Updated to use the new flag for raw EDID header corruption
      - Removed the extra EDID read from the autotest function
      - Added the edid_checksum variable to struct intel_dp so that the
        autotest function can write it to the sink device
      - Moved the update to the hpd_pulse function to another patch
      - Removed extraneous constants
      V7:
      - Fixed erroneous placement of the checksum assignment. In some cases
        such as when the EDID read fails and is NULL, this causes a NULL ptr
        dereference in the kernel. Bad news. Fixed now.
      V8:
      - Updated to support the kfree() on the EDID data added previously
      V9:
      - Updated for the long_hpd flag propagation
      V10:
      - Updated to use actual checksum from the EDID read that occurs during
        normal hot plug path execution
      - Removed variables from intel_dp struct that are no longer needed
      - Updated the patch subject to more closely match the nature and contents
        of the patch
      - Fixed formatting problem (long line)
      V11:
      - Removed extra debug messages
      - Updated comments to be more informative
      - Removed extra variable
      V12:
      - Removed the 4 bit offset of the resolution setting in compliance data
      - Changed to DRM_DEBUG_KMS instead of DRM_DEBUG_DRIVER
      Signed-off-by: NTodd Previte <tprevite@gmail.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      559be30c
    • M
      drm/i915: eDP link training optimization · 4e96c977
      Mika Kahola 提交于
      This is a first of series patches that optimize DP link
      training. The first patch is for eDP only where we reuse
      the previously trained link training values from cache
      i.e. voltage swing and pre-emphasis levels.
      
      In case we are not able to train the link by reusing
      the known values, the link training parameters are set
      to zero and training is restarted.
      
      V2:
      - flag that indicates if DP link is trained and valid
        renamed from 'link_trained' to 'train_set_valid'
      - removed routine 'intel_dp_reuse_link_train'
      
      V3:
      - rebased against the latest drm-intel-nightly
      
      V4:
      - removed HPD long pulse handling for eDP case to clear the
        flag that indicates to reuse the current link training
        parameters. (based on Sivakumar's comment)
      Signed-off-by: NMika Kahola <mika.kahola@intel.com>
      Reviewed-by: NSivakumar Thulasimani <sivakumar.thulasimani@intel.com>
      [danvet: s/DP/eDP/ in subject to make scope clear.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4e96c977
    • F
      drm/i915: use ERR_CAST instead of ERR_PTR/PTR_ERR · 0b6cc188
      Fabian Frederick 提交于
      Inspired by scripts/coccinelle/api/err_cast.cocci
      Signed-off-by: NFabian Frederick <fabf@skynet.be>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0b6cc188
    • S
      drm/i915/skl: Assert the requirements to enter or exit DC5. · 5aefb239
      Suketu Shah 提交于
      Warn if the conditions to enter or exit DC5 are not satisfied such
      as support for runtime PM, state of power well, CSR loading etc.
      
      v2: Removed camelcase in functions and variables.
      
      v3: Do some minimal check to assert if CSR program is not loaded.
      
      v4:
      1] Used an appropriate function lookup_power_well() to identify power well,
      instead of using a magic number which can change in future.
      2] Split the conditions further in assert_can_enable_DC5() and added more checks.
      3] Removed all WARNs from assert_can_disable_DC5 as they were unnecessary and added two
         new ones.
      4] Changed variable names as updated in earlier patches.
      
      v5:
      1] Change lookup_power_well function to take an int power well id.
      2] Define a new intel_display_power_well_is_enabled helper function to check whether a
         particular power well is enabled.
      3] Use CSR-related mutex in assert_csr_loaded function.
      
      v6: Remove use of dc5_enabled variable as it's no longer needed.
      
      v7:
      1] Rebase to latest.
      2] Move all DC5-related functions from intel_display.c to intel_runtime_pm.c.
      
      v8: After adding dmc ver 1.0 support rebased on top of nightly. (Animesh)
      
      v9: Modified below changes based on review comments from Imre.
      - Moved intel_display_power_well_is_enabled() to intel_runtime_pm.c.
      - Removed mutex lock from assert_csr_loaded(). (Animesh)
      
      Issue: VIZ-2819
      Signed-off-by: NA.Sunil Kamath <sunil.kamath@intel.com>
      Signed-off-by: NSuketu Shah <suketu.j.shah@intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NAnimesh Manna <animesh.manna@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5aefb239
    • S
      drm/i915/skl: Add DC5 Trigger Sequence · dc174300
      Suketu Shah 提交于
      Add triggers as per expectations mentioned in gen9_enable_dc5
      and gen9_disable_dc5 patch.
      
      Also call POSTING_READ for every write to a register to ensure that
      its written immediately.
      
      v1: Remove POSTING_READ calls as they've already been added in previous patches.
      
      v2: Rebase to move all runtime pm specific changes to intel_runtime_pm.c file.
      
      Modified as per review comments from Imre:
      1] Change variable name 'dc5_allowed' to 'dc5_enabled' to correspond to relevant
         functions.
      2] Move the check dc5_enabled in skl_set_power_well() to disable DC5 into
         gen9_disable_DC5 which is a more appropriate place.
      3] Convert checks for 'pm.dc5_enabled' and 'pm.suspended' in skl_set_power_well()
         to warnings. However, removing them for now as they'll be included in a future patch
         asserting DC-state entry/exit criteria.
      4] Enable DC5, only when CSR firmware is verified to be loaded. Create new structure
         to track 'enabled' and 'deferred' status of DC5.
      5] Ensure runtime PM reference is obtained, if CSR is not loaded, to avoid entering
         runtime-suspend and release it when it's loaded.
      6] Protect necessary CSR-related code with locks.
      7] Move CSR-loading call to runtime PM initialization, as power domains needed to be
         accessed during deferred DC5-enabling, are not initialized earlier.
      
      v3: Rebase to latest.
      
      Modified as per review comments from Imre:
      1] Use blocking wait for CSR-loading to finish to enable DC5  for simplicity, instead of
         deferring enabling DC5 until CSR is loaded.
      2] Obtain runtime PM reference during CSR-loading initialization itself as deferred DC5-
         enabling is removed and release it at the end of CSR-loading functionality.
      3] Revert calling CSR-loading functionality to the beginning of i915 driver-load
         functionality to avoid any delay in loading.
      4] Define another variable to track whether CSR-loading failed and use it to avoid enabling
         DC5 if it's true.
      5] Define CSR-load-status accessor functions for use later.
      
      v4:
      1] Disable DC5 before enabling PG2 instead of after it.
      2] DC5 was being mistaken enabled even when CSR-loading timed-out. Fix that.
      3] Enable DC5-related functionality using a macro.
      4] Remove dc5_enabled tracking variable and its use as it's not needed now.
      
      v5:
      1] Mark CSR failed to load where necessary in finish_csr_load function.
      2] Use mutex-protected accessor function to check if CSR loaded instead of directly
         accessing the variable.
      3] Prefix csr_load_status_get/set function names with intel_.
      
      v6: rebase to latest.
      v7: Rebase on top of nightly (Damien)
      v8: Squashed the patch from Imre - added csr helper pointers to simplify the code. (Imre)
      v9: After adding dmc ver 1.0 support rebased on top of nightly. (Animesh)
      v10: Added a enum for different csr states, suggested by Imre. (Animesh)
      
      v11: Based on review comments from Imre, Damien and Daniel following changes done
      - enum name chnaged to csr_state (singular form).
      - FW_UNINITIALIZED used as zeroth element in enum csr_state.
      - Prototype changed for helper function(set/get csr status), using enum csr_state instead of bool.
      
      v12: Based on review comment from Imre, introduced bool fw_loaded local to finish_csr_load() which helps
      calling once to set the csr status. The same flag used to fail RPM if find any issue during
      firmware loading.
      
      Issue: VIZ-2819
      Signed-off-by: NA.Sunil Kamath <sunil.kamath@intel.com>
      Signed-off-by: NSuketu Shah <suketu.j.shah@intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NAnimesh Manna <animesh.manna@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dc174300
    • D
      drm/i915/skl: Add support to load SKL CSR firmware. · eb805623
      Daniel Vetter 提交于
      Display Context Save and Restore support is needed for
      various SKL Display C states like DC5, DC6.
      
      This implementation is added based on first version of DMC CSR program
      that we received from h/w team.
      
      Here we are using request_firmware based design.
      Finally this firmware should end up in linux-firmware tree.
      
      For SKL platform its mandatory to ensure that we load this
      csr program before enabling DC states like DC5/DC6.
      
      As CSR program gets reset on various conditions, we should ensure
      to load it during boot and in future change to be added to load
      this system resume sequence too.
      
      v1: Initial relese as RFC patch
      
      v2: Design change as per Daniel, Damien and Shobit's review comments
      request firmware method followed.
      
      v3: Some optimization and functional changes.
      Pulled register defines into drivers/gpu/drm/i915/i915_reg.h
      Used kmemdup to allocate and duplicate firmware content.
      Ensured to free allocated buffer.
      
      v4: Modified as per review comments from Satheesh and Daniel
      Removed temporary buffer.
      Optimized number of writes by replacing I915_WRITE with I915_WRITE64.
      
      v5:
      Modified as per review comemnts from Damien.
      - Changed name for functions and firmware.
      - Introduced HAS_CSR.
      - Reverted back previous change and used csr_buf with u8 size.
      - Using cpu_to_be64 for endianness change.
      
      Modified as per review comments from Imre.
      - Modified registers and macro names to be a bit closer to bspec terminology
      and the existing register naming in the driver.
      - Early return for non SKL platforms in intel_load_csr_program function.
      - Added locking around CSR program load function as it may be called
      concurrently during system/runtime resume.
      - Releasing the fw before loading the program for consistency
      - Handled error path during f/w load.
      
      v6: Modified as per review comments from Imre.
      - Corrected out_freecsr sequence.
      
      v7: Modified as per review comments from Imre.
      Fail loading fw if fw->size%8!=0.
      
      v8: Rebase to latest.
      
      v9: Rebase on top of -nightly (Damien)
      
      v10: Enabled support for dmc firmware ver 1.0.
      According to ver 1.0 in a single binary package all the firmware's that are
      required for different stepping's of the product will be stored. The package
      contains the css header, followed by the package header and the actual dmc
      firmwares. Package header contains the firmware/stepping mapping table and
      the corresponding firmware offsets to the individual binaries, within the
      package. Each individual program binary contains the header and the payload
      sections whose size is specified in the header section. This changes are done
      to extract the specific firmaware from the package. (Animesh)
      
      v11: Modified as per review comemnts from Imre.
      - Added code comment from bpec for header structure elements.
      - Added __packed to avoid structure padding.
      - Added helper functions for stepping and substepping info.
      - Added code comment for CSR_MAX_FW_SIZE.
      - Disabled BXT firmware loading, will be enabled with dmc 1.0 support.
      - Changed skl_stepping_info based on bspec, earlier used from config DB.
      - Removed duplicate call of cpu_to_be* from intel_csr_load_program function.
      - Used cpu_to_be32 instead of cpu_to_be64 as firmware binary in dword aligned.
      - Added sanity check for header length.
      - Added sanity check for mmio address got from firmware binary.
      - kmalloc done separately for dmc header and dmc firmware. (Animesh)
      
      v12: Modified as per review comemnts from Imre.
      - Corrected the typo error in skl stepping info structure.
      - Added out-of-bound access for skl_stepping_info.
      - Sanity check for mmio address modified.
      - Sanity check added for stepping and substeppig.
      - Modified the intel_dmc_info structure, cache only the required header info. (Animesh)
      
      v13: clarify firmware load error message.
      The reason for a firmware loading failure can be obscure if the driver
      is built-in. Provide an explanation to the user about the likely reason for
      the failure and how to resolve it. (Imre)
      
      v14: Suggested by Jani.
      - fix s/I915/CONFIG_DRM_I915/ typo
      - add fw_path to the firmware object instead of using a static ptr (Jani)
      
      v15:
      1) Changed the firmware name as dmc_gen9.bin, everytime for a new firmware version a symbolic link
      with same name will help not to build kernel again.
      2) Changes done as per review comments from Imre.
      - Error check removed for intel_csr_ucode_init.
      - Moved csr-specific data structure to intel_csr.h and optimization done on structure definition.
      - fw->data used directly for parsing the header info & memory allocation
      only done separately for payload. (Animesh)
      
      v16:
      - No need for out_regs label in i915_driver_load(), so removed it.
      - Changed the firmware name as skl_dmc_ver1.bin, followed naming convention <platform>_dmc_<api-version>.bin (Animesh)
      
      Issue: VIZ-2569
      Signed-off-by: NA.Sunil Kamath <sunil.kamath@intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NAnimesh Manna <animesh.manna@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      eb805623
    • C
      drm/i915: skylake primary plane scaling using shared scalers · 6156a456
      Chandra Konduru 提交于
      This patch enables skylake primary plane scaling using shared
      scalers atomic desgin.
      
      v2:
      -use single copy of scaler limits (Matt)
      
      v3:
      -move detach_scalers to crtc commit path (Matt)
      -use values in plane_state->src as regular integers (me)
      
      v4:
      -changes to align with updated scaler structures (Matt, me)
      -keep plane src rect in 16.16 format (Matt, Daniel)
      
      v5:
      -Rebased on top of 90/270 rotation changes (me)
      -Fixed an issue introduced by 90/270 changes where plane programming
       is using drm_plane->state rect instead of intel_plane->state rect.
       This change also required for scaling to work properly. (me)
      -With 90/270, updated limits to cover both portrait and landscape usages (me)
      -Refactored skylake_update_primary_plane to reduce its size (Daniel)
       Added helper functions for refactoring are comprehended enough to be
       used for skylake_update_plane (for sprite) too. One stop towards
       having single function for all planes.
      
      v6:
      -Added fixme note when checking plane_state->src width in update_plane (Daniel)
      -Release lock when failing to colorkey request with active scaler (Daniel)
      Signed-off-by: NChandra Konduru <chandra.konduru@intel.com>
      Reviewed-by: matthew.d.roper@intel.com
      Reviewed-by: sonika.jindal@intel.com (v5)
      Testcase: igt/kms_plane_scaling
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6156a456
  7. 17 4月, 2015 1 次提交
  8. 16 4月, 2015 4 次提交
    • T
      drm/i915: Add automated testing support for Displayport compliance testing · c5d5ab7a
      Todd Previte 提交于
      Add the skeleton framework for supporting automation for Displayport compliance
      testing. This patch adds the necessary framework for the source device to
      appropriately respond to test automation requests from a sink device.
      
      V2:
      - Addressed previous mailing list feedback
      - Fixed compilation issue (struct members declared in a later patch)
      - Updated debug messages to be more accurate
      - Added status checks for the DPCD read/write calls
      - Removed excess comments and debug messages
      - Fixed debug message compilation warnings
      - Fixed compilation issue with missing variables
      - Updated link training autotest to ACK
      
      V3:
      - Fixed the checks on the DPCD return code to be <= 0
        rather than != 0
      - Removed extraneous assignment of a NAK return code in the
        DPCD read failure case
      - Changed the return in the DPCD read failure case to a goto
        to the exit point where the status code is written to the sink
      - Removed FAUX test case since it's deprecated now
      - Removed the compliance flag assignment in handle_test_request
      
      V4:
      - Moved declaration of type_type here
      - Removed declaration of test_data (moved to a later patch)
      - Added reset to 0 for compliance test variables
      
      V5:
      - Moved test_active variable declaration and initialization out of
        this patch and into the patch where it's used
      - Changed variable name compliance_testing_active to
        compliance_test_active to unify the naming convention
      - Added initialization for compliance_test_type variable
      Signed-off-by: NTodd Previte <tprevite@gmail.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c5d5ab7a
    • V
      drm/i915/bxt: VSwing programming sequence · 96fb9f9b
      Vandana Kannan 提交于
      VSwing programming sequence as specified in the updated BXT BSpec
      
      v2: Satheesh's review comments addressed.
      - clear value before setting into registers
      - move print statement to bxt function
      Other changes
      - since signal level will not be set into DDI_BUF_CTL, the value need
        not be returned to intel_dp_set_signal_levels(). Making the bxt
        specific function to return void and setting signal_levels = 0 for
        bxt inside intel_dp_set_signal_levels()
      - instead of signal levels, printing vswing level and pre-emphasis
        level
      - in case none of the pre-emphasis levels or vswing levels are set,
        setting default of 400mV + 0dB
      
      v3: Satheesh's review comments
      - Check for mask before printing signal_levels.
      - Removing redundant register writes
      - Call intel_prepare_ddi_buffers only for HAS_PCH_SPLIT
      - Making register write part generic as it will be required for HDMI as
        well.
      
      Re-structure the code to include an array for vswing related values, set
      signal levels
      
      v4: Satheesh's review comments
      - Rebase over latest renaming patches
      - use hsw_signal_levels for HAS_DDI
      Other changes
      - Modified vswing_sequence() func definition
      - Rebased on top of register macro definitions
      
      v5: Satheesh's review comments
      - Check ddi translation table size
      
      v6: Imre's review comments
      - removed comments in vswing sequence
      - added vswing, pre-emphasis prints in intel_dp_set_signal_levels
      - added comment explaining use of DP vswing values for eDP
      - initialize n_entries and ddi_transaltion table based on encoder type
      - create bxt_ddi_buf_trans structure and use decimal values
      - adding a flag in bxt buffer translation table to indicate def entry
      
      v7: (imre)
      - squash in Vandana's "VSwing register definition",
        "HDMI VSwing programming", "Re-enable vswing programming",
        "Fix vswing sequence" patches
      - use BXT_PORT_* regs directly instead of via a temp var
      - simplify BXT_PORT_* macro definitions
      - add code comment why we read lane while write group registers
      - fix readout of DP_TRAIN_PRE_EMPHASIS in debug message
      
      Signed-off-by: Vandana Kannan <vandana.kannan@intel.com> (v6)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NSivakumar Thulasimani <sivakumar.thulasimani@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      96fb9f9b
    • S
      drm/i915/bxt: Assign PLL for pipe · bcddf610
      Satheeshakrishna M 提交于
      Assign PLL for pipe (dependent on port attached to the pipe)
      
      v2:
      - fix incorrect encoder vs. new_encoder check for crtc (imre)
      
      v3:
      - warn and return error if no encoder is attached (imre)
      
      Signed-off-by: Satheeshakrishna M <satheeshakrishna.m@intel.com> (v2)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Don't move intel_ddi_get_crtc_new_encoder around.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bcddf610
    • I
      drm/i915/bxt: add bxt_find_best_dpll · 5ab7b0b7
      Imre Deak 提交于
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5ab7b0b7