Skip to content

Commit 2da4b72

Browse files
Wolfram SangLaurent Pinchart
authored andcommitted
drm: rcar-du: remove R-Car H3 ES1.* workarounds
R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support for this SoC and prevent booting it. Public users only have ES2 onwards. Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]>
1 parent 85d712f commit 2da4b72

File tree

4 files changed

+4
-86
lines changed

4 files changed

+4
-86
lines changed

drivers/gpu/drm/rcar-du/rcar_du_crtc.c

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -223,20 +223,6 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
223223
* DU channels that have a display PLL can't use the internal
224224
* system clock, and have no internal clock divider.
225225
*/
226-
227-
/*
228-
* The H3 ES1.x exhibits dot clock duty cycle stability issues.
229-
* We can work around them by configuring the DPLL to twice the
230-
* desired frequency, coupled with a /2 post-divider. Restrict
231-
* the workaround to H3 ES1.x as ES2.0 and all other SoCs have
232-
* no post-divider when a display PLL is present (as shown by
233-
* the workaround breaking HDMI output on M3-W during testing).
234-
*/
235-
if (rcdu->info->quirks & RCAR_DU_QUIRK_H3_ES1_PCLK_STABILITY) {
236-
target *= 2;
237-
div = 1;
238-
}
239-
240226
extclk = clk_get_rate(rcrtc->extclock);
241227
rcar_du_dpll_divider(rcrtc, &dpll, extclk, target);
242228

@@ -245,30 +231,13 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
245231
| DPLLCR_N(dpll.n) | DPLLCR_M(dpll.m)
246232
| DPLLCR_STBY;
247233

248-
if (rcrtc->index == 1) {
234+
if (rcrtc->index == 1)
249235
dpllcr |= DPLLCR_PLCS1
250236
| DPLLCR_INCS_DOTCLKIN1;
251-
} else {
252-
dpllcr |= DPLLCR_PLCS0_PLL
237+
else
238+
dpllcr |= DPLLCR_PLCS0
253239
| DPLLCR_INCS_DOTCLKIN0;
254240

255-
/*
256-
* On ES2.x we have a single mux controlled via bit 21,
257-
* which selects between DCLKIN source (bit 21 = 0) and
258-
* a PLL source (bit 21 = 1), where the PLL is always
259-
* PLL1.
260-
*
261-
* On ES1.x we have an additional mux, controlled
262-
* via bit 20, for choosing between PLL0 (bit 20 = 0)
263-
* and PLL1 (bit 20 = 1). We always want to use PLL1,
264-
* so on ES1.x, in addition to setting bit 21, we need
265-
* to set the bit 20.
266-
*/
267-
268-
if (rcdu->info->quirks & RCAR_DU_QUIRK_H3_ES1_PLL)
269-
dpllcr |= DPLLCR_PLCS0_H3ES1X_PLL1;
270-
}
271-
272241
rcar_du_group_write(rcrtc->group, DPLLCR, dpllcr);
273242

274243
escr = ESCR_DCLKSEL_DCLKIN | div;

drivers/gpu/drm/rcar-du/rcar_du_drv.c

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include <linux/platform_device.h>
1717
#include <linux/pm.h>
1818
#include <linux/slab.h>
19-
#include <linux/sys_soc.h>
2019
#include <linux/wait.h>
2120

2221
#include <drm/drm_atomic_helper.h>
@@ -387,43 +386,6 @@ static const struct rcar_du_device_info rcar_du_r8a7795_info = {
387386
.dpll_mask = BIT(2) | BIT(1),
388387
};
389388

