diff options
author | Paul Kocialkowski <paul.kocialkowski@bootlin.com> | 2019-02-20 16:11:16 +0100 |
---|---|---|
committer | Paul Kocialkowski <paul.kocialkowski@bootlin.com> | 2019-02-26 09:45:54 +0100 |
commit | 9e0c839821cec85e38f9ddb719e134759e892b0a (patch) | |
tree | e1118c8895dae7ad33b200e8d2e193792f590425 /lib/igt_pm.c | |
parent | e1092cb8a1f6f0b92bb5867e2c87e141c13b8178 (diff) |
lib/igt_fb: Refactor create_bo_for_fb to prepare for VC4 support
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@bootlin.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'lib/igt_pm.c')
0 files changed, 0 insertions, 0 deletions