Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1688968 > unrolled thread
| Started by | Jose Abreu <Jose.Abreu@synopsys.com> |
|---|---|
| First post | 2017-07-17 14:10 +0200 |
| Last post | 2017-07-17 14:10 +0200 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/3] arcpgu: Fixes and improvements Jose Abreu <Jose.Abreu@synopsys.com> - 2017-07-17 14:10 +0200
[PATCH 2/3] drm: arcpgu: Fix module unload Jose Abreu <Jose.Abreu@synopsys.com> - 2017-07-17 14:10 +0200
[PATCH 3/3] drm: arcpgu: Allow some clock deviation in crtc->mode_valid() callback Jose Abreu <Jose.Abreu@synopsys.com> - 2017-07-17 14:10 +0200
| From | Jose Abreu <Jose.Abreu@synopsys.com> |
|---|---|
| Date | 2017-07-17 14:10 +0200 |
| Subject | [PATCH 0/3] arcpgu: Fixes and improvements |
| Message-ID | <u4d0B-4Qd-13@gated-at.bofh.it> |
Hi all, Two fixes and an improvement for arcpgu. I've sent this patches in separate but I've now collected them all to ease the review. Best regards, Jose Miguel Abreu Jose Abreu (3): drm: arcpgu: Fix mmap() callback drm: arcpgu: Fix module unload drm: arcpgu: Allow some clock deviation in crtc->mode_valid() callback Cc: Carlos Palminha <palminha@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Dave Airlie <airlied@gmail.com> drivers/gpu/drm/arc/arcpgu_crtc.c | 7 ++++--- drivers/gpu/drm/arc/arcpgu_drv.c | 26 ++------------------------ 2 files changed, 6 insertions(+), 27 deletions(-) -- 1.9.1
[toc] | [next] | [standalone]
| From | Jose Abreu <Jose.Abreu@synopsys.com> |
|---|---|
| Date | 2017-07-17 14:10 +0200 |
| Subject | [PATCH 2/3] drm: arcpgu: Fix module unload |
| Message-ID | <u4d0C-4Qd-37@gated-at.bofh.it> |
| In reply to | #1688968 |
At module unload we are expecting a struct drm_device but at
probing we are not setting it right. Fix this and correct the
arcpgu module unload.
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Fixes: 0c4250e7b15e ("drm: Add support of ARC PGU display controller")
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Dave Airlie <airlied@gmail.com>
---
drivers/gpu/drm/arc/arcpgu_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
index 20ab68f..8abc987 100644
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -120,7 +120,7 @@ static int arcpgu_load(struct drm_device *drm)
return -ENODEV;
}
- platform_set_drvdata(pdev, arcpgu);
+ platform_set_drvdata(pdev, drm);
return 0;
}
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Jose Abreu <Jose.Abreu@synopsys.com> |
|---|---|
| Date | 2017-07-17 14:10 +0200 |
| Subject | [PATCH 3/3] drm: arcpgu: Allow some clock deviation in crtc->mode_valid() callback |
| Message-ID | <u4d0D-4Qd-43@gated-at.bofh.it> |
| In reply to | #1688968 |
Currently we expect that clock driver produces the exact same value
as we are requiring. There can, and will, be some deviation
however so we need to take that into account instead of just
rejecting the mode.
According to the HDMI spec we have a max of +-0.5% for the pixel clock
frequency deviation. Lets take that into an advantage and use it to
calculate how much deviation we can support.
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Dave Airlie <airlied@gmail.com>
---
drivers/gpu/drm/arc/arcpgu_crtc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
index 1859dd3..55c5d5b 100644
--- a/drivers/gpu/drm/arc/arcpgu_crtc.c
+++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
@@ -69,12 +69,13 @@ static enum drm_mode_status arc_pgu_crtc_mode_valid(struct drm_crtc *crtc,
{
struct arcpgu_drm_private *arcpgu = crtc_to_arcpgu_priv(crtc);
long rate, clk_rate = mode->clock * 1000;
+ long diff = clk_rate / 200; /* +-0.5% allowed by HDMI spec */
rate = clk_round_rate(arcpgu->clk, clk_rate);
- if (rate != clk_rate)
- return MODE_NOCLOCK;
+ if ((max(rate, clk_rate) - min(rate, clk_rate) < diff) && (rate > 0))
+ return MODE_OK;
- return MODE_OK;
+ return MODE_NOCLOCK;
}
static void arc_pgu_crtc_mode_set_nofb(struct drm_crtc *crtc)
--
1.9.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web