1. 25 Feb, 2015 7 commits
    • Michel Thierry's avatar
      drm/i915: Plumb drm_device through page tables operations · 06dc68d6
      Michel Thierry authored
      The next patch in the series will require it for alloc_pt_single.
      
      v2: Rebased after s/page_tables/page_table/.
      Signed-off-by: default avatarMichel Thierry <michel.thierry@intel.com>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      06dc68d6
    • Ben Widawsky's avatar
      drm/i915: Create page table allocators · 06fda602
      Ben Widawsky authored
      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: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v3+)
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      06fda602
    • Ben Widawsky's avatar
      drm/i915: Complete page table structures · 7324cc04
      Ben Widawsky authored
      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: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v2+)
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7324cc04
    • Ben Widawsky's avatar
      drm/i915: page table abstractions · d7b3de91
      Ben Widawsky authored
      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: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v2+)
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      d7b3de91
    • Sonika Jindal's avatar
      drm/i915/skl: Add support for edp1.4 low vswing · 7ad14a29
      Sonika Jindal authored
      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: default avatarSonika Jindal <sonika.jindal@intel.com>
      Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7ad14a29
    • Sonika Jindal's avatar
      drm/i915/skl: Support for edp low_vswing param in vbt · 9a57f5bb
      Sonika Jindal authored
      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: default avatarSonika Jindal <sonika.jindal@intel.com>
      Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      9a57f5bb
    • Dan Carpenter's avatar
      drm/i915: cleanup some indenting · ba0635ff
      Dan Carpenter authored
      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: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      ba0635ff
  2. 24 Feb, 2015 8 commits
  3. 23 Feb, 2015 20 commits
  4. 13 Feb, 2015 5 commits