* [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode
[not found] <CGME20180202151126eucas1p2142bfb4a4376aea7763f40ce2630e349@eucas1p2.samsung.com>
@ 2018-02-02 15:11 ` Andrzej Hajda
2018-02-02 15:11 ` [PATCH 1/2] drm/exynos/mixer: fix synchronization check in " Andrzej Hajda
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Andrzej Hajda @ 2018-02-02 15:11 UTC (permalink / raw)
To: Inki Dae, Tobias Jakobi
Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
dri-devel, linux-samsung-soc
Hi Inki, Tobias,
This is reviewed/updated/tested Tobias's patch addressing page-faults
in Video Processor in interlaced mode. Plus preliminary patch fixing Mixer
interlaced mode.
Regards
Andrzej
Andrzej Hajda (1):
drm/exynos/mixer: fix synchronization check in interlaced mode
Tobias Jakobi (1):
drm/exynos: mixer: avoid Oops in vp_video_buffer()
drivers/gpu/drm/exynos/exynos_mixer.c | 22 +++++++++++++++++-----
drivers/gpu/drm/exynos/regs-mixer.h | 1 +
2 files changed, 18 insertions(+), 5 deletions(-)
--
2.16.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] drm/exynos/mixer: fix synchronization check in interlaced mode
2018-02-02 15:11 ` [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode Andrzej Hajda
@ 2018-02-02 15:11 ` Andrzej Hajda
2018-02-02 15:11 ` [PATCH 2/2] drm/exynos: mixer: avoid Oops in vp_video_buffer() Andrzej Hajda
2018-02-20 6:45 ` [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode Andrzej Hajda
2 siblings, 0 replies; 7+ messages in thread
From: Andrzej Hajda @ 2018-02-02 15:11 UTC (permalink / raw)
To: Inki Dae, Tobias Jakobi
Cc: linux-samsung-soc, Marek Szyprowski, dri-devel,
Bartlomiej Zolnierkiewicz
In case of interlace mode video processor registers and mixer config
register must be check to ensure internal state is in sync with shadow
registers.
This patch fixes page-faults in interlaced mode.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
drivers/gpu/drm/exynos/exynos_mixer.c | 10 ++++++++++
drivers/gpu/drm/exynos/regs-mixer.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index dc5d79465f9b..ff7d088c922a 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -494,6 +494,7 @@ static void vp_video_buffer(struct mixer_context *ctx,
spin_lock_irqsave(&ctx->reg_slock, flags);
+ vp_reg_write(ctx, VP_SHADOW_UPDATE, 1);
/* interlace or progressive scan mode */
val = (test_bit(MXR_BIT_INTERLACE, &ctx->flags) ? ~0 : 0);
vp_reg_writemask(ctx, VP_MODE, val, VP_MODE_LINE_SKIP);
@@ -711,6 +712,15 @@ static irqreturn_t mixer_irq_handler(int irq, void *arg)
/* interlace scan need to check shadow register */
if (test_bit(MXR_BIT_INTERLACE, &ctx->flags)) {
+ if (test_bit(MXR_BIT_VP_ENABLED, &ctx->flags) &&
+ vp_reg_read(ctx, VP_SHADOW_UPDATE))
+ goto out;
+
+ base = mixer_reg_read(ctx, MXR_CFG);
+ shadow = mixer_reg_read(ctx, MXR_CFG_S);
+ if (base != shadow)
+ goto out;
+
base = mixer_reg_read(ctx, MXR_GRAPHIC_BASE(0));
shadow = mixer_reg_read(ctx, MXR_GRAPHIC_BASE_S(0));
if (base != shadow)
diff --git a/drivers/gpu/drm/exynos/regs-mixer.h b/drivers/gpu/drm/exynos/regs-mixer.h
index c311f571bdf9..189cfa2470a8 100644
--- a/drivers/gpu/drm/exynos/regs-mixer.h
+++ b/drivers/gpu/drm/exynos/regs-mixer.h
@@ -47,6 +47,7 @@
#define MXR_MO 0x0304
#define MXR_RESOLUTION 0x0310
+#define MXR_CFG_S 0x2004
#define MXR_GRAPHIC0_BASE_S 0x2024
#define MXR_GRAPHIC1_BASE_S 0x2044
--
2.16.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] drm/exynos: mixer: avoid Oops in vp_video_buffer()
2018-02-02 15:11 ` [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode Andrzej Hajda
2018-02-02 15:11 ` [PATCH 1/2] drm/exynos/mixer: fix synchronization check in " Andrzej Hajda
@ 2018-02-02 15:11 ` Andrzej Hajda
2018-02-20 6:45 ` [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode Andrzej Hajda
2 siblings, 0 replies; 7+ messages in thread
From: Andrzej Hajda @ 2018-02-02 15:11 UTC (permalink / raw)
To: Inki Dae, Tobias Jakobi
Cc: linux-samsung-soc, Marek Szyprowski, dri-devel,
Bartlomiej Zolnierkiewicz
From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
If an interlaced video mode is selected, a IOMMU pagefault is
triggered by vp_video_buffer().
Fix the most apparent bugs:
- pitch value for chroma plane
- divide by two of height and vpos of source and destination
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
[ a.hajda: Halved also destination height and vpos, updated commit message ]
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
drivers/gpu/drm/exynos/exynos_mixer.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index ff7d088c922a..66b7cc2128e7 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -485,7 +485,7 @@ static void vp_video_buffer(struct mixer_context *ctx,
chroma_addr[1] = chroma_addr[0] + 0x40;
} else {
luma_addr[1] = luma_addr[0] + fb->pitches[0];
- chroma_addr[1] = chroma_addr[0] + fb->pitches[0];
+ chroma_addr[1] = chroma_addr[0] + fb->pitches[1];
}
} else {
luma_addr[1] = 0;
@@ -508,21 +508,23 @@ static void vp_video_buffer(struct mixer_context *ctx,
vp_reg_write(ctx, VP_IMG_SIZE_Y, VP_IMG_HSIZE(fb->pitches[0]) |
VP_IMG_VSIZE(fb->height));
/* chroma plane for NV12/NV21 is half the height of the luma plane */
- vp_reg_write(ctx, VP_IMG_SIZE_C, VP_IMG_HSIZE(fb->pitches[0]) |
+ vp_reg_write(ctx, VP_IMG_SIZE_C, VP_IMG_HSIZE(fb->pitches[1]) |
VP_IMG_VSIZE(fb->height / 2));
vp_reg_write(ctx, VP_SRC_WIDTH, state->src.w);
- vp_reg_write(ctx, VP_SRC_HEIGHT, state->src.h);
vp_reg_write(ctx, VP_SRC_H_POSITION,
VP_SRC_H_POSITION_VAL(state->src.x));
- vp_reg_write(ctx, VP_SRC_V_POSITION, state->src.y);
-
vp_reg_write(ctx, VP_DST_WIDTH, state->crtc.w);
vp_reg_write(ctx, VP_DST_H_POSITION, state->crtc.x);
+
if (test_bit(MXR_BIT_INTERLACE, &ctx->flags)) {
+ vp_reg_write(ctx, VP_SRC_HEIGHT, state->src.h / 2);
+ vp_reg_write(ctx, VP_SRC_V_POSITION, state->src.y / 2);
vp_reg_write(ctx, VP_DST_HEIGHT, state->crtc.h / 2);
vp_reg_write(ctx, VP_DST_V_POSITION, state->crtc.y / 2);
} else {
+ vp_reg_write(ctx, VP_SRC_HEIGHT, state->src.h);
+ vp_reg_write(ctx, VP_SRC_V_POSITION, state->src.y);
vp_reg_write(ctx, VP_DST_HEIGHT, state->crtc.h);
vp_reg_write(ctx, VP_DST_V_POSITION, state->crtc.y);
}
--
2.16.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode
2018-02-02 15:11 ` [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode Andrzej Hajda
2018-02-02 15:11 ` [PATCH 1/2] drm/exynos/mixer: fix synchronization check in " Andrzej Hajda
2018-02-02 15:11 ` [PATCH 2/2] drm/exynos: mixer: avoid Oops in vp_video_buffer() Andrzej Hajda
@ 2018-02-20 6:45 ` Andrzej Hajda
2018-03-12 7:12 ` Andrzej Hajda
2 siblings, 1 reply; 7+ messages in thread
From: Andrzej Hajda @ 2018-02-20 6:45 UTC (permalink / raw)
To: Inki Dae, Tobias Jakobi
Cc: linux-samsung-soc, Marek Szyprowski, dri-devel,
Bartlomiej Zolnierkiewicz
Hi Inki,
On 02.02.2018 16:11, Andrzej Hajda wrote:
> Hi Inki, Tobias,
>
> This is reviewed/updated/tested Tobias's patch addressing page-faults
> in Video Processor in interlaced mode. Plus preliminary patch fixing Mixer
> interlaced mode.
>
> Regards
> Andrzej
Gentle ping.
Regards
Andrzej
>
> Andrzej Hajda (1):
> drm/exynos/mixer: fix synchronization check in interlaced mode
>
> Tobias Jakobi (1):
> drm/exynos: mixer: avoid Oops in vp_video_buffer()
>
> drivers/gpu/drm/exynos/exynos_mixer.c | 22 +++++++++++++++++-----
> drivers/gpu/drm/exynos/regs-mixer.h | 1 +
> 2 files changed, 18 insertions(+), 5 deletions(-)
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode
2018-02-20 6:45 ` [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode Andrzej Hajda
@ 2018-03-12 7:12 ` Andrzej Hajda
2018-04-20 12:44 ` Andrzej Hajda
0 siblings, 1 reply; 7+ messages in thread
From: Andrzej Hajda @ 2018-03-12 7:12 UTC (permalink / raw)
To: Inki Dae, Tobias Jakobi
Cc: Bartlomiej Zolnierkiewicz, linux-samsung-soc, dri-devel,
Marek Szyprowski
On 20.02.2018 07:45, Andrzej Hajda wrote:
> Hi Inki,
>
> On 02.02.2018 16:11, Andrzej Hajda wrote:
>> Hi Inki, Tobias,
>>
>> This is reviewed/updated/tested Tobias's patch addressing page-faults
>> in Video Processor in interlaced mode. Plus preliminary patch fixing Mixer
>> interlaced mode.
>>
>> Regards
>> Andrzej
> Gentle ping.
Ping.
--
Regards
Andrzej
>
> Regards
> Andrzej
>
>> Andrzej Hajda (1):
>> drm/exynos/mixer: fix synchronization check in interlaced mode
>>
>> Tobias Jakobi (1):
>> drm/exynos: mixer: avoid Oops in vp_video_buffer()
>>
>> drivers/gpu/drm/exynos/exynos_mixer.c | 22 +++++++++++++++++-----
>> drivers/gpu/drm/exynos/regs-mixer.h | 1 +
>> 2 files changed, 18 insertions(+), 5 deletions(-)
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode
2018-03-12 7:12 ` Andrzej Hajda
@ 2018-04-20 12:44 ` Andrzej Hajda
2018-04-22 23:29 ` Inki Dae
0 siblings, 1 reply; 7+ messages in thread
From: Andrzej Hajda @ 2018-04-20 12:44 UTC (permalink / raw)
To: Inki Dae, Tobias Jakobi
Cc: Marek Szyprowski, linux-samsung-soc, dri-devel,
Bartlomiej Zolnierkiewicz
On 12.03.2018 08:12, Andrzej Hajda wrote:
> On 20.02.2018 07:45, Andrzej Hajda wrote:
>> Hi Inki,
>>
>> On 02.02.2018 16:11, Andrzej Hajda wrote:
>>> Hi Inki, Tobias,
>>>
>>> This is reviewed/updated/tested Tobias's patch addressing page-faults
>>> in Video Processor in interlaced mode. Plus preliminary patch fixing Mixer
>>> interlaced mode.
>>>
>>> Regards
>>> Andrzej
>> Gentle ping.
> Ping.
Ping, almost three months passed.
Regards
Andrzej
>
> --
> Regards
> Andrzej
>
>> Regards
>> Andrzej
>>
>>> Andrzej Hajda (1):
>>> drm/exynos/mixer: fix synchronization check in interlaced mode
>>>
>>> Tobias Jakobi (1):
>>> drm/exynos: mixer: avoid Oops in vp_video_buffer()
>>>
>>> drivers/gpu/drm/exynos/exynos_mixer.c | 22 +++++++++++++++++-----
>>> drivers/gpu/drm/exynos/regs-mixer.h | 1 +
>>> 2 files changed, 18 insertions(+), 5 deletions(-)
>>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode
2018-04-20 12:44 ` Andrzej Hajda
@ 2018-04-22 23:29 ` Inki Dae
0 siblings, 0 replies; 7+ messages in thread
From: Inki Dae @ 2018-04-22 23:29 UTC (permalink / raw)
To: Andrzej Hajda, Tobias Jakobi
Cc: Marek Szyprowski, linux-samsung-soc, dri-devel,
Bartlomiej Zolnierkiewicz
2018년 04월 20일 21:44에 Andrzej Hajda 이(가) 쓴 글:
> On 12.03.2018 08:12, Andrzej Hajda wrote:
>> On 20.02.2018 07:45, Andrzej Hajda wrote:
>>> Hi Inki,
>>>
>>> On 02.02.2018 16:11, Andrzej Hajda wrote:
>>>> Hi Inki, Tobias,
>>>>
>>>> This is reviewed/updated/tested Tobias's patch addressing page-faults
>>>> in Video Processor in interlaced mode. Plus preliminary patch fixing Mixer
>>>> interlaced mode.
>>>>
>>>> Regards
>>>> Andrzej
>>> Gentle ping.
>> Ping.
>
> Ping, almost three months passed.
>
Oops, really sorry. I forgot this. Merged.
Thanks,
Inki Dae
> Regards
> Andrzej
>
>>
>> --
>> Regards
>> Andrzej
>>
>>> Regards
>>> Andrzej
>>>
>>>> Andrzej Hajda (1):
>>>> drm/exynos/mixer: fix synchronization check in interlaced mode
>>>>
>>>> Tobias Jakobi (1):
>>>> drm/exynos: mixer: avoid Oops in vp_video_buffer()
>>>>
>>>> drivers/gpu/drm/exynos/exynos_mixer.c | 22 +++++++++++++++++-----
>>>> drivers/gpu/drm/exynos/regs-mixer.h | 1 +
>>>> 2 files changed, 18 insertions(+), 5 deletions(-)
>>>>
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-04-22 23:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20180202151126eucas1p2142bfb4a4376aea7763f40ce2630e349@eucas1p2.samsung.com>
2018-02-02 15:11 ` [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode Andrzej Hajda
2018-02-02 15:11 ` [PATCH 1/2] drm/exynos/mixer: fix synchronization check in " Andrzej Hajda
2018-02-02 15:11 ` [PATCH 2/2] drm/exynos: mixer: avoid Oops in vp_video_buffer() Andrzej Hajda
2018-02-20 6:45 ` [PATCH 0/2] drm/exynos/mixer: fixes for interlaced mode Andrzej Hajda
2018-03-12 7:12 ` Andrzej Hajda
2018-04-20 12:44 ` Andrzej Hajda
2018-04-22 23:29 ` Inki Dae
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.