390-
static const struct rcar_du_device_info rcar_du_r8a7795_es1_info = {
391-
.gen = 3,
392-
.features = RCAR_DU_FEATURE_CRTC_IRQ
393-
| RCAR_DU_FEATURE_CRTC_CLOCK
394-
| RCAR_DU_FEATURE_VSP1_SOURCE
395-
| RCAR_DU_FEATURE_INTERLACED
396-
| RCAR_DU_FEATURE_TVM_SYNC,
397-
.quirks = RCAR_DU_QUIRK_H3_ES1_PCLK_STABILITY
398-
| RCAR_DU_QUIRK_H3_ES1_PLL,
399-
.channels_mask = BIT(3) | BIT(2) | BIT(1) | BIT(0),
400-
.routes = {
401-
/*
402-
* R8A7795 has one RGB output, two HDMI outputs and one
403-
* LVDS output.
404-
*/
405-
[RCAR_DU_OUTPUT_DPAD0] = {
406-
.possible_crtcs = BIT(3),
407-
.port = 0,
408-
},
409-
[RCAR_DU_OUTPUT_HDMI0] = {
410-
.possible_crtcs = BIT(1),
411-
.port = 1,
412-
},
413-
[RCAR_DU_OUTPUT_HDMI1] = {
414-
.possible_crtcs = BIT(2),
415-
.port = 2,
416-
},
417-
[RCAR_DU_OUTPUT_LVDS0] = {
418-
.possible_crtcs = BIT(0),
419-
.port = 3,
420-
},
421-
},
422-
.num_lvds = 1,
423-
.num_rpf = 5,
424-
.dpll_mask = BIT(2) | BIT(1),
425-
};
426-
427389
static const struct rcar_du_device_info rcar_du_r8a7796_info = {
428390
.gen = 3,
429391
.features = RCAR_DU_FEATURE_CRTC_IRQ
@@ -614,11 +576,6 @@ static const struct of_device_id rcar_du_of_table[] = {
614576

615577
MODULE_DEVICE_TABLE(of, rcar_du_of_table);
616578

617-
static const struct soc_device_attribute rcar_du_soc_table[] = {
618-
{ .soc_id = "r8a7795", .revision = "ES1.*", .data = &rcar_du_r8a7795_es1_info },
619-
{ /* sentinel */ }
620-
};
621-
622579
const char *rcar_du_output_name(enum rcar_du_output output)
623580
{
624581
static const char * const names[] = {
@@ -707,7 +664,6 @@ static void rcar_du_shutdown(struct platform_device *pdev)
707664

708665
static int rcar_du_probe(struct platform_device *pdev)
709666
{
710-
const struct soc_device_attribute *soc_attr;
711667
struct rcar_du_device *rcdu;
712668
unsigned int mask;
713669
int ret;
@@ -725,10 +681,6 @@ static int rcar_du_probe(struct platform_device *pdev)
725681

726682
rcdu->info = of_device_get_match_data(rcdu->dev);
727683

728-
soc_attr = soc_device_match(rcar_du_soc_table);
729-
if (soc_attr)
730-
rcdu->info = soc_attr->data;
731-
732684
platform_set_drvdata(pdev, rcdu);
733685

734686
/* I/O resources */

drivers/gpu/drm/rcar-du/rcar_du_drv.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ struct rcar_du_device;
3434
#define RCAR_DU_FEATURE_NO_BLENDING BIT(5) /* PnMR.SPIM does not have ALP nor EOR bits */
3535

3636
#define RCAR_DU_QUIRK_ALIGN_128B BIT(0) /* Align pitches to 128 bytes */
37-
#define RCAR_DU_QUIRK_H3_ES1_PCLK_STABILITY BIT(1) /* H3 ES1 has pclk stability issue */
38-
#define RCAR_DU_QUIRK_H3_ES1_PLL BIT(2) /* H3 ES1 PLL setup differs from non-ES1 */
3937

4038
enum rcar_du_output {
4139
RCAR_DU_OUTPUT_DPAD0,

drivers/gpu/drm/rcar-du/rcar_du_regs.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,7 @@
283283
#define DPLLCR 0x20044
284284
#define DPLLCR_CODE (0x95 << 24)
285285
#define DPLLCR_PLCS1 (1 << 23)
286-
#define DPLLCR_PLCS0_PLL (1 << 21)
287-
#define DPLLCR_PLCS0_H3ES1X_PLL1 (1 << 20)
286+
#define DPLLCR_PLCS0 (1 << 21)
288287
#define DPLLCR_CLKE (1 << 18)
289288
#define DPLLCR_FDPLL(n) ((n) << 12)
290289
#define DPLLCR_N(n) ((n) << 5)

0 commit comments

Comments
 (0)