linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: tilcdc: Add revision handling for FB_CEILING
@ 2016-10-28 11:52 Daniel Schultz
  2016-10-28 11:52 ` [PATCH 2/2] drm: tilcdc: Correct misspelling in error message Daniel Schultz
  2016-10-31 17:33 ` [PATCH 1/2] drm: tilcdc: Add revision handling for FB_CEILING Jyri Sarha
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Schultz @ 2016-10-28 11:52 UTC (permalink / raw)
  To: airlied, jsarha, tomi.valkeinen, dri-devel, linux-kernel

The commit d8ff0c63fbcb ("drm/tilcdc: Adjust the FB_CEILING address")
added an adjustment of the FB_CEILING address. This is done by decrementing
the address by one.

On the AM335x (rev 0x4F201000) the framebuffer is rotated left over the
display border, because the ceiling address is 8f276fff instead of
8f277000. Since this adjustment isn't necessary for the LCDC v2, the
origin ceiling address should be used.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index 788999e..fe1d088 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -69,6 +69,7 @@ static void set_scanout(struct drm_crtc *crtc, struct drm_framebuffer *fb)
 {
 	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
 	struct drm_device *dev = crtc->dev;
+	struct tilcdc_drm_private *priv = dev->dev_private;
 	struct drm_gem_cma_object *gem;
 	unsigned int depth, bpp;
 	dma_addr_t start, end;
@@ -88,7 +89,10 @@ static void set_scanout(struct drm_crtc *crtc, struct drm_framebuffer *fb)
 	 * unlikely that LCDC would fetch the DMA addresses in the middle of
 	 * an update.
 	 */
-	dma_base_and_ceiling = (u64)(end - 1) << 32 | start;
+	if (priv->rev == 1)
+		end -= 1;
+
+	dma_base_and_ceiling = (u64)end << 32 | start;
 	tilcdc_write64(dev, LCDC_DMA_FB_BASE_ADDR_0_REG, dma_base_and_ceiling);
 
 	if (tilcdc_crtc->curr_fb)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] drm: tilcdc: Correct misspelling in error message
  2016-10-28 11:52 [PATCH 1/2] drm: tilcdc: Add revision handling for FB_CEILING Daniel Schultz
@ 2016-10-28 11:52 ` Daniel Schultz
  2016-10-31 17:33   ` Jyri Sarha
  2016-10-31 17:33 ` [PATCH 1/2] drm: tilcdc: Add revision handling for FB_CEILING Jyri Sarha
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Schultz @ 2016-10-28 11:52 UTC (permalink / raw)
  To: airlied, jsarha, tomi.valkeinen, dri-devel, linux-kernel

This error message will be printed when a FIFO underflow irq has
triggered. Since this happens sometimes and the error message will be
displayed on the console, it should have a correct spelling.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index fe1d088..63caed4 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -769,7 +769,7 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
 	}
 
 	if (stat & LCDC_FIFO_UNDERFLOW)
-		dev_err_ratelimited(dev->dev, "%s(0x%08x): FIFO underfow",
+		dev_err_ratelimited(dev->dev, "%s(0x%08x): FIFO underflow",
 				    __func__, stat);
 
 	/* For revision 2 only */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] drm: tilcdc: Add revision handling for FB_CEILING
  2016-10-28 11:52 [PATCH 1/2] drm: tilcdc: Add revision handling for FB_CEILING Daniel Schultz
  2016-10-28 11:52 ` [PATCH 2/2] drm: tilcdc: Correct misspelling in error message Daniel Schultz
@ 2016-10-31 17:33 ` Jyri Sarha
  1 sibling, 0 replies; 5+ messages in thread
From: Jyri Sarha @ 2016-10-31 17:33 UTC (permalink / raw)
  To: Daniel Schultz, airlied, tomi.valkeinen, dri-devel, linux-kernel

On 10/28/16 14:52, Daniel Schultz wrote:
> The commit d8ff0c63fbcb ("drm/tilcdc: Adjust the FB_CEILING address")
> added an adjustment of the FB_CEILING address. This is done by decrementing
> the address by one.
> 
> On the AM335x (rev 0x4F201000) the framebuffer is rotated left over the
> display border, because the ceiling address is 8f276fff instead of
> 8f277000. Since this adjustment isn't necessary for the LCDC v2, the
> origin ceiling address should be used.
> 

I can not see the rotation on any of my HW. However, there is no harm in
taking this patch either, so I'll take your word for it and pick this up
for my next pull request.

Best regards,
Jyri

> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> ---
>  drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> index 788999e..fe1d088 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> @@ -69,6 +69,7 @@ static void set_scanout(struct drm_crtc *crtc, struct drm_framebuffer *fb)
>  {
>  	struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
>  	struct drm_device *dev = crtc->dev;
> +	struct tilcdc_drm_private *priv = dev->dev_private;
>  	struct drm_gem_cma_object *gem;
>  	unsigned int depth, bpp;
>  	dma_addr_t start, end;
> @@ -88,7 +89,10 @@ static void set_scanout(struct drm_crtc *crtc, struct drm_framebuffer *fb)
>  	 * unlikely that LCDC would fetch the DMA addresses in the middle of
>  	 * an update.
>  	 */
> -	dma_base_and_ceiling = (u64)(end - 1) << 32 | start;
> +	if (priv->rev == 1)
> +		end -= 1;
> +
> +	dma_base_and_ceiling = (u64)end << 32 | start;
>  	tilcdc_write64(dev, LCDC_DMA_FB_BASE_ADDR_0_REG, dma_base_and_ceiling);
>  
>  	if (tilcdc_crtc->curr_fb)
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] drm: tilcdc: Correct misspelling in error message
  2016-10-28 11:52 ` [PATCH 2/2] drm: tilcdc: Correct misspelling in error message Daniel Schultz
@ 2016-10-31 17:33   ` Jyri Sarha
  2016-10-31 17:37     ` Jyri Sarha
  0 siblings, 1 reply; 5+ messages in thread
From: Jyri Sarha @ 2016-10-31 17:33 UTC (permalink / raw)
  To: Daniel Schultz, airlied, tomi.valkeinen, dri-devel, linux-kernel

On 10/28/16 14:52, Daniel Schultz wrote:
> This error message will be printed when a FIFO underflow irq has
> triggered. Since this happens sometimes and the error message will be
> displayed on the console, it should have a correct spelling.
> 
> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>

Picked up for my next pull request.

Best regards,
Jyri

> ---
>  drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> index fe1d088..63caed4 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> @@ -769,7 +769,7 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
>  	}
>  
>  	if (stat & LCDC_FIFO_UNDERFLOW)
> -		dev_err_ratelimited(dev->dev, "%s(0x%08x): FIFO underfow",
> +		dev_err_ratelimited(dev->dev, "%s(0x%08x): FIFO underflow",
>  				    __func__, stat);
>  
>  	/* For revision 2 only */
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] drm: tilcdc: Correct misspelling in error message
  2016-10-31 17:33   ` Jyri Sarha
@ 2016-10-31 17:37     ` Jyri Sarha
  0 siblings, 0 replies; 5+ messages in thread
From: Jyri Sarha @ 2016-10-31 17:37 UTC (permalink / raw)
  To: Daniel Schultz, airlied, tomi.valkeinen, dri-devel, linux-kernel

On 10/31/16 19:33, Jyri Sarha wrote:
> On 10/28/16 14:52, Daniel Schultz wrote:
>> This error message will be printed when a FIFO underflow irq has
>> triggered. Since this happens sometimes and the error message will be
>> displayed on the console, it should have a correct spelling.
>>
>> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> 
> Picked up for my next pull request.
> 

Oh, and I'll change the subject to match the current prefix convention.

> 
>> ---
>>  drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
>> index fe1d088..63caed4 100644
>> --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
>> +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
>> @@ -769,7 +769,7 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
>>  	}
>>  
>>  	if (stat & LCDC_FIFO_UNDERFLOW)
>> -		dev_err_ratelimited(dev->dev, "%s(0x%08x): FIFO underfow",
>> +		dev_err_ratelimited(dev->dev, "%s(0x%08x): FIFO underflow",
>>  				    __func__, stat);
>>  
>>  	/* For revision 2 only */
>>
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-31 17:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28 11:52 [PATCH 1/2] drm: tilcdc: Add revision handling for FB_CEILING Daniel Schultz
2016-10-28 11:52 ` [PATCH 2/2] drm: tilcdc: Correct misspelling in error message Daniel Schultz
2016-10-31 17:33   ` Jyri Sarha
2016-10-31 17:37     ` Jyri Sarha
2016-10-31 17:33 ` [PATCH 1/2] drm: tilcdc: Add revision handling for FB_CEILING Jyri Sarha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).