1. 02 5月, 2012 2 次提交
  2. 28 4月, 2012 1 次提交
  3. 27 4月, 2012 1 次提交
    • D
      drm/i915: handle input/output sdvo timings separately in mode_set · 6651819b
      Daniel Vetter 提交于
      We seem to have a decent confusion between the output timings and the
      input timings of the sdvo encoder. If I understand the code correctly,
      we use the original mode unchanged for the output timings, safe for
      the lvds case. And we should use the adjusted mode for input timings.
      
      Clarify the situation by adding an explicit output_dtd to the sdvo
      mode_set function and streamline the code-flow by moving the input and
      output mode setting in the sdvo encode together.
      
      Furthermore testing showed that the sdvo input timing needs the
      unadjusted dotclock, the sdvo chip will automatically compute the
      required pixel multiplier to get a dotclock above 100 MHz.
      
      Fix this up when converting a drm mode to an sdvo dtd.
      
      This regression was introduced in
      
      commit c74696b9
      Author: Pavel Roskin <proski@gnu.org>
      Date:   Thu Sep 2 14:46:34 2010 -0400
      
          i915: revert some checks added by commit 32aad86f
      
      particularly the following hunk:
      
      diff --git a/drivers/gpu/drm/i915/intel_sdvo.c
      b/drivers/gpu/drm/i915/intel_sdvo.c
      index 093e914..62d22ae 100644
      --- a/drivers/gpu/drm/i915/intel_sdvo.c
      +++ b/drivers/gpu/drm/i915/intel_sdvo.c
      @@ -1122,11 +1123,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
      
           /* We have tried to get input timing in mode_fixup, and filled into
              adjusted_mode */
      -    if (intel_sdvo->is_tv || intel_sdvo->is_lvds) {
      -        intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode);
      +    intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode);
      +    if (intel_sdvo->is_tv || intel_sdvo->is_lvds)
               input_dtd.part2.sdvo_flags = intel_sdvo->sdvo_flags;
      -    } else
      -        intel_sdvo_get_dtd_from_mode(&input_dtd, mode);
      
           /* If it's a TV, we already set the output timing in mode_fixup.
            * Otherwise, the output timing is equal to the input timing.
      
      Due to questions raised in review, below a more elaborate analysis of
      the bug at hand:
      
      Sdvo seems to have two timings, one is the output timing which will be
      sent over whatever is connected on the other side of the sdvo chip (panel,
      hdmi screen, tv), the other is the input timing which will be generated by
      the gmch pipe. It looks like sdvo is expected to scale between the two.
      
      To make things slightly more complicated, we have a bunch of special
      cases:
      - For lvds panel we always use a fixed output timing, namely
        intel_sdvo->sdvo_lvds_fixed_mode, hence that special case.
      - Sdvo has an interface to generate a preferred input timing for a given
        output timing. This is the confusing thing that I've tried to clear up
        with the follow-on patches.
      - A special requirement is that the input pixel clock needs to be between
        100MHz and 200MHz (likely to keep it within the electromechanical design
        range of PCIe), 270MHz on later gen4+. Lower pixel clocks are
        doubled/quadrupled.
      
      The thing this patch tries to fix is that the pipe needs to be
      explicitly instructed to double/quadruple the pixels and needs the
      correspondingly higher pixel clock, whereas the sdvo adaptor seems to
      do that itself and needs the unadjusted pixel clock. For the sdvo
      encode side we already set the pixel mutliplier with a different
      command (0x21).
      
      This patch tries to fix this mess by:
      - Keeping the output mode timing in the unadjusted plain mode, safe
        for the lvds case.
      - Storing the input timing in the adjusted_mode with the adjusted
        pixel clock. This way we don't need to frob around with the core
        crtc mode set code.
      - Fixing up the pixelclock when constructing the sdvo dtd timing
        struct. This is why the first hunk of the patch is an integral part
        of the series.
      - Dropping the is_tv special case because input_dtd is equivalent to
        adjusted_mode after these changes. Follow-up patches clear this up
        further (by simply ripping out intel_sdvo->input_dtd because it's
        not needed).
      
      v2: Extend commit message with an in-depth bug analysis.
      Reported-and-Tested-by: NBernard Blackham <b-linuxgit@largestprime.net>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48157Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Cc: stable@kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6651819b
  4. 24 4月, 2012 2 次提交
  5. 22 4月, 2012 1 次提交
  6. 21 4月, 2012 1 次提交
    • L
      VM: add "vm_mmap()" helper function · 6be5ceb0
      Linus Torvalds 提交于
      This continues the theme started with vm_brk() and vm_munmap():
      vm_mmap() does the same thing as do_mmap(), but additionally does the
      required VM locking.
      
      This uninlines (and rewrites it to be clearer) do_mmap(), which sadly
      duplicates it in mm/mmap.c and mm/nommu.c.  But that way we don't have
      to export our internal do_mmap_pgoff() function.
      
      Some day we hopefully don't have to export do_mmap() either, if all
      modular users can become the simpler vm_mmap() instead.  We're actually
      very close to that already, with the notable exception of the (broken)
      use in i810, and a couple of stragglers in binfmt_elf.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6be5ceb0
  7. 18 4月, 2012 1 次提交
  8. 17 4月, 2012 1 次提交
  9. 16 4月, 2012 1 次提交
  10. 12 4月, 2012 2 次提交
    • D
      drm/i915: clear fencing tracking state when retiring requests · 15a13bbd
      Daniel Vetter 提交于
      This fixes a resume regression introduced in
      
      commit 7dd49065
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Wed Mar 21 10:48:18 2012 +0000
      
          drm/i915: Mark untiled BLT commands as fenced on gen2/3
      
      which fixed fencing tracking for untiled blt commands.
      
      A side effect of that patch was that now also untiled objects have a
      non-zero obj->last_fenced_seqno to track when a fence can be set up
      after a pipelined tiling change. Unfortunately this was only cleared
      by the fence setup and teardown code, resulting in tons of untiled but
      inactive objects with non-zero last_fenced_seqno.
      
      Now after resume we completely reset the seqno tracking, both on the
      driver side (by setting dev_priv->next_seqno = 1) and on the hw side
      (by allocating a new hws page, which contains the seqnos). Hilarity
      and indefinite waits ensued from the stale seqnos in
      obj->last_fenced_seqno from before the suspend.
      
      The fix is to properly clear the fencing tracking state like we
      already do for the normal gpu rendering while moving objects off the
      active list.
      Reported-and-tested-by: N"Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      15a13bbd
    • J
      drm/i915: make rc6 module parameter read-only · f57f9c16
      Jesse Barnes 提交于
      People have been getting confused and thinking this is a runtime control.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f57f9c16
  11. 11 4月, 2012 4 次提交
  12. 10 4月, 2012 2 次提交
  13. 06 4月, 2012 1 次提交
    • S
      simple_open: automatically convert to simple_open() · 234e3405
      Stephen Boyd 提交于
      Many users of debugfs copy the implementation of default_open() when
      they want to support a custom read/write function op.  This leads to a
      proliferation of the default_open() implementation across the entire
      tree.
      
      Now that the common implementation has been consolidated into libfs we
      can replace all the users of this function with simple_open().
      
      This replacement was done with the following semantic patch:
      
      <smpl>
      @ open @
      identifier open_f != simple_open;
      identifier i, f;
      @@
      -int open_f(struct inode *i, struct file *f)
      -{
      (
      -if (i->i_private)
      -f->private_data = i->i_private;
      |
      -f->private_data = i->i_private;
      )
      -return 0;
      -}
      
      @ has_open depends on open @
      identifier fops;
      identifier open.open_f;
      @@
      struct file_operations fops = {
      ...
      -.open = open_f,
      +.open = simple_open,
      ...
      };
      </smpl>
      
      [akpm@linux-foundation.org: checkpatch fixes]
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      234e3405
  14. 03 4月, 2012 4 次提交
  15. 02 4月, 2012 2 次提交
  16. 01 4月, 2012 8 次提交
  17. 29 3月, 2012 1 次提交
  18. 21 3月, 2012 1 次提交
  19. 08 3月, 2012 2 次提交
  20. 02 3月, 2012 1 次提交
  21. 01 3月, 2012 1 次提交