summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c
diff options
context:
space:
mode:
authorLowry Li (Arm Technology China) <Lowry.Li@arm.com>2019-04-22 04:16:26 +0100
committerLiviu Dudau <Liviu.Dudau@arm.com>2019-06-19 11:42:16 +0100
commit429bfabe00549c3a5db4d7d6aacd7852a1f53f12 (patch)
tree250ebf5834e78c147b77f4521774c28657596661 /drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c
parent0e52ab9ff0fc8a1cb9ea11c5fed4c2c4e47ae899 (diff)
drm/komeda: Add rotation support on Komeda driver
- Adds rotation property to plane. - Komeda display rotation support diverges from the specific formats, so need to check the user required rotation type with the format caps and reject the commit if it can not be supported. - In the layer validate flow, sets the rotation value to the layer state. If r90 or r270, swap the width and height of the data flow for next stage. Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com> Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c')
-rw-r--r--drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c
index db34ea26760c..34737c0b8156 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c
@@ -339,6 +339,13 @@ komeda_layer_validate(struct komeda_layer *layer,
/* update the data flow for the next stage */
komeda_component_set_output(&dflow->input, &layer->base, 0);
+ /*
+ * The rotation has been handled by layer, so adjusted the data flow for
+ * the next stage.
+ */
+ if (drm_rotation_90_or_270(st->rot))
+ swap(dflow->in_h, dflow->in_w);
+
return 0;
}