linux/drivers/gpu/drm/atmel-hlcdc
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
..
atmel_hlcdc_crtc.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
atmel_hlcdc_dc.c drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install 2019-01-29 15:45:06 +01:00
atmel_hlcdc_dc.h drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
atmel_hlcdc_output.c drm/atmel-hlcdc: support bus-width (12/16/18/24) in endpoint nodes 2018-08-27 21:22:52 +02:00
atmel_hlcdc_plane.c drm: Remove users of drm_format_(horz|vert)_chroma_subsampling 2019-05-20 13:33:11 +02:00
Kconfig drm/atmel-hlcdc: make fbdev support really optional 2016-07-15 10:28:33 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00