Re: [Intel-gfx] [PATCH 1/6] drm/i915: Fix i845/i865 cursor width

2019-10-28 Thread Maarten Lankhorst
Op 28-10-2019 om 16:05 schreef Ville Syrjälä:
> On Mon, Oct 28, 2019 at 03:20:34PM +0100, Maarten Lankhorst wrote:
>> Op 28-10-2019 om 12:30 schreef Ville Syrjala:
>>> From: Ville Syrjälä 
>>>
>>> The change from the uapi coordinates to the internal coordinates
>>> broke the cursor on i845/i865 due to src and dst getting swapped.
>>> Fix it.
>>>
>>> Cc: Maarten Lankhorst 
>>> Fixes: 3a612765f423 ("drm/i915: Remove cursor use of properties for 
>>> coordinates")
>>> Signed-off-by: Ville Syrjälä 
>>> ---
>>>  drivers/gpu/drm/i915/display/intel_display.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
>>> b/drivers/gpu/drm/i915/display/intel_display.c
>>> index 0f0c582a56d5..47a3aef0fb61 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_display.c
>>> +++ b/drivers/gpu/drm/i915/display/intel_display.c
>>> @@ -10947,7 +10947,7 @@ static void i845_update_cursor(struct intel_plane 
>>> *plane,
>>> unsigned long irqflags;
>>>  
>>> if (plane_state && plane_state->base.visible) {
>>> -   unsigned int width = drm_rect_width(_state->base.src);
>>> +   unsigned int width = drm_rect_width(_state->base.dst);
>>> unsigned int height = drm_rect_height(_state->base.dst);
>>>  
>>> cntl = plane_state->ctl |
>> Yeah, I guess theoretically fixes, should be ok regardless because no 
>> scaling is supported on the cursor so rectangles are identical. :)
> No. One is .16 fixed point other is integer. Ie. totally broken atm,
> as proven by the cursor being smeared over the whole screen on my i865.
>
Ah right, missed that. :)

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 1/6] drm/i915: Fix i845/i865 cursor width

2019-10-28 Thread Ville Syrjälä
On Mon, Oct 28, 2019 at 03:20:34PM +0100, Maarten Lankhorst wrote:
> Op 28-10-2019 om 12:30 schreef Ville Syrjala:
> > From: Ville Syrjälä 
> >
> > The change from the uapi coordinates to the internal coordinates
> > broke the cursor on i845/i865 due to src and dst getting swapped.
> > Fix it.
> >
> > Cc: Maarten Lankhorst 
> > Fixes: 3a612765f423 ("drm/i915: Remove cursor use of properties for 
> > coordinates")
> > Signed-off-by: Ville Syrjälä 
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
> > b/drivers/gpu/drm/i915/display/intel_display.c
> > index 0f0c582a56d5..47a3aef0fb61 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -10947,7 +10947,7 @@ static void i845_update_cursor(struct intel_plane 
> > *plane,
> > unsigned long irqflags;
> >  
> > if (plane_state && plane_state->base.visible) {
> > -   unsigned int width = drm_rect_width(_state->base.src);
> > +   unsigned int width = drm_rect_width(_state->base.dst);
> > unsigned int height = drm_rect_height(_state->base.dst);
> >  
> > cntl = plane_state->ctl |
> 
> Yeah, I guess theoretically fixes, should be ok regardless because no scaling 
> is supported on the cursor so rectangles are identical. :)

No. One is .16 fixed point other is integer. Ie. totally broken atm,
as proven by the cursor being smeared over the whole screen on my i865.

> 
> Reviewed-by: Maarten Lankhorst 

-- 
Ville Syrjälä
Intel
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 1/6] drm/i915: Fix i845/i865 cursor width

2019-10-28 Thread Maarten Lankhorst
Op 28-10-2019 om 12:30 schreef Ville Syrjala:
> From: Ville Syrjälä 
>
> The change from the uapi coordinates to the internal coordinates
> broke the cursor on i845/i865 due to src and dst getting swapped.
> Fix it.
>
> Cc: Maarten Lankhorst 
> Fixes: 3a612765f423 ("drm/i915: Remove cursor use of properties for 
> coordinates")
> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
> b/drivers/gpu/drm/i915/display/intel_display.c
> index 0f0c582a56d5..47a3aef0fb61 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -10947,7 +10947,7 @@ static void i845_update_cursor(struct intel_plane 
> *plane,
>   unsigned long irqflags;
>  
>   if (plane_state && plane_state->base.visible) {
> - unsigned int width = drm_rect_width(_state->base.src);
> + unsigned int width = drm_rect_width(_state->base.dst);
>   unsigned int height = drm_rect_height(_state->base.dst);
>  
>   cntl = plane_state->ctl |

Yeah, I guess theoretically fixes, should be ok regardless because no scaling 
is supported on the cursor so rectangles are identical. :)

Reviewed-by: Maarten Lankhorst 

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH 1/6] drm/i915: Fix i845/i865 cursor width

2019-10-28 Thread Ville Syrjala
From: Ville Syrjälä 

The change from the uapi coordinates to the internal coordinates
broke the cursor on i845/i865 due to src and dst getting swapped.
Fix it.

Cc: Maarten Lankhorst 
Fixes: 3a612765f423 ("drm/i915: Remove cursor use of properties for 
coordinates")
Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 0f0c582a56d5..47a3aef0fb61 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -10947,7 +10947,7 @@ static void i845_update_cursor(struct intel_plane 
*plane,
unsigned long irqflags;
 
if (plane_state && plane_state->base.visible) {
-   unsigned int width = drm_rect_width(_state->base.src);
+   unsigned int width = drm_rect_width(_state->base.dst);
unsigned int height = drm_rect_height(_state->base.dst);
 
cntl = plane_state->ctl |
-- 
2.21.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx