1. 28 2月, 2015 1 次提交
  2. 27 2月, 2015 6 次提交
  3. 26 2月, 2015 8 次提交
    • M
      drm/i915: Add missing description to parameter in alloc_pt_range · 719cd21c
      Michel Thierry 提交于
      The patch "drm/i915: Plumb drm_device through page tables operations"
      added an extra parameter, but it didn't update the function description.
      Also remove unnecessary blank line added by the same patch.
      
      Found by kbuild test robot.
      Signed-off-by: NMichel Thierry <michel.thierry@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      719cd21c
    • A
      drm/i915: Removed the read of RP_STATE_CAP from sysfs/debugfs functions · bc4d91f6
      Akash Goel 提交于
      The frequency values(Rp0, Rp1, Rpn) reported by RP_STATE_CAP register
      are stored, initially by the Driver, inside the dev_priv->rps structure.
      Since these values are expected to remain same throughout, there is no real
      need to read this register, on dynamic basis, from certain debugfs/sysfs
      functions and the values can be instead retrieved from the dev_priv->rps
      structure when needed.
      For the i915_frequency_info debugfs interface, the frequency values from the
      RP_STATE_CAP register only should be used, to indicate the actual Hw state,
      since it is principally used for the debugging purpose.
      
      v2: Reverted the changes in i915_frequency_info function, to continue report
          back the frequency values, as per the actual Hw state (Chris)
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bc4d91f6
    • A
      drm/i915: Look at staged config when fixing pipe_src_w for LVDS · b4f2bf4c
      Ander Conselvan de Oliveira 提交于
      The code in function intel_crtc_compute_config() that evens pipe_src_w
      if necessary would look at the current config instead of the staged one
      when deciding if there is an LVDS encoder in use. This could potentially
      lead to the value not being updated, if during the modeset a crtc wasn't
      driving an LVDS encoder.
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b4f2bf4c
    • M
      drm/i915: Ensure crtc_state backpointer is always initialized · 07878248
      Matt Roper 提交于
      As we transition to full atomic modesetting, we want to be able to pass
      intel_crtc_state around in various places that we pass intel_crtc
      directly today.  Ensure that the ->crtc backpointer is properly
      initialized in case we need to get back to the associated CRTC.
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      07878248
    • M
      drm/i915: Use enabled value from crtc_state rather than crtc (v2) · 83d65738
      Matt Roper 提交于
      As vendors transition their drivers from legacy to atomic there's some
      duplication of data between drm_crtc and drm_crtc_state (since
      unconverted drivers likely won't have a state structure).
      
      i915 is partially converted and does have a crtc->state structure, but
      still uses direct crtc fields internally in many places, which causes
      the two sets of data to get out of sync.  As of commit
      
              commit 31c946e8
              Author: Daniel Vetter <daniel.vetter@ffwll.ch>
              Date:   Sun Feb 22 12:24:17 2015 +0100
      
                  drm: If available use atomic state in getcrtc ioctl
      
                  This way drivers fully converted to atomic don't need to update these
                  legacy state variables in their modeset code any more.
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      
      the DRM core starts assuming that the presence of a ->state structure
      implies that it should make use of the values stored there which, on
      i915, leads to the core code using stale values for CRTC 'enabled'
      status.
      
      Let's switch over to using the state value of 'enable' internally rather
      than using the drm_crtc field.  This ensures that our driver internals
      are working from the same data that the DRM core is, avoiding
      mismatches.
      
      This patch was generated with Coccinelle using the following semantic
      patch:
      
              <smpl>
              @@
              struct drm_crtc C;
              struct drm_crtc *CP;
              @@
              (
              - C.enabled
              + C.state->enable
              |
              - CP->enabled
              + CP->state->enable
              )
      
              // For assignments, we still update the legacy value as well as the state value
              // so add an extra assignment statement for that.
              @@
              struct drm_crtc C;
              struct drm_crtc *CP;
              expression E;
              @@
              (
                C.state->enable = E;
              + C.enabled = E;
              |
                CP->state->enable = E;
              + CP->enabled = E;
              )
              </smpl>
      
      The crtc->mode and crtc->hwmode fields should probably be transitioned
      over as well eventually, but we seem to do an okay job of keeping those
      up-to-date already so I want to minimize the changes that will clash
      with Ander's in-progress atomic work.
      
      v2: Don't remove the assignments to the legacy value when we assign to
          the state value.  A second cocci stanza takes care of adding the
          legacy assignment back where appropriate.  (Daniel)
      
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      83d65738
    • J
      drm/i915: Cache ringbuf pointer in request structure · 98e1bd4a
      John Harrison 提交于
      In execlist mode, the ringbuf is a function of the ring and context whereas in
      legacy mode, it is derived from the ring alone. Thus the calculation required to
      determine the ringbuf pointer from the ring (and context) also needs to test
      execlist mode or not. This is messy.
      
      Further, the request structure holds a pointer to both the ring and the context
      for which it was created. Thus, given a request, it is possible to derive the
      ringbuf in either legacy or execlist mode. Hence it is necessary to pass just
      the request in to all the low level functions rather than some combination of
      request, ring, context and ringbuf. However, rather than recalculating it each
      time, it is much simpler to just cache the ringbuf pointer in the request
      structure itself.
      
      Caching the pointer means the calculation is done once at request creation time
      and all further code and simply read it directly from the request structure.
      
      OTC-Jira: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      [danvet: Drop contentless comment in lrc alloc request entirely. And
      spelling fix in the commit message.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      98e1bd4a
    • J
      drm/i915: Add missing trace point to LRC execbuff code path · 5e4be7bd
      John Harrison 提交于
      There is a trace point in the legacy execbuffer execution path that is missing
      from the execlist path. Trace points are extremely useful for debugging and are
      used by various automated validation tests. Hence, this patch adds the missing
      trace point back in.
      
      OTC-Jira: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5e4be7bd
    • J
      drm/i915: Rename 'flags' to 'dispatch_flags' for better code reading · 8e004efc
      John Harrison 提交于
      There is a flags word that is passed through the execbuffer code path all the
      way from initial decoding of the user parameters down to the very final dispatch
      buffer call. It is simply called 'flags'. Unfortuantely, there are many other
      flags words floating around in the same blocks of code. Even more once the GPU
      scheduler arrives.
      
      This patch makes it more obvious exactly which flags word is which by renaming
      'flags' to 'dispatch_flags'. Note that the bit definitions for this flags word
      already have an 'I915_DISPATCH_' prefix on them and so are not quite so
      ambiguous.
      
      OTC-Jira: VIZ-1587
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      [danvet: Resolve conflict with Chris' rework of the bb parsing.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8e004efc
  4. 25 2月, 2015 8 次提交
    • M
      drm/i915: Plumb drm_device through page tables operations · 06dc68d6
      Michel Thierry 提交于
      The next patch in the series will require it for alloc_pt_single.
      
      v2: Rebased after s/page_tables/page_table/.
      Signed-off-by: NMichel Thierry <michel.thierry@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      06dc68d6
    • B
      drm/i915: Create page table allocators · 06fda602
      Ben Widawsky 提交于
      As we move toward dynamic page table allocation, it becomes much easier
      to manage our data structures if break do things less coarsely by
      breaking up all of our actions into individual tasks.  This makes the
      code easier to write, read, and verify.
      
      Aside from the dissection of the allocation functions, the patch
      statically allocates the page table structures without a page directory.
      This remains the same for all platforms,
      
      The patch itself should not have much functional difference. The primary
      noticeable difference is the fact that page tables are no longer
      allocated, but rather statically declared as part of the page directory.
      This has non-zero overhead, but things gain additional complexity as a
      result.
      
      This patch exists for a few reasons:
      1. Splitting out the functions allows easily combining GEN6 and GEN8
      code. Page tables have no difference based on GEN8. As we'll see in a
      future patch when we add the DMA mappings to the allocations, it
      requires only one small change to make work, and error handling should
      just fall into place.
      
      2. Unless we always want to allocate all page tables under a given PDE,
      we'll have to eventually break this up into an array of pointers (or
      pointer to pointer).
      
      3. Having the discrete functions is easier to review, and understand.
      All allocations and frees now take place in just a couple of locations.
      Reviewing, and catching leaks should be easy.
      
      4. Less important: the GFP flags are confined to one location, which
      makes playing around with such things trivial.
      
      v2: Updated commit message to explain why this patch exists
      
      v3: For lrc, s/pdp.page_directory[i].daddr/pdp.page_directory[i]->daddr/
      
      v4: Renamed free_pt/pd_single functions to unmap_and_free_pt/pd (Daniel)
      
      v5: Added additional safety checks in gen8 clear/free/unmap.
      
      v6: Use WARN_ON and return -EINVAL in alloc_pt_range (Mika).
      
      v7: Make err_out loop symmetrical to the way we allocate in
      alloc_pt_range. Also s/page_tables/page_table and correct commit
      message (Mika)
      
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v3+)
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      06fda602
    • B
      drm/i915: Complete page table structures · 7324cc04
      Ben Widawsky 提交于
      Move the remaining members over to the new page table structures.
      
      This can be squashed with the previous commit if desire. The reasoning
      is the same as that patch. I simply felt it is easier to review if split.
      
      v2: In lrc: s/ppgtt->pd_dma_addr[i]/ppgtt->pdp.page_directory[i].daddr/
      v3: Rebase.
      v4: Rebased after s/page_tables/page_table/.
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v2+)
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7324cc04
    • B
      drm/i915: page table abstractions · d7b3de91
      Ben Widawsky 提交于
      When we move to dynamic page allocation, keeping page_directory and pagetabs as
      separate structures will help to break actions into simpler tasks.
      
      To help transition the code nicely there is some wasted space in gen6/7.
      This will be ameliorated shortly.
      
      Following the x86 pagetable terminology:
      PDPE = struct i915_page_directory_pointer_entry.
      PDE = struct i915_page_directory_entry [page_directory].
      PTE = struct i915_page_table_entry [page_tables].
      
      v2: fixed mismatches after clean-up/rebase.
      
      v3: Clarify the names of the multiple levels of page tables (Daniel)
      
      v4: Addressing Mika's review comments.
      s/gen8_free_page_directories/gen8_free_page_directory and free the
      page tables for the directory there.
      In gen8_ppgtt_allocate_page_directories, do not leak previously allocated
      pt in case the page_directory alloc fails.
      Update error return handling in gen8_ppgtt_alloc.
      
      v5: Do not leak pt on error in gen6_ppgtt_allocate_page_tables. (Mika)
      
      v6: s/page_tables/page_table/. (Mika)
      
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v2+)
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d7b3de91
    • S
      drm/i915/skl: Add support for edp1.4 low vswing · 7ad14a29
      Sonika Jindal 提交于
      Based upon vbt's vswing preemph settings value select the appropriate
      translations for edp.
      
      v2: Incorporating bspec changes for vswing and preemph levels, adding edp
      translation table. Removed HSW from selection 9 which is specific to skl and
      correcting the returning of level2 from max pre emph (Damien)
      
      v3: Rebasing on top of renaming patches. Adding level(3,0) since level(2,2) as
      mentioned in bspec is invalid as per edp spec. Also changed the determining of
      size of the table selected (Satheesh).
      
      v4: Adding level 3 in max voltage selection if low vswing is selected (Satheesh)
      
      v5: Add a comment stating that skl_ddi_translations_edp is for eDP 1.4
          low vswing panels.
      
      v6: Updating recommended DDI translation table for edp 1.4
      
      Reviewed-by: Satheeshakrishna M <satheeshakrishna.m@intel.com> (v4)
      Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> (v6)
      Signed-off-by: NSonika Jindal <sonika.jindal@intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7ad14a29
    • S
      drm/i915/skl: Support for edp low_vswing param in vbt · 9a57f5bb
      Sonika Jindal 提交于
      v2: Adding VBT version check for low_vswing field, and correcting parsing
      
      v3: (Damien)
       - Restrain the scope of the 'vswing' variable
       - Use the more idiomatic "ev_priv->vbt.edp_low_vswing = vswing == 0;"
        instead of if (foo) var = true; else var = false;
       - Shorten edp_vswing_premph_setting to edp_vswing_premph to fit in 80 chars
       - Add the version from which the edp_vswing_premph field is valid in the
        struct definition
      
      Reviewed-by: Satheeshakrishna M <satheeshakrishna.m@intel.com> (v2)
      Signed-off-by: NSonika Jindal <sonika.jindal@intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9a57f5bb
    • D
      drm/i915: cleanup some indenting · ba0635ff
      Dan Carpenter 提交于
      Static checkers complain that we should probably add curly braces
      because, from the indenting, it looks like seq_printf() should be inside
      the list_for_each_entry() loop.  But the code is actually correct, it's
      just the indenting which is off.
      
      Besides fixing the indenting on seq_printf(), I did add curly braces,
      because generally mult-line indents should have curly braces to make
      them more readable.
      
      The unintended indent was left behind and not unindented in
      
      commit d7f46fc4
      Author: Ben Widawsky <benjamin.widawsky@intel.com>
      Date:   Fri Dec 6 14:10:55 2013 -0800
      
          drm/i915: Make pin count per VMA
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ba0635ff
    • D
      drm/i915/skl: Make sure to allocate mininum sizes in the DDB · 80958155
      Damien Lespiau 提交于
      I overlooked the fact that we need to allocate a minimum 8 blocks and
      that just allocating the planes depending on how much they need to fetch
      from the DDB in proportion of how much memory bw is necessary for the
      whole display can lead to cases where we don't respect those minima (and
      thus overrun).
      
      So, instead, start by allocating 8 blocks to each active display plane
      and then allocate the remaining blocks like before.
      
      v2: Rebase on top of -nightly
      
      Cc: Mahesh Kumar <mahesh1.kumar@intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      80958155
  5. 24 2月, 2015 17 次提交