All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/37] drm: Deduplicate fb format information (v2)
@ 2016-11-18 19:52 ville.syrjala
  2016-11-18 19:52 ` [PATCH 01/37] drm/i915: Add local 'fb' variables ville.syrjala
                   ` (38 more replies)
  0 siblings, 39 replies; 99+ messages in thread
From: ville.syrjala @ 2016-11-18 19:52 UTC (permalink / raw)
  To: dri-devel
  Cc: Ben Widawsky, Gerd Hoffmann, Paulo Zanoni, Sinclair Yeh,
	Liviu Dudau, intel-gfx, Alexey Brodkin, Thomas Hellstrom,
	Christian König, linux-graphics-maintainer,
	Laurent Pinchart, Mali DP Maintainers, Alex Deucher, Dave Airlie,
	Ben Skeggs

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Second installment of my effort to remove the duplicated
depth/bpp/pixel_format from drm_framebuffer and just use
struct drm_format_info instead.

I tried to address all of the review feedback, and collect
up all the r-bs I already got. Thanks for the review, guys.

Changes since the last version are roughly:
* drm_framebuffer_init() now fails if the fb isn't properly prepared
* Applied mode cocciry all over to use fb->format more extensively
* Dropped a few i915 specific patches that were taken care of the
  previous item
* Took up Laurent's idea that we can just compare the fb->format
  pointers instead of comparing the fb->format->format values
* Added a new .get_format_info() hooks for drivers to provide custom
  format information + an quick example patch how we'd hook it up
  for i915 render compression support

Link to the previous version:
https://lists.freedesktop.org/archives/dri-devel/2016-November/124135.html

Entire series is available here:
git://github.com/vsyrjala/linux.git fb_format_dedup_2

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Brian Starkey <brian.starkey@arm.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-graphics-maintainer@vmware.com
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>

Ville Syrjälä (37):
  drm/i915: Add local 'fb' variables
  drm/radeon: Add local 'fb' variables
  drm/radeon: Use DIV_ROUND_UP()
  drm/mgag200: Add local 'fb' variable
  drm/ast: Add local 'fb' variables
  drm/gma500: Add some local 'fb' variables
  drm/cirrus: Add some local 'fb' variables
  drm/arcpgu: Add local 'fb' variables
  drm/arm: Add local 'fb' variables
  drm/nouveau: Fix crtc->primary->fb vs. drm_fb fail
  drm/nouveau: Add local 'fb' variables
  drm/vmwgfx: Populate fb->dev before drm_framebuffer_init()
  drm: Pass 'dev' to drm_helper_mode_fill_fb_struct()
  drm/vmwgfx: Populate fb->pixel_format
  drm/qxl: Call drm_helper_mode_fill_fb_struct() before
    drm_framebuffer_init()
  drm/virtio: Call drm_helper_mode_fill_fb_struct() before
    drm_framebuffer_init()
  drm/i915: Set fb->dev early on for inherited fbs
  drm: Populate fb->dev from drm_helper_mode_fill_fb_struct()
  drm: Store a pointer to drm_format_info under drm_framebuffer
  drm/vmwgfx: Populate fb->format correctly
  drm/i915: Populate fb->format early for inherited fbs
  drm: Reject fbs w/o format info in drm_framebuffer_init()
  drm: Replace drm_format_num_planes() with fb->format->num_planes
  drm/i915: Eliminate the ugly 'fb?:' constructs from the ilk/skl wm
    code
  drm: Replace drm_format_plane_cpp() with fb->format->cpp[]
  drm/fb_cma_helper: Replace drm_format_info() with fb->format
  drm/nouveau: Use fb->format rather than drm_format_info()
  drm/i915: Store a pointer to the pixel format info for fbc
  drm: Add drm_framebuffer_plane_{width,height}()
  drm/i915: Use drm_framebuffer_plane_{width,height}() where possible
  drm: Nuke fb->depth
  drm: Nuke fb->bits_per_pixel
  drm: Nuke fb->pixel_format
  drm: Replace 'format->format' comparisons to just 'format' comparisons
  drm: Eliminate the useless "non-RGB fb" debug message
  drm: Add mode_config .get_format_info() hook
  drm/i915: Implement .get_format_info() hook for CCS

 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c     |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c          |   4 +-
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c          |   6 +-
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c          |   6 +-
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c           |   6 +-
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c           |   6 +-
 drivers/gpu/drm/arc/arcpgu_crtc.c               |   3 +-
 drivers/gpu/drm/arm/hdlcd_crtc.c                |  18 ++--
 drivers/gpu/drm/arm/malidp_planes.c             |  10 +--
 drivers/gpu/drm/armada/armada_crtc.c            |   6 +-
 drivers/gpu/drm/armada/armada_fb.c              |   2 +-
 drivers/gpu/drm/armada/armada_fbdev.c           |   5 +-
 drivers/gpu/drm/armada/armada_overlay.c         |   6 +-
 drivers/gpu/drm/ast/ast_fb.c                    |   4 +-
 drivers/gpu/drm/ast/ast_main.c                  |   2 +-
 drivers/gpu/drm/ast/ast_mode.c                  |  16 ++--
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c |   2 +-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c |  22 ++---
 drivers/gpu/drm/bochs/bochs_fbdev.c             |   2 +-
 drivers/gpu/drm/bochs/bochs_mm.c                |   2 +-
 drivers/gpu/drm/cirrus/cirrus_fbdev.c           |   6 +-
 drivers/gpu/drm/cirrus/cirrus_main.c            |   2 +-
 drivers/gpu/drm/cirrus/cirrus_mode.c            |   9 +-
 drivers/gpu/drm/drm_atomic.c                    |   8 +-
 drivers/gpu/drm/drm_crtc.c                      |   4 +-
 drivers/gpu/drm/drm_crtc_helper.c               |   3 +-
 drivers/gpu/drm/drm_fb_cma_helper.c             |  13 ++-
 drivers/gpu/drm/drm_fb_helper.c                 |  10 +--
 drivers/gpu/drm/drm_fourcc.c                    |  25 ++++++
 drivers/gpu/drm/drm_framebuffer.c               |  62 +++++++++++--
 drivers/gpu/drm/drm_modeset_helper.c            |  22 +----
 drivers/gpu/drm/drm_plane.c                     |   6 +-
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c   |   6 +-
 drivers/gpu/drm/exynos/exynos7_drm_decon.c      |   8 +-
 drivers/gpu/drm/exynos/exynos_drm_fb.c          |   2 +-
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c       |   6 +-
 drivers/gpu/drm/exynos/exynos_drm_fimd.c        |   4 +-
 drivers/gpu/drm/exynos/exynos_mixer.c           |  12 +--
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c     |   4 +-
 drivers/gpu/drm/gma500/accel_2d.c               |   2 +-
 drivers/gpu/drm/gma500/framebuffer.c            |   6 +-
 drivers/gpu/drm/gma500/gma_display.c            |  13 +--
 drivers/gpu/drm/gma500/mdfld_intel_display.c    |  17 ++--
 drivers/gpu/drm/gma500/oaktrail_crtc.c          |  13 +--
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c |   6 +-
 drivers/gpu/drm/i915/i915_debugfs.c             |  11 +--
 drivers/gpu/drm/i915/i915_drv.h                 |   4 +-
 drivers/gpu/drm/i915/intel_atomic_plane.c       |   4 +-
 drivers/gpu/drm/i915/intel_display.c            | 115 ++++++++++++++++--------
 drivers/gpu/drm/i915/intel_fbc.c                |  14 +--
 drivers/gpu/drm/i915/intel_fbdev.c              |  10 +--
 drivers/gpu/drm/i915/intel_overlay.c            |  26 +++---
 drivers/gpu/drm/i915/intel_pm.c                 |  67 +++++++-------
 drivers/gpu/drm/i915/intel_sprite.c             |  14 +--
 drivers/gpu/drm/imx/ipuv3-plane.c               |  40 ++++-----
 drivers/gpu/drm/mediatek/mtk_drm_fb.c           |   2 +-
 drivers/gpu/drm/mediatek/mtk_drm_plane.c        |   4 +-
 drivers/gpu/drm/mgag200/mgag200_fb.c            |   4 +-
 drivers/gpu/drm/mgag200/mgag200_main.c          |   2 +-
 drivers/gpu/drm/mgag200/mgag200_mode.c          |  23 ++---
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c       |   2 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c       |   4 +-
 drivers/gpu/drm/msm/msm_fb.c                    |  12 +--
 drivers/gpu/drm/msm/msm_fbdev.c                 |   2 +-
 drivers/gpu/drm/nouveau/dispnv04/crtc.c         |  17 ++--
 drivers/gpu/drm/nouveau/dispnv04/dfp.c          |   3 +-
 drivers/gpu/drm/nouveau/dispnv04/overlay.c      |   8 +-
 drivers/gpu/drm/nouveau/nouveau_display.c       |   4 +-
 drivers/gpu/drm/nouveau/nouveau_fbcon.c         |   3 +-
 drivers/gpu/drm/nouveau/nv50_display.c          |  14 ++-
 drivers/gpu/drm/omapdrm/omap_fb.c               |  12 +--
 drivers/gpu/drm/omapdrm/omap_fbdev.c            |   2 +-
 drivers/gpu/drm/qxl/qxl_display.c               |   2 +-
 drivers/gpu/drm/qxl/qxl_draw.c                  |   2 +-
 drivers/gpu/drm/qxl/qxl_fb.c                    |   5 +-
 drivers/gpu/drm/radeon/atombios_crtc.c          |  19 ++--
 drivers/gpu/drm/radeon/r100.c                   |  10 ++-
 drivers/gpu/drm/radeon/radeon_display.c         |   8 +-
 drivers/gpu/drm/radeon/radeon_fb.c              |   4 +-
 drivers/gpu/drm/radeon/radeon_legacy_crtc.c     |  16 ++--
 drivers/gpu/drm/rcar-du/rcar_du_plane.c         |   4 +-
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c           |   4 +-
 drivers/gpu/drm/rockchip/rockchip_drm_fb.c      |   2 +-
 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c   |   5 +-
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c     |  22 ++---
 drivers/gpu/drm/shmobile/shmob_drm_crtc.c       |   6 +-
 drivers/gpu/drm/shmobile/shmob_drm_plane.c      |   4 +-
 drivers/gpu/drm/sti/sti_gdp.c                   |  10 +--
 drivers/gpu/drm/sti/sti_hqvdp.c                 |   2 +-
 drivers/gpu/drm/sun4i/sun4i_backend.c           |   5 +-
 drivers/gpu/drm/tegra/dc.c                      |   8 +-
 drivers/gpu/drm/tegra/drm.c                     |   5 +-
 drivers/gpu/drm/tegra/fb.c                      |   6 +-
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c            |   4 +-
 drivers/gpu/drm/tilcdc/tilcdc_plane.c           |   4 +-
 drivers/gpu/drm/udl/udl_fb.c                    |   6 +-
 drivers/gpu/drm/vc4/vc4_plane.c                 |   8 +-
 drivers/gpu/drm/virtio/virtgpu_display.c        |   3 +-
 drivers/gpu/drm/virtio/virtgpu_fb.c             |   4 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_fb.c              |  13 +--
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c             |  29 ++++--
 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c             |   5 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c            |   4 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c            |   2 +-
 drivers/gpu/drm/zte/zx_plane.c                  |   4 +-
 include/drm/drm_fourcc.h                        |   6 ++
 include/drm/drm_framebuffer.h                   |  27 +++---
 include/drm/drm_mode_config.h                   |  15 ++++
 include/drm/drm_modeset_helper.h                |   3 +-
 include/uapi/drm/drm_fourcc.h                   |   3 +
 110 files changed, 641 insertions(+), 470 deletions(-)

-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 99+ messages in thread

end of thread, other threads:[~2016-12-15 13:41 UTC | newest]

Thread overview: 99+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18 19:52 [PATCH v2 00/37] drm: Deduplicate fb format information (v2) ville.syrjala
2016-11-18 19:52 ` [PATCH 01/37] drm/i915: Add local 'fb' variables ville.syrjala
2016-11-30 14:44   ` Daniel Vetter
2016-11-18 19:52 ` [PATCH 02/37] drm/radeon: " ville.syrjala
2016-11-18 19:52 ` [PATCH 03/37] drm/radeon: Use DIV_ROUND_UP() ville.syrjala
2016-11-18 19:52 ` [PATCH 04/37] drm/mgag200: Add local 'fb' variable ville.syrjala
2016-11-30 14:45   ` Daniel Vetter
2016-11-18 19:52 ` [PATCH 05/37] drm/ast: Add local 'fb' variables ville.syrjala
2016-11-30 14:47   ` Daniel Vetter
2016-11-18 19:52 ` [PATCH 06/37] drm/gma500: Add some " ville.syrjala
2016-11-30 14:49   ` Daniel Vetter
2016-11-18 19:52 ` [PATCH 07/37] drm/cirrus: " ville.syrjala
2016-11-30 14:50   ` Daniel Vetter
2016-11-18 19:52 ` [PATCH 08/37] drm/arcpgu: Add " ville.syrjala
2016-11-21 15:30   ` Alexey Brodkin
2016-11-23 16:00   ` Alexey Brodkin
2016-11-18 19:52 ` [PATCH 09/37] drm/arm: " ville.syrjala
2016-11-18 20:30   ` Brian Starkey
2016-11-21 11:51   ` Liviu Dudau
2016-11-22 13:48     ` Ville Syrjälä
2016-11-22 13:57       ` Daniel Vetter
2016-11-18 19:52 ` [PATCH 10/37] drm/nouveau: Fix crtc->primary->fb vs. drm_fb fail ville.syrjala
2016-11-30 14:56   ` Daniel Vetter
2016-11-18 19:52 ` [PATCH 11/37] drm/nouveau: Add local 'fb' variables ville.syrjala
2016-11-30 14:57   ` Daniel Vetter
2016-11-18 19:52 ` [PATCH 12/37] drm/vmwgfx: Populate fb->dev before drm_framebuffer_init() ville.syrjala
2016-11-21 17:10   ` Sinclair Yeh
2016-11-22 13:53   ` [PATCH v2 " ville.syrjala
2016-11-18 19:52 ` [PATCH 13/37] drm: Pass 'dev' to drm_helper_mode_fill_fb_struct() ville.syrjala
2016-12-14 20:48   ` [PATCH v2 " ville.syrjala
2016-11-18 19:52 ` [PATCH 14/37] drm/vmwgfx: Populate fb->pixel_format ville.syrjala
2016-11-21 17:10   ` Sinclair Yeh
2016-11-18 19:52 ` [PATCH 15/37] drm/qxl: Call drm_helper_mode_fill_fb_struct() before drm_framebuffer_init() ville.syrjala
2016-11-18 19:52 ` [PATCH 16/37] drm/virtio: " ville.syrjala
2016-11-30 15:32   ` Daniel Vetter
2016-11-18 19:52 ` [PATCH 17/37] drm/i915: Set fb->dev early on for inherited fbs ville.syrjala
2016-11-30 15:36   ` Daniel Vetter
2016-11-18 19:52 ` [PATCH v2 18/37] drm: Populate fb->dev from drm_helper_mode_fill_fb_struct() ville.syrjala
2016-11-18 19:52 ` [PATCH v2 19/37] drm: Store a pointer to drm_format_info under drm_framebuffer ville.syrjala
2016-11-19  2:33   ` Laurent Pinchart
2016-11-18 19:52 ` [PATCH 20/37] drm/vmwgfx: Populate fb->format correctly ville.syrjala
2016-11-30 15:40   ` Daniel Vetter
2016-11-30 16:03     ` Ville Syrjälä
2016-11-30 16:09       ` Laurent Pinchart
2016-11-30 17:22         ` Daniel Vetter
2016-11-30 15:52   ` Daniel Vetter
2016-11-18 19:52 ` [PATCH 21/37] drm/i915: Populate fb->format early for inherited fbs ville.syrjala
2016-11-30 15:42   ` Daniel Vetter
2016-11-30 15:57     ` Ville Syrjälä
2016-11-30 16:09     ` Daniel Vetter
2016-11-18 19:52 ` [PATCH 22/37] drm: Reject fbs w/o format info in drm_framebuffer_init() ville.syrjala
2016-11-19  2:36   ` Laurent Pinchart
2016-11-18 19:52 ` [PATCH 23/37] drm: Replace drm_format_num_planes() with fb->format->num_planes ville.syrjala
2016-11-19  2:41   ` Laurent Pinchart
2016-12-14 21:30   ` [PATCH v2 " ville.syrjala
2016-11-18 19:53 ` [PATCH 24/37] drm/i915: Eliminate the ugly 'fb?:' constructs from the ilk/skl wm code ville.syrjala
2016-11-30 15:51   ` [Intel-gfx] " Daniel Vetter
2016-11-30 15:59     ` Ville Syrjälä
2016-11-18 19:53 ` [PATCH 25/37] drm: Replace drm_format_plane_cpp() with fb->format->cpp[] ville.syrjala
2016-11-19  2:44   ` Laurent Pinchart
2016-12-14 21:30   ` [PATCH v2 " ville.syrjala
2016-11-18 19:53 ` [PATCH 26/37] drm/fb_cma_helper: Replace drm_format_info() with fb->format ville.syrjala
2016-11-18 19:53 ` [PATCH 27/37] drm/nouveau: Use fb->format rather than drm_format_info() ville.syrjala
2016-11-30 15:59   ` Daniel Vetter
2016-11-18 19:53 ` [PATCH 28/37] drm/i915: Store a pointer to the pixel format info for fbc ville.syrjala
2016-11-30 16:07   ` [Intel-gfx] " Daniel Vetter
2016-11-18 19:53 ` [PATCH 29/37] drm: Add drm_framebuffer_plane_{width,height}() ville.syrjala
2016-11-18 19:53 ` [PATCH 30/37] drm/i915: Use drm_framebuffer_plane_{width, height}() where possible ville.syrjala
2016-11-30 16:04   ` Daniel Vetter
2016-11-30 16:06   ` [Intel-gfx] " Daniel Vetter
2016-11-18 19:53 ` [PATCH 31/37] drm: Nuke fb->depth ville.syrjala
2016-11-30 16:01   ` Daniel Vetter
2016-12-14 21:31   ` [PATCH v2 " ville.syrjala
2016-11-18 19:53 ` [PATCH v2 32/37] drm: Nuke fb->bits_per_pixel ville.syrjala
2016-12-14 21:32   ` [PATCH v3 " ville.syrjala
2016-11-18 19:53 ` [PATCH v2 33/37] drm: Nuke fb->pixel_format ville.syrjala
2016-11-19  2:55   ` Laurent Pinchart
2016-12-14 21:32   ` [PATCH v3 " ville.syrjala
2016-11-18 19:53 ` [PATCH 34/37] drm: Replace 'format->format' comparisons to just 'format' comparisons ville.syrjala
2016-11-19  2:56   ` Laurent Pinchart
2016-11-18 19:53 ` [PATCH 35/37] drm: Eliminate the useless "non-RGB fb" debug message ville.syrjala
2016-11-19  2:57   ` Laurent Pinchart
2016-11-18 19:53 ` [PATCH 36/37] drm: Add mode_config .get_format_info() hook ville.syrjala
2016-11-20  8:13   ` Laurent Pinchart
2016-11-21 13:18     ` Ville Syrjälä
2016-11-21 13:23       ` Laurent Pinchart
2016-11-21 13:31         ` Ville Syrjälä
2016-11-21 13:42           ` Laurent Pinchart
2016-11-21 14:25             ` Ville Syrjälä
2016-11-22 13:41   ` [PATCH v2 " ville.syrjala
2016-11-18 19:53 ` [PATCH 37/37] drm/i915: Implement .get_format_info() hook for CCS ville.syrjala
2016-11-18 23:31   ` Ben Widawsky
2016-11-21 14:37     ` Ville Syrjälä
2016-11-21  8:42   ` [Intel-gfx] " Tvrtko Ursulin
2016-11-21 13:27     ` Ville Syrjälä
2016-11-21 14:04       ` Tvrtko Ursulin
2016-11-21 11:18 ` [PATCH v2 00/37] drm: Deduplicate fb format information (v2) Christian König
2016-12-14 21:37 ` Ville Syrjälä
2016-12-15 13:41   ` Ville Syrjälä

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.