linux/drivers/gpu/drm/vc4
Maxime Ripard f3e9632cb6
drm: Remove users of drm_format_(horz|vert)_chroma_subsampling
drm_format_horz_chroma_subsampling and drm_format_vert_chroma_subsampling
are basically a lookup in the drm_format_info table plus an access to the
hsub and vsub fields of the appropriate entry.

Most drivers are using this function while having access to the entry
already, which means that we will perform an unnecessary lookup. Removing
the call to these functions is therefore more efficient.

Some drivers will not have access to that entry in the function, but in
this case the overhead is minimal (we just have to call drm_format_info()
to perform the lookup) and we can even avoid multiple, inefficient lookups
in some places that need multiple fields from the drm_format_info
structure.

This is amplified by the fact that most of the time the callers will have
to retrieve both the vsub and hsub fields, meaning that they would perform
twice the lookup.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6b3cceb8161e2c1d40c2681de99202328b0a8abc.1558002671.git-series.maxime.ripard@bootlin.com
2019-05-20 13:33:11 +02:00
..
Kconfig drm/vc4: add HDMI CEC support 2017-07-26 12:15:12 -07:00
Makefile drm/vc4: Add support for the transposer block 2018-07-07 07:54:46 +02:00
vc4_bo.c drm/vc4: Use common helpers for debugfs setup by the driver components. 2019-04-03 12:49:13 -07:00
vc4_crtc.c drm/vc4: Use common helpers for debugfs setup by the driver components. 2019-04-03 12:49:13 -07:00
vc4_debugfs.c drm/vc4: vc4_debugfs_regset32() can be static 2019-04-04 12:56:45 -07:00
vc4_dpi.c drm/vc4: Use common helpers for debugfs setup by the driver components. 2019-04-03 12:49:13 -07:00
vc4_drv.c drm/vc4: Disable V3D interactions if the v3d component didn't probe. 2019-04-03 12:49:18 -07:00
vc4_drv.h drm/vc4: Disable V3D interactions if the v3d component didn't probe. 2019-04-03 12:49:18 -07:00
vc4_dsi.c drm/vc4: Use common helpers for debugfs setup by the driver components. 2019-04-03 12:49:13 -07:00
vc4_fence.c drm/vc4: Remove unecessary dma_fence_ops 2018-07-03 13:14:10 +02:00
vc4_gem.c drm/vc4: Disable V3D interactions if the v3d component didn't probe. 2019-04-03 12:49:18 -07:00
vc4_hdmi.c drm/vc4: Use common helpers for debugfs setup by the driver components. 2019-04-03 12:49:13 -07:00
vc4_hvs.c drm/vc4: Use common helpers for debugfs setup by the driver components. 2019-04-03 12:49:13 -07:00
vc4_irq.c drm/vc4: Disable V3D interactions if the v3d component didn't probe. 2019-04-03 12:49:18 -07:00
vc4_kms.c drm/vc4: Disable V3D interactions if the v3d component didn't probe. 2019-04-03 12:49:18 -07:00
vc4_packet.h
vc4_perfmon.c drm/vc4: Disable V3D interactions if the v3d component didn't probe. 2019-04-03 12:49:18 -07:00
vc4_plane.c drm: Remove users of drm_format_(horz|vert)_chroma_subsampling 2019-05-20 13:33:11 +02:00
vc4_qpu_defines.h
vc4_regs.h drm/vc4: Report HVS underrun errors 2019-03-06 14:47:59 +01:00
vc4_render_cl.c drm/vc4: Make sure to emit a tile coordinates between two MSAA loads. 2019-04-01 09:33:38 -07:00
vc4_trace_points.c
vc4_trace.h drm/vc4: Use correct path to trace include 2017-09-05 11:11:20 +02:00
vc4_txp.c drm-misc-next for 5.2: 2019-04-05 11:38:02 +10:00
vc4_v3d.c drm/vc4: Disable V3D interactions if the v3d component didn't probe. 2019-04-03 12:49:18 -07:00
vc4_validate_shaders.c drm/vc4: Fix memory leak during BO teardown 2018-04-09 12:42:08 -07:00
vc4_validate.c drm/vc4_validate: Remove VLA usage 2018-03-16 15:51:52 -07:00
vc4_vec.c drm/vc4: Use common helpers for debugfs setup by the driver components. 2019-04-03 12:49:13 -07:00