diff mbox

[27/29] drm/amd/dal: Correctly interpret rotation as bit set

Message ID 1455211209-26733-28-git-send-email-harry.wentland@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Harry Wentland Feb. 11, 2016, 5:20 p.m. UTC
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Mykola Lysenko <mykola.lysenko@amd.com>
---
 drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Oded Gabbay Feb. 11, 2016, 9 p.m. UTC | #1
On Thu, Feb 11, 2016 at 7:20 PM, Harry Wentland <harry.wentland@amd.com> wrote:
> Signed-off-by: Harry Wentland <harry.wentland@amd.com>
> Reviewed-by: Mykola Lysenko <mykola.lysenko@amd.com>
> ---
>  drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
> index 1cc9fd1054ab..da6c0116aa1a 100644
> --- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
> +++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
> @@ -366,16 +366,16 @@ static bool fill_rects_from_plane_state(
>         surface->clip_rect = surface->dst_rect;
>
>         switch (state->rotation) {
> -       case DRM_ROTATE_0:
> +       case BIT(DRM_ROTATE_0):
>                 surface->rotation = ROTATION_ANGLE_0;
>                 break;
> -       case DRM_ROTATE_90:
> +       case BIT(DRM_ROTATE_90):
>                 surface->rotation = ROTATION_ANGLE_90;
>                 break;
> -       case DRM_ROTATE_180:
> +       case BIT(DRM_ROTATE_180):
>                 surface->rotation = ROTATION_ANGLE_180;
>                 break;
> -       case DRM_ROTATE_270:
> +       case BIT(DRM_ROTATE_270):
>                 surface->rotation = ROTATION_ANGLE_270;
>                 break;
>         default:
> --
> 2.1.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

One minor suggestion for the V2 of this patch-set, please squash
patches 27-29 into the previous patches (relevant to the code they
change). No point in reviewing code of earlier patches that is later
going to be changed by a patch in the same patch-set.

Thanks,

     Oded
Harry Wentland Feb. 16, 2016, 4:46 p.m. UTC | #2
For sure. Thanks, Oded.

I'll send out squashed patches later today.

Harry

On 2016-02-11 04:00 PM, Oded Gabbay wrote:
> On Thu, Feb 11, 2016 at 7:20 PM, Harry Wentland <harry.wentland@amd.com> wrote:
>> Signed-off-by: Harry Wentland <harry.wentland@amd.com>
>> Reviewed-by: Mykola Lysenko <mykola.lysenko@amd.com>
>> ---
>>   drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
>> index 1cc9fd1054ab..da6c0116aa1a 100644
>> --- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
>> +++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
>> @@ -366,16 +366,16 @@ static bool fill_rects_from_plane_state(
>>          surface->clip_rect = surface->dst_rect;
>>
>>          switch (state->rotation) {
>> -       case DRM_ROTATE_0:
>> +       case BIT(DRM_ROTATE_0):
>>                  surface->rotation = ROTATION_ANGLE_0;
>>                  break;
>> -       case DRM_ROTATE_90:
>> +       case BIT(DRM_ROTATE_90):
>>                  surface->rotation = ROTATION_ANGLE_90;
>>                  break;
>> -       case DRM_ROTATE_180:
>> +       case BIT(DRM_ROTATE_180):
>>                  surface->rotation = ROTATION_ANGLE_180;
>>                  break;
>> -       case DRM_ROTATE_270:
>> +       case BIT(DRM_ROTATE_270):
>>                  surface->rotation = ROTATION_ANGLE_270;
>>                  break;
>>          default:
>> --
>> 2.1.4
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> One minor suggestion for the V2 of this patch-set, please squash
> patches 27-29 into the previous patches (relevant to the code they
> change). No point in reviewing code of earlier patches that is later
> going to be changed by a patch in the same patch-set.
>
> Thanks,
>
>       Oded
diff mbox

Patch

diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
index 1cc9fd1054ab..da6c0116aa1a 100644
--- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
@@ -366,16 +366,16 @@  static bool fill_rects_from_plane_state(
 	surface->clip_rect = surface->dst_rect;
 
 	switch (state->rotation) {
-	case DRM_ROTATE_0:
+	case BIT(DRM_ROTATE_0):
 		surface->rotation = ROTATION_ANGLE_0;
 		break;
-	case DRM_ROTATE_90:
+	case BIT(DRM_ROTATE_90):
 		surface->rotation = ROTATION_ANGLE_90;
 		break;
-	case DRM_ROTATE_180:
+	case BIT(DRM_ROTATE_180):
 		surface->rotation = ROTATION_ANGLE_180;
 		break;
-	case DRM_ROTATE_270:
+	case BIT(DRM_ROTATE_270):
 		surface->rotation = ROTATION_ANGLE_270;
 		break;
 	default: