[igt-dev] [PATCH i-g-t v5 03/22] lib/igt_fb: Refactor create_bo_for_fb to prepare for VC4 support

Maxime Ripard maxime.ripard at bootlin.com
Wed Feb 20 16:43:50 UTC 2019


Hi,

On Wed, Feb 20, 2019 at 04:38:54PM +0100, Paul Kocialkowski wrote:
> The current create_bo_for_fb uses a device-specific BO instead of dumb
> allocation when dumb allocation is not appropriate and the driver is
> Intel. Then, it will assert that the parameters are appropriate for
> dumb allocation.
> 
> The conditions related to tiling, size and stride are sufficient for
> needing a device-specific BO and they are not specific to Intel.
> However, a device-specific BO for YUV is only needed for Intel.
> 
> Change the conditions accordingly and set a device_bo variable. This
> variable allows making fb->size calculation common between the
> device-specific and dumb paths. Use the variable after that and
> distinguish between the device types for allocating and error out if
> it's not supported.
> 
> This makes the extra checks that dumb allocation is valid redundant,
> since these cases will always fall under device-specific allocation
> and potentially error out then.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski at bootlin.com>

Reviewed-by: Maxime Ripard <maxime.ripard at bootlin.com>

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the igt-dev mailing list