1. 08 5月, 2015 1 次提交
    • 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
  2. 17 4月, 2015 1 次提交
  3. 16 4月, 2015 7 次提交
    • 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
    • A
      drm/i915/bxt: Implement enable/disable for Display C9 state · 664326f8
      A.Sunil Kamath 提交于
      v2: Modified as per review comments from Imre
      - Mention enabling instead of allowing in the debug trace and
        remove unnecessary comments.
      
      v3:
      - Rebase to latest.
      - Move DC9-related functions from intel_display.c to intel_runtime_pm.c.
      
      v4: (imre)
      - remove DC5 disabling, it's a nop at this point
      - squashed in Suketu's "Assert the requirements to enter or exit DC9"
        patch
      - remove check for RUNTIME_PM from assert_can_enable_dc9, it's not a
        dependency
      
      Signed-off-by: A.Sunil Kamath <sunil.kamath@intel.com> (v3)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NSagar Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      664326f8
    • V
      drm/i915/bxt: add display initialize/uninitialize sequence (PHY) · 5c6706e5
      Vandana Kannan 提交于
      Add PHY specific display initialization sequence as per BSpec.
      
      Note that the PHY initialization/uninitialization are done
      at their current place only for simplicity, in a future patch - when more
      of the runtime PM features will be enabled - these will be moved to
      power well#1 and modeset encoder enabling/disabling hooks respectively.
      
      The call to uninitialize the PHY during system/runtime suspend will be
      added later in this patchset.
      
      v1: Added function definitions in header files
      v2: Imre's review comments addressed
      - Moved CDCLK related definitions to i915_reg.h
      - Removed defintions for CDCLK frequency
      - Split uninit_cdclk() by adding a phy_uninit function
      - Calculate freq and decimal based on input frequency
      - Program SSA precharge based on input frequency
      - Use wait_for 1ms instead 200us udelay for DE PLL locking
      - Removed initial value for divider, freq, decimal, ratio.
      - Replaced polling loops with wait_for
      - Parameterized latency optim setting
      - Fix the parts where DE PLL has to be disabled.
      - Call CDCLK selection from mode set
      
      v3: (imre)
      - add note about the plan to move the cdclk/phy init to a better place
      - take rps.hw_lock around pcode access
      - fix DDI PHY timeout value
      - squash in Vandana's "PORT_CL2CM_DW6_A BUN fix",
        "DDI PHY programming register defn", "Do ddi_phy_init always",
      - move PHY register macros next to the corresponding CHV/VLV macros
      - move DE PLL register macros here from another patch since they are
        used here first
      - add BXT_ prefix to CDCLK flags
      - s/COMMON_RESET/COMMON_RESET_DIS/ and clarify related code comments
      - fix incorrect read value for the RMW of BXT_PHY_CTL_FAMILY_DDI
      - fix using GT_DISPLAY_EDP_POWER_ON vs. GT_DISPLAY_DDI_POWER_ON
        when powering on DDI ports
      - fix incorrect port when setting BXT_PORT_TX_DW14_LN for DDI ports
      - add missing masking when programming CDCLK_FREQ_DECIMAL
      - add missing powering on for DDI-C port, rename OCL2_LDOFUSE_PWR_EN
        to OCL2_LDOFUSE_PWR_DIS to reduce confusion
      - add note about mismatch with bspec in the PORT_REF_DW6 fields
      - factor out PHY init code to a new function, so we can call it for
        PHY1 and PHY0, instead of open-coding the same
      
      v4: (ville)
      - split the CDCLK/PHY parts into two patches, update commit message
        accordingly
      - use the existing dpio_phy enum instead of adding a new one for the
        same purpose
      - flip the meaning of PHYs so that PHY_A is PHY1 and PHY_BC is PHY0 to
        better match CHV
      - s/BXT_PHY/_BXT_PHY/
      - use _PIPE for _BXT_PHY instead of open-coding it
      - drop _0_2_0_GTTMMADR suffix from BXT_P_CR_GT_DISP_PWRON
      - define GT_DISPLAY_POWER_ON in a more standard way
      - make a note that the CHV ConfigDB also disagrees about GRC_CODE field
        definitions
      - fix lane optimization refactoring fumble from v3
      - add per PHY uninit functions to match the init counterparts
      
      Signed-off-by: Vandana Kannan <vandana.kannan@intel.com> (v2)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5c6706e5
    • V
      drm/i915/bxt: add display initialize/uninitialize sequence (CDCLK) · f8437dd1
      Vandana Kannan 提交于
      Add CDCLK specific display clock initialization sequence as per BSpec.
      
      Note that the CDCLK initialization/uninitialization are done at their
      current place only for simplicity, in a future patch - when more of the
      runtime PM features will be enabled - these will be moved to power
      well#1 and modeset encoder enabling/disabling hooks respectively. This
      also means that atm dynamic power gating power well #1 is effectively
      disabled.
      
      The call to uninitialize CDCLK during system/runtime suspend will be
      added later in this patchset.
      
      v1: Added function definitions in header files
      v2: Imre's review comments addressed
      - Moved CDCLK related definitions to i915_reg.h
      - Removed defintions for CDCLK frequency
      - Split uninit_cdclk() by adding a phy_uninit function
      - Calculate freq and decimal based on input frequency
      - Program SSA precharge based on input frequency
      - Use wait_for 1ms instead 200us udelay for DE PLL locking
      - Removed initial value for divider, freq, decimal, ratio.
      - Replaced polling loops with wait_for
      - Parameterized latency optim setting
      - Fix the parts where DE PLL has to be disabled.
      - Call CDCLK selection from mode set
      
      v3: (imre)
      - add note about the plan to move the cdclk/phy init to a better place
      - take rps.hw_lock around pcode access
      - move DE PLL register macros here from another patch since they are
        used here first
      - add BXT_ prefix to CDCLK flags
      - add missing masking when programming CDCLK_FREQ_DECIMAL
      
      v4: (ville)
      - split the CDCLK/PHY parts into two patches, update commit message
        accordingly
      - s/DISPLAY_PCU_CONTROL/HSW_PCODE_DE_WRITE_FREQ_REQ/
      - simplify BXT_DE_PLL_RATIO macros
      - fix BXT_DE_PLL_RATIO_MASK
      - s/bxt_select_cdclk_freq/broxton_set_cdclk_freq/
      - move cdclk init/uninit/set code from intel_ddi.c to intel_display.c
      - remove redundant code comments for broxton_set_cdclk_freq()
      - sanitize fixed point<->integer frequency value conversion
      - use DRM_ERROR instead of WARN
      - do RMW when programming BXT_DE_PLL_CTL for safety
      - add note about PLL lock timeout being exactly 200us
      - make PCU error messages more descriptive
      - instead of using 0 freq to mean PLL off/bypass freq use 19200
        for clarity, as the latter one is the actual rate
      - simplify pcode programming, removing duplicated
        sandybridge_pcode_write() call
      - sanitize code flow, remove unnecessary scratch vars in
        broxton_set_cdclk() (imre)
      - Remove bound check for maxmimum freq to match current code.
        This check will be added later at a more proper platform
        independent place once atomic support lands.
      - add note to remove freq guard band which isn't needed on BXT
      - add note to reduce freq to minimum if no pipe is enabled
      - combine broxton_modeset_global_pipes() with
        valleyview_modeset_global_pipes()
      
      Signed-off-by: Vandana Kannan <vandana.kannan@intel.com> (v2)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f8437dd1
  4. 15 4月, 2015 1 次提交
  5. 13 4月, 2015 5 次提交
    • A
      drm/i915: Allocate connector state together with the connectors · 08d9bc92
      Ander Conselvan de Oliveira 提交于
      Connector states were being allocated in intel_setup_outputs() in loop
      over all connectors. That meant hot-added connectors would have a NULL
      state. Since the change to use a struct drm_atomic_state for the legacy
      modeset, connector states are necessary for the i915 driver to function
      properly, so that would lead to oopses.
      
      Broken by
      
      commit 944b0c76
      Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Date:   Fri Mar 20 16:18:07 2015 +0200
      
          drm/i915: Copy the staged connector config to the legacy atomic state
      
      v2: Fix test for intel_connector_init() success in lvds and sdvo (PRTS)
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reported-and-tested-by: NNicolas Kalkhof <nkalkhof@web.de>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      08d9bc92
    • C
      drm/i915: skylake panel fitting using shared scalers · a1b2278e
      Chandra Konduru 提交于
      Enabling skylake panel fitting feature using shared scalers
      
      v2:
      -added force detach parameter for pfit disable purpose (me)
      -read crtc scaler state from hw state (Daniel)
      -replaced both skylake_pfit_enable and disable with skylake_pfit_update (me)
      -added scaler id check to intel_pipe_config_compare (Daniel)
      
      v3:
      -updated function header to kerneldoc format (Matt)
      -dropped need_scaling checks (Matt)
      
      v4:
      -move clearing of scaler id from commit path to check path (Matt)
      -updated colorkey checks based on recent updates (me)
      -squashed scaler check while enabling colorkey to here (me)
      -use values in plane_state->src as regular integers (me)
      -changes made not to modify state in commit path (Matt)
      
      v5:
      -squashed helper function to update scaler users to here (Matt)
      -squashed helper function to detach scaler to here (Matt, me)
      -changes to align with updated scaler structures (Matt, me)
      Signed-off-by: NChandra Konduru <chandra.konduru@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a1b2278e
    • C
      drm/i915: setup scalers for crtc_compute_config · d03c93d4
      Chandra Konduru 提交于
      Added intel_atomic_setup_scalers to setup scalers based on
      staged scaling requests from a crtc and its planes. If staged
      requests are supportable, this function assigns scalers to
      requested planes and crtc. Note that the scaler assignement
      itself is staged into crtc_state and respective plane_states
      for later commit after all checks have been done.
      
      overall high level flow:
       - scaler requests are staged into crtc_state by planes/crtc
       - check whether staged scaling requests can be supported
       - add planes using scalers that aren't in current transaction
       - assign scalers to requested users
       - as part of plane commit, scalers will be committed
         (i.e., either attached or detached) to respective planes in hw
       - as part of crtc_commit, scaler will be either attached or detached
         to crtc in hw
      
      crtc_compute_config calls intel_atomic_setup_scalers() to start
      scaler assignments as per scaler state in crtc config. This call
      should be moved to atomic crtc once it is available.
      
      v2:
      -removed a log message (me)
      -changed input parameter to crtc_state (me)
      
      v3:
      -remove assigning plane_state returned by drm_atomic_get_plane_state (Matt)
      -fail if there is an error from drm_atomic_get_plane_state (Matt)
      
      v4:
      -changes to align with updated scaler structure (Matt, me)
      
      v5:
      -added addtional checks before enabling HQ mode (me)
      -added comments to enable HQ mode (Matt)
      Signed-off-by: NChandra Konduru <chandra.konduru@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d03c93d4
    • C
      drm/i915: skylake scaler structure definitions · be41e336
      Chandra Konduru 提交于
      skylake scaler structure definitions. scalers live in crtc_state as
      they are pipe resources. They can be used either as plane scaler or
      panel fitter.
      
      scaler assigned to either plane (for plane scaling) or crtc (for panel
      fitting) is saved in scaler_id in plane_state or crtc_state respectively.
      
      scaler_id is used instead of scaler pointer in plane or crtc state
      to avoid updating scaler pointer everytime a new crtc_state is created.
      
      v2:
      -made single copy of min/max values for scalers (Matt)
      
      v3:
      -updated commentary for scaler_id (me)
      
      v4:
      -converted src/dst ranges to #defines, dropped ratios (Matt)
      Signed-off-by: NChandra Konduru <chandra.konduru@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      be41e336
    • A
      drm/i915: Allocate connector state together with the connectors · 9bdbd0b9
      Ander Conselvan de Oliveira 提交于
      Connector states were being allocated in intel_setup_outputs() in loop
      over all connectors. That meant hot-added connectors would have a NULL
      state. Since the change to use a struct drm_atomic_state for the legacy
      modeset, connector states are necessary for the i915 driver to function
      properly, so that would lead to oopses.
      
      v2: Fix test for intel_connector_init() success in lvds and sdvo (PRTS)
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reported-and-tested-by: NNicolas Kalkhof <nkalkhof@web.de>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9bdbd0b9
  6. 10 4月, 2015 4 次提交
  7. 31 3月, 2015 1 次提交
  8. 27 3月, 2015 1 次提交
  9. 26 3月, 2015 2 次提交
  10. 23 3月, 2015 6 次提交
  11. 20 3月, 2015 7 次提交
  12. 18 3月, 2015 4 次提交