1. 05 Nov, 2020 19 commits
  2. 04 Nov, 2020 4 commits
  3. 03 Nov, 2020 4 commits
  4. 02 Nov, 2020 7 commits
    • Jason Gunthorpe's avatar
      drm: Remove SCATTERLIST_MAX_SEGMENT · 7a60c2dd
      Jason Gunthorpe authored
      Since commit 9a40401c ("lib/scatterlist: Do not limit max_segment to
      PAGE_ALIGNED values") the max_segment input to sg_alloc_table_from_pages()
      does not have to be any special value. The new algorithm will always
      create something less than what the user provides. Thus eliminate this
      confusing constant.
      
      - vmwgfx should use the HW capability, not mix in the OS page size for
        calling dma_set_max_seg_size()
      
      - i915 uses i915_sg_segment_size() both for sg_alloc_table_from_pages
        and for some open coded sgl construction. This doesn't change the value
        since rounddown(size, UINT_MAX) == SCATTERLIST_MAX_SEGMENT
      
      - drm_prime_pages_to_sg uses it as a default if max_segment is zero,
        UINT_MAX is fine to use directly.
      
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Cc: Qian Cai <cai@lca.pw>
      Cc: "Ursulin, Tvrtko" <tvrtko.ursulin@intel.com>
      Suggested-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/0-v1-44733fccd781+13d-rm_scatterlist_max_jgg@nvidia.com
      7a60c2dd
    • Bernard Zhao's avatar
      gpu/drm: delete same check in if condition · 95d7a1a6
      Bernard Zhao authored
      In function drm_bridge_connector_get_modes_edid, drm_edid_is_valid
      will check weather (!edid), no need to check again in the if
      branch.
      Signed-off-by: default avatarBernard Zhao <bernard@vivo.com>
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201102030736.3833-1-bernard@vivo.com
      95d7a1a6
    • KuoHsiang Chou's avatar
      drm/ast: Support 1600x900 with 108MHz PCLK · 9bb7b689
      KuoHsiang Chou authored
      [New] Create the setting for 1600x900 @60Hz refresh rate
            by 108MHz pixel-clock.
      Signed-off-by: default avatarKuoHsiang Chou <kuohsiang_chou@aspeedtech.com>
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201030074212.22401-1-kuohsiang_chou@aspeedtech.com
      9bb7b689
    • Maxime Ripard's avatar
      drm/atomic: Pass the full state to CRTC atomic begin and flush · f6ebe9f9
      Maxime Ripard authored
      The current atomic helpers have either their object state being passed as
      an argument or the full atomic state.
      
      The former is the pattern that was done at first, before switching to the
      latter for new hooks or when it was needed.
      
      Let's start convert all the remaining helpers to provide a consistent
      interface, starting with the CRTC's atomic_begin and atomic_flush.
      
      The conversion was done using the coccinelle script below, built tested on
      all the drivers and actually tested on vc4.
      
      virtual report
      
      @@
      struct drm_crtc_helper_funcs *FUNCS;
      identifier old_crtc_state, old_state;
      identifier crtc;
      identifier f;
      @@
      
       f(struct drm_crtc_state *old_crtc_state)
       {
      	...
       	struct drm_atomic_state *old_state = old_crtc_state->state;
      	<...
      -	FUNCS->atomic_begin(crtc, old_crtc_state);
      +	FUNCS->atomic_begin(crtc, old_state);
      	...>
       }
      
      @@
      struct drm_crtc_helper_funcs *FUNCS;
      identifier old_crtc_state, old_state;
      identifier crtc;
      identifier f;
      @@
      
       f(struct drm_crtc_state *old_crtc_state)
       {
      	...
       	struct drm_atomic_state *old_state = old_crtc_state->state;
      	<...
      -	FUNCS->atomic_flush(crtc, old_crtc_state);
      +	FUNCS->atomic_flush(crtc, old_state);
      	...>
       }
      
      @@
      struct drm_crtc_helper_funcs *FUNCS;
      struct drm_crtc *crtc;
      struct drm_crtc_state *crtc_state;
      identifier dev, state;
      identifier f;
      @@
      
       f(struct drm_device *dev, struct drm_atomic_state *state, ...)
       {
      	<...
      -	FUNCS->atomic_begin(crtc, crtc_state);
      +	FUNCS->atomic_begin(crtc, state);
      	...>
       }
      
      @@
      struct drm_crtc_helper_funcs *FUNCS;
      struct drm_crtc *crtc;
      struct drm_crtc_state *crtc_state;
      identifier dev, state;
      identifier f;
      @@
      
       f(struct drm_device *dev, struct drm_atomic_state *state, ...)
       {
      	<...
      -	FUNCS->atomic_flush(crtc, crtc_state);
      +	FUNCS->atomic_flush(crtc, state);
      	...>
       }
      
      @@
      identifier crtc, old_state;
      @@
      
       struct drm_crtc_helper_funcs {
      	...
      -	void (*atomic_begin)(struct drm_crtc *crtc, struct drm_crtc_state *old_state);
      +	void (*atomic_begin)(struct drm_crtc *crtc, struct drm_atomic_state *state);
      	...
      -	void (*atomic_flush)(struct drm_crtc *crtc, struct drm_crtc_state *old_state);
      +	void (*atomic_flush)(struct drm_crtc *crtc, struct drm_atomic_state *state);
      	...
      }
      
      @ crtc_atomic_func @
      identifier helpers;
      identifier func;
      @@
      
      (
      static struct drm_crtc_helper_funcs helpers = {
      	...,
      	.atomic_begin = func,
      	...,
      };
      |
      static struct drm_crtc_helper_funcs helpers = {
      	...,
      	.atomic_flush = func,
      	...,
      };
      )
      
      @ ignores_old_state @
      identifier crtc_atomic_func.func;
      identifier crtc, old_state;
      @@
      
      void func(struct drm_crtc *crtc,
      		struct drm_crtc_state *old_state)
      {
      	... when != old_state
      }
      
      @ adds_old_state depends on crtc_atomic_func && !ignores_old_state @
      identifier crtc_atomic_func.func;
      identifier crtc, old_state;
      @@
      
      void func(struct drm_crtc *crtc, struct drm_crtc_state *old_state)
      {
      +	struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state, crtc);
      	...
      }
      
      @ depends on crtc_atomic_func @
      identifier crtc_atomic_func.func;
      expression E;
      type T;
      @@
      
      void func(...)
      {
      	...
      -	T state = E;
      +	T crtc_state = E;
      	<+...
      -	state
      +	crtc_state
      	...+>
      
      }
      
      @ depends on crtc_atomic_func @
      identifier crtc_atomic_func.func;
      type T;
      @@
      
      void func(...)
      {
      	...
      -	T state;
      +	T crtc_state;
      	<+...
      -	state
      +	crtc_state
      	...+>
      
      }
      
      @@
      identifier old_state;
      identifier crtc;
      @@
      
       void vc4_hvs_atomic_flush(struct drm_crtc *crtc,
      -			   struct drm_crtc_state *old_state
      +			   struct drm_atomic_state *state
      			   )
      {
      +	struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state, crtc);
      	...
      }
      
      @@
      identifier old_state;
      identifier crtc;
      @@
      
       void vc4_hvs_atomic_flush(struct drm_crtc *crtc,
      -			   struct drm_crtc_state *old_state
      +			   struct drm_atomic_state *state
      			   );
      
      @@
      identifier old_state;
      identifier crtc;
      @@
      
       void vmw_du_crtc_atomic_begin(struct drm_crtc *crtc,
      -			   struct drm_crtc_state *old_state
      +			   struct drm_atomic_state *state
      			   )
      {
      	...
      }
      
      @@
      identifier old_state;
      identifier crtc;
      @@
      
       void vmw_du_crtc_atomic_begin(struct drm_crtc *crtc,
      -			   struct drm_crtc_state *old_state
      +			   struct drm_atomic_state *state
      			   );
      
      @@
      identifier old_state;
      identifier crtc;
      @@
      
       void vmw_du_crtc_atomic_flush(struct drm_crtc *crtc,
      -			   struct drm_crtc_state *old_state
      +			   struct drm_atomic_state *state
      			   )
      {
      	...
      }
      
      @@
      identifier old_state;
      identifier crtc;
      @@
      
       void vmw_du_crtc_atomic_flush(struct drm_crtc *crtc,
      -			   struct drm_crtc_state *old_state
      +			   struct drm_atomic_state *state
      			   );
      
      @ depends on crtc_atomic_func @
      identifier crtc_atomic_func.func;
      identifier old_state;
      identifier crtc;
      @@
      
      void func(struct drm_crtc *crtc,
      -	       struct drm_crtc_state *old_state
      +	       struct drm_atomic_state *state
      	       )
      		{ ... }
      
      @ include depends on adds_old_state @
      @@
      
       #include <drm/drm_atomic.h>
      
      @ no_include depends on !include && adds_old_state @
      @@
      
      + #include <drm/drm_atomic.h>
        #include <drm/...>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201028123222.1732139-2-maxime@cerno.tech
      f6ebe9f9
    • Maxime Ripard's avatar
      drm/atomic: Pass the full state to CRTC atomic_check · 29b77ad7
      Maxime Ripard authored
      The current atomic helpers have either their object state being passed as
      an argument or the full atomic state.
      
      The former is the pattern that was done at first, before switching to the
      latter for new hooks or when it was needed.
      
      Let's start convert all the remaining helpers to provide a consistent
      interface, starting with the CRTC's atomic_check.
      
      The conversion was done using the coccinelle script below,
      built tested on all the drivers and actually tested on vc4.
      
      virtual report
      
      @@
      struct drm_crtc_helper_funcs *FUNCS;
      struct drm_crtc *crtc;
      struct drm_crtc_state *crtc_state;
      identifier dev, state;
      identifier ret, f;
      @@
      
       f(struct drm_device *dev, struct drm_atomic_state *state)
       {
      	<...
      -	ret = FUNCS->atomic_check(crtc, crtc_state);
      +	ret = FUNCS->atomic_check(crtc, state);
      	...>
       }
      
      @@
      identifier crtc, new_state;
      @@
      
       struct drm_crtc_helper_funcs {
       	...
      -	int (*atomic_check)(struct drm_crtc *crtc, struct drm_crtc_state *new_state);
      +	int (*atomic_check)(struct drm_crtc *crtc, struct drm_atomic_state *state);
       	...
      }
      
      @ crtc_atomic_func @
      identifier helpers;
      identifier func;
      @@
      
      static struct drm_crtc_helper_funcs helpers = {
      	...,
      	.atomic_check = func,
      	...,
      };
      
      @ ignores_new_state @
      identifier crtc_atomic_func.func;
      identifier crtc, new_state;
      @@
      
       int func(struct drm_crtc *crtc,
      		struct drm_crtc_state *new_state)
       {
      	... when != new_state
       }
      
      @ adds_new_state depends on crtc_atomic_func && !ignores_new_state @
      identifier crtc_atomic_func.func;
      identifier crtc, new_state;
      @@
      
       int func(struct drm_crtc *crtc, struct drm_crtc_state *new_state)
       {
      +	struct drm_crtc_state *new_state = drm_atomic_get_new_crtc_state(state, crtc);
       	...
       }
      
      @ depends on crtc_atomic_func @
      identifier crtc_atomic_func.func;
      expression E;
      type T;
      @@
      
       int func(...)
       {
      	...
      -	T state = E;
      +	T crtc_state = E;
       	<+...
      -	state
      +	crtc_state
       	...+>
       }
      
      @ depends on crtc_atomic_func @
      identifier crtc_atomic_func.func;
      type T;
      @@
      
       int func(...)
       {
       	...
      -	T state;
      +	T crtc_state;
       	<+...
      -	state
      +	crtc_state
       	...+>
       }
      
      @ depends on crtc_atomic_func @
      identifier crtc_atomic_func.func;
      identifier new_state;
      identifier crtc;
      @@
      
       int func(struct drm_crtc *crtc,
      -	       struct drm_crtc_state *new_state
      +	       struct drm_atomic_state *state
      	       )
       { ... }
      
      @@
      identifier new_state;
      identifier crtc;
      @@
      
       int vmw_du_crtc_atomic_check(struct drm_crtc *crtc,
      -                             struct drm_crtc_state *new_state
      +                             struct drm_atomic_state *state
                     )
       {
      +       struct drm_crtc_state *new_state = drm_atomic_get_new_crtc_state(state, crtc);
      	...
       }
      
      @@
      identifier new_state;
      identifier crtc;
      @@
      
       int vmw_du_crtc_atomic_check(struct drm_crtc *crtc,
      -                             struct drm_crtc_state *new_state
      +                             struct drm_atomic_state *state
                     );
      
      @ include depends on adds_new_state @
      @@
      
       #include <drm/drm_atomic.h>
      
      @ no_include depends on !include && adds_new_state @
      @@
      
      + #include <drm/drm_atomic.h>
        #include <drm/...>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201028123222.1732139-1-maxime@cerno.tech
      29b77ad7
    • Maxime Ripard's avatar
      drm/nouveau/ttm: Add limits.h · 95f4f40a
      Maxime Ripard authored
      It seems that a recent commit broke the nouveau compilation when swiotlb is
      disabled (which is the case on our ARM defconfig for example).
      
      Daniel says
      
      """
      Since the proper fix is maybe stuck in the usual "drm abuses swiotlb
      internals" bikeshed, maybe best if we push a fix to including limits.h
      in nouveau and call it done?
      """
      
      So let's go down the simplest path to fix our build, and goes back to it
      later if needed.
      
      Link: https://patchwork.freedesktop.org/patch/397835/
      Fixes: 4dbafbd3 ("drm/nouveu: fix swiotlb include")
      Acked-by: default avatarDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      95f4f40a
    • Maxime Ripard's avatar
      Merge drm/drm-next into drm-misc-next · c489573b
      Maxime Ripard authored
      Daniel needs -rc2 in drm-misc-next to merge some patches
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      c489573b
  5. 01 Nov, 2020 6 commits
    • Linus Torvalds's avatar
      Linux 5.10-rc2 · 3cea11cd
      Linus Torvalds authored
      3cea11cd
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7b56fbd8
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Three fixes all related to #DB:
      
         - Handle the BTF bit correctly so it doesn't get lost due to a kernel
           #DB
      
         - Only clear and set the virtual DR6 value used by ptrace on user
           space triggered #DB. A kernel #DB must leave it alone to ensure
           data consistency for ptrace.
      
         - Make the bitmasking of the virtual DR6 storage correct so it does
           not lose DR_STEP"
      
      * tag 'x86-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/debug: Fix DR_STEP vs ptrace_get_debugreg(6)
        x86/debug: Only clear/set ->virtual_dr6 for userspace #DB
        x86/debug: Fix BTF handling
      7b56fbd8
    • Linus Torvalds's avatar
      Merge tag 'timers-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4312e0e8
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "A few fixes for timers/timekeeping:
      
         - Prevent undefined behaviour in the timespec64_to_ns() conversion
           which is used for converting user supplied time input to
           nanoseconds. It lacked overflow protection.
      
         - Mark sched_clock_read_begin/retry() to prevent recursion in the
           tracer
      
         - Remove unused debug functions in the hrtimer and timerlist code"
      
      * tag 'timers-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        time: Prevent undefined behaviour in timespec64_to_ns()
        timers: Remove unused inline funtion debug_timer_free()
        hrtimer: Remove unused inline function debug_hrtimer_free()
        time/sched_clock: Mark sched_clock_read_begin/retry() as notrace
      4312e0e8
    • Linus Torvalds's avatar
      Merge tag 'smp-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 82423b46
      Linus Torvalds authored
      Pull smp fix from Thomas Gleixner:
       "A single fix for stop machine.
      
        Mark functions no trace to prevent a crash caused by recursion when
        enabling or disabling a tracer on RISC-V (probably all architectures
        which patch through stop machine)"
      
      * tag 'smp-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        stop_machine, rcu: Mark functions as notrace
      82423b46
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8d99084e
      Linus Torvalds authored
      Pull locking fixes from Thomas Gleixner:
       "A couple of locking fixes:
      
         - Fix incorrect failure injection handling in the fuxtex code
      
         - Prevent a preemption warning in lockdep when tracking
           local_irq_enable() and interrupts are already enabled
      
         - Remove more raw_cpu_read() usage from lockdep which causes state
           corruption on !X86 architectures.
      
         - Make the nr_unused_locks accounting in lockdep correct again"
      
      * tag 'locking-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        lockdep: Fix nr_unused_locks accounting
        locking/lockdep: Remove more raw_cpu_read() usage
        futex: Fix incorrect should_fail_futex() handling
        lockdep: Fix preemption WARN for spurious IRQ-enable
      8d99084e
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 31f02006
      Linus Torvalds authored
      Pull char/misc fixes/removals from Greg KH:
       "Here's some small fixes for 5.10-rc2 and a big driver removal.
      
        The fixes are for some reported issues in the interconnect and
        coresight drivers, nothing major.
      
        The "big" driver removal is the MIC drivers have been asked to be
        removed as the hardware never shipped and Intel no longer wants to
        maintain something that no one can use. This is welcomed by many as
        the DMA usage of these drivers was "interesting" and the security
        people were starting to question some issues that were starting to be
        found in the codebase.
      
        Note, one of the subsystems for this driver, the "VOP" code, will
        probably come back in future kernel versions as it was looking to
        potentially solve some PCIe virtualization issues that a number of
        other vendors were wanting to solve. But as-is, this codebase didn't
        work for anyone else so no actual functionality is being removed.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'char-misc-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        coresight: cti: Initialize dynamic sysfs attributes
        coresight: Fix uninitialised pointer bug in etm_setup_aux()
        coresight: add module license
        misc: mic: remove the MIC drivers
        interconnect: qcom: use icc_sync state for sm8[12]50
        interconnect: qcom: Ensure that the floor bandwidth value is enforced
        interconnect: qcom: sc7180: Init BCMs before creating the nodes
        interconnect: qcom: sdm845: Init BCMs before creating the nodes
        interconnect: Aggregate before setting initial bandwidth
        interconnect: qcom: sdm845: Enable keepalive for the MM1 BCM
      31f02006