1. 15 Oct, 2020 5 commits
  2. 14 Oct, 2020 1 commit
  3. 13 Oct, 2020 2 commits
  4. 12 Oct, 2020 1 commit
    • Randy Dunlap's avatar
      drm/aspeed: Fix Kconfig warning & subsequent build errors · bf296b35
      Randy Dunlap authored
      Kernel test robot reported build errors (undefined references)
      that didn't make much sense. After reproducing them, there is also
      a Kconfig warning that is the root cause of the build errors, so
      fix that Kconfig problem.
      
      Fixes this Kconfig warning:
      WARNING: unmet direct dependencies detected for CMA
        Depends on [n]: MMU [=n]
        Selected by [m]:
        - DRM_ASPEED_GFX [=m] && HAS_IOMEM [=y] && DRM [=m] && OF [=y] && (COMPILE_TEST [=y] || ARCH_ASPEED) && HAVE_DMA_CONTIGUOUS [=y]
      
      and these dependent build errors:
      (.text+0x10c8c): undefined reference to `start_isolate_page_range'
      microblaze-linux-ld: (.text+0x10f14): undefined reference to `test_pages_isolated'
      microblaze-linux-ld: (.text+0x10fd0): undefined reference to `undo_isolate_page_range'
      
      Fixes: 76356a96 ("drm: aspeed: Clean up Kconfig options")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reviewed-by: default avatarJoel Stanley <joel@jms.id.au>
      Cc: Joel Stanley <joel@jms.id.au>
      Cc: Andrew Jeffery <andrew@aj.id.au>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: linux-mm@kvack.org
      Cc: linux-aspeed@lists.ozlabs.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: David Airlie <airlied@linux.ie>
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201011230131.4922-1-rdunlap@infradead.orgSigned-off-by: default avatarJoel Stanley <joel@jms.id.au>
      bf296b35
  5. 10 Oct, 2020 2 commits
  6. 09 Oct, 2020 5 commits
    • Simon Ser's avatar
      drm/fourcc: document modifier uniqueness requirements · ec5722ad
      Simon Ser authored
      There have suggestions to bake pitch alignment, address alignment,
      contiguous memory or other placement (hidden VRAM, GTT/BAR, etc)
      constraints into modifiers. Last time this was brought up it seemed
      like the consensus was to not allow this. Document this in drm_fourcc.h.
      
      There are several reasons for this.
      
      - Encoding all of these constraints in the modifiers would explode the
        search space pretty quickly (we only have 64 bits to work with).
      - Modifiers need to be unambiguous: a buffer can only have a single
        modifier.
      - Modifier users aren't expected to parse modifiers (except drivers).
      
      v2: add paragraph about aliases (Daniel)
      
      v3: fix unrelated changes sent with the patch
      
      v4: disambiguate users between driver and higher-level programs (Brian,
      Daniel)
      
      v5: fix AFBC example (Brian, Daniel)
      
      v6: remove duplicated paragraph (Daniel)
      Signed-off-by: default avatarSimon Ser <contact@emersion.fr>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: default avatarBrian Starkey <brian.starkey@arm.com>
      Cc: Daniel Stone <daniel@fooishbar.org>
      Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Marek Olšák <maraeo@gmail.com>
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Michel Dänzer <michel@daenzer.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/MGwgeXojKNdNXjCxuMhRlwcJM4vdYph_WJcMeGPPGMcRKtHV41XAXlh2tCc-pPJZCAhS3gwbWMWTd8f03NBA2ZYKfr0QxLhcPivpopr5c6M=@emersion.fr
      ec5722ad
    • Thomas Zimmermann's avatar
      drm/aspeed: Set driver CMA functions with DRM_GEM_CMA_DRIVER_OPS · 178c7235
      Thomas Zimmermann authored
      DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver
      to their defaults. No functional changes are made.
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarJoel Stanley <joel@jms.id.au>
      Acked-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200603083132.4610-5-tzimmermann@suse.de
      178c7235
    • Maxime Ripard's avatar
      drm/atomic: Pass the full state to CRTC atomic enable/disable · 351f950d
      Maxime Ripard authored
      If the CRTC driver ever needs to access the full DRM state, it can't do so
      at atomic_enable / atomic_disable time since drm_atomic_helper_swap_state
      will have cleared the pointer from the struct drm_crtc_state to the struct
      drm_atomic_state before calling those hooks.
      
      In order to allow that, let's pass the full DRM state to atomic_enable and
      atomic_disable. 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 dev, state;
      identifier crtc, crtc_state;
      @@
      
       disable_outputs(struct drm_device *dev, struct drm_atomic_state *state)
       {
       	<...
      -	FUNCS->atomic_disable(crtc, crtc_state);
      +	FUNCS->atomic_disable(crtc, state);
       	...>
       }
      
      @@
      struct drm_crtc_helper_funcs *FUNCS;
      identifier dev, state;
      identifier crtc, crtc_state;
      @@
      
       drm_atomic_helper_commit_modeset_enables(struct drm_device *dev, struct drm_atomic_state *state)
       {
       	<...
      -	FUNCS->atomic_enable(crtc, crtc_state);
      +	FUNCS->atomic_enable(crtc, state);
       	...>
       }
      
      @@
      identifier crtc, old_state;
      @@
      
       struct drm_crtc_helper_funcs {
      	...
      -	void (*atomic_enable)(struct drm_crtc *crtc, struct drm_crtc_state *old_state);
      +	void (*atomic_enable)(struct drm_crtc *crtc, struct drm_atomic_state *state);
      	...
      -	void (*atomic_disable)(struct drm_crtc *crtc, struct drm_crtc_state *old_state);
      +	void (*atomic_disable)(struct drm_crtc *crtc, struct drm_atomic_state *state);
      	...
      }
      
      @ crtc_atomic_func @
      identifier helpers;
      identifier func;
      @@
      
      (
      static struct drm_crtc_helper_funcs helpers = {
      	...,
      	.atomic_enable = func,
      	...,
      };
      |
      static struct drm_crtc_helper_funcs helpers = {
      	...,
      	.atomic_disable = 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
      	...+>
      
      }
      
      @ 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>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/845aa10ef171fc0ea060495efef142a0c13f7870.1602161031.git-series.maxime@cerno.tech
      351f950d
    • Ondrej Jirman's avatar
      c76eb355
    • Joel Stanley's avatar
      drm/aspeed: Add sysfs for output settings · 696029eb
      Joel Stanley authored
      These settings are used by an ASPEED BMC to determine when the host is
      trying to drive the display over PCIe (vga_pw) and to switch the
      output between PCIe and the internal graphics device (dac_mux).
      
      The valid values for the dac mux are:
      
       00: VGA mode (default, aka PCIe)
       01: Graphics CRT (aka BMC internal graphics, this driver)
       10: Pass through mode from video input port A
       11: Pass through mode from video input port B
      
      Values for the read-only vga password register are:
      
       1: Host driving the display
       0: Host not driving the display
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Reviewed-by: default avatarAndrew Jeffery <andrew@aj.id.au>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200916083413.777307-1-joel@jms.id.au
      696029eb
  7. 08 Oct, 2020 5 commits
  8. 07 Oct, 2020 13 commits
  9. 06 Oct, 2020 1 commit
  10. 05 Oct, 2020 5 commits