From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> To: Wolfram Sang <wsa+renesas@sang-engineering.com>, linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/11] drm: rcar-du: remove R-Car H3 ES1.* workarounds Date: Wed, 08 Mar 2023 10:11:51 +0000 [thread overview] Message-ID: <167827031185.93391.13063424473910902940@Monstersaurus> (raw) In-Reply-To: <20230307163041.3815-3-wsa+renesas@sang-engineering.com> Hi Wolfram, Quoting Wolfram Sang (2023-03-07 16:30:30) > 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 > and disable booting for this SoC. Public users only have ES2 onwards. > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Wow, this lets us get rid of workarounds all throughout. This looks pretty decisive, and complete to me. Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> > --- > Please apply individually per subsystem. There are no dependencies and the SoC > doesn't boot anymore since v6.3-rc1. > > drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 37 ++------------------ > drivers/gpu/drm/rcar-du/rcar_du_drv.c | 48 -------------------------- > drivers/gpu/drm/rcar-du/rcar_du_drv.h | 2 -- > drivers/gpu/drm/rcar-du/rcar_du_regs.h | 3 +- > 4 files changed, 4 insertions(+), 86 deletions(-) > > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c > index 008e172ed43b..84411c452e30 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c > +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c > @@ -223,20 +223,6 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc) > * DU channels that have a display PLL can't use the internal > * system clock, and have no internal clock divider. > */ > - > - /* > - * The H3 ES1.x exhibits dot clock duty cycle stability issues. > - * We can work around them by configuring the DPLL to twice the > - * desired frequency, coupled with a /2 post-divider. Restrict > - * the workaround to H3 ES1.x as ES2.0 and all other SoCs have > - * no post-divider when a display PLL is present (as shown by > - * the workaround breaking HDMI output on M3-W during testing). > - */ > - if (rcdu->info->quirks & RCAR_DU_QUIRK_H3_ES1_PCLK_STABILITY) { > - target *= 2; > - div = 1; > - } > - > extclk = clk_get_rate(rcrtc->extclock); > rcar_du_dpll_divider(rcrtc, &dpll, extclk, target); > > @@ -245,30 +231,13 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc) > | DPLLCR_N(dpll.n) | DPLLCR_M(dpll.m) > | DPLLCR_STBY; > > - if (rcrtc->index == 1) { > + if (rcrtc->index == 1) > dpllcr |= DPLLCR_PLCS1 > | DPLLCR_INCS_DOTCLKIN1; > - } else { > - dpllcr |= DPLLCR_PLCS0_PLL > + else > + dpllcr |= DPLLCR_PLCS0 > | DPLLCR_INCS_DOTCLKIN0; > > - /* > - * On ES2.x we have a single mux controlled via bit 21, > - * which selects between DCLKIN source (bit 21 = 0) and > - * a PLL source (bit 21 = 1), where the PLL is always > - * PLL1. > - * > - * On ES1.x we have an additional mux, controlled > - * via bit 20, for choosing between PLL0 (bit 20 = 0) > - * and PLL1 (bit 20 = 1). We always want to use PLL1, > - * so on ES1.x, in addition to setting bit 21, we need > - * to set the bit 20. > - */ > - > - if (rcdu->info->quirks & RCAR_DU_QUIRK_H3_ES1_PLL) > - dpllcr |= DPLLCR_PLCS0_H3ES1X_PLL1; > - } > - > rcar_du_group_write(rcrtc->group, DPLLCR, dpllcr); > > escr = ESCR_DCLKSEL_DCLKIN | div; > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c > index b9a94c5260e9..1ffde19cb87f 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c > +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c > @@ -16,7 +16,6 @@ > #include <linux/platform_device.h> > #include <linux/pm.h> > #include <linux/slab.h> > -#include <linux/sys_soc.h> > #include <linux/wait.h> > > #include <drm/drm_atomic_helper.h> > @@ -387,43 +386,6 @@ static const struct rcar_du_device_info rcar_du_r8a7795_info = { > .dpll_mask = BIT(2) | BIT(1), > }; > > -static const struct rcar_du_device_info rcar_du_r8a7795_es1_info = { > - .gen = 3, > - .features = RCAR_DU_FEATURE_CRTC_IRQ > - | RCAR_DU_FEATURE_CRTC_CLOCK > - | RCAR_DU_FEATURE_VSP1_SOURCE > - | RCAR_DU_FEATURE_INTERLACED > - | RCAR_DU_FEATURE_TVM_SYNC, > - .quirks = RCAR_DU_QUIRK_H3_ES1_PCLK_STABILITY > - | RCAR_DU_QUIRK_H3_ES1_PLL, > - .channels_mask = BIT(3) | BIT(2) | BIT(1) | BIT(0), > - .routes = { > - /* > - * R8A7795 has one RGB output, two HDMI outputs and one > - * LVDS output. > - */ > - [RCAR_DU_OUTPUT_DPAD0] = { > - .possible_crtcs = BIT(3), > - .port = 0, > - }, > - [RCAR_DU_OUTPUT_HDMI0] = { > - .possible_crtcs = BIT(1), > - .port = 1, > - }, > - [RCAR_DU_OUTPUT_HDMI1] = { > - .possible_crtcs = BIT(2), > - .port = 2, > - }, > - [RCAR_DU_OUTPUT_LVDS0] = { > - .possible_crtcs = BIT(0), > - .port = 3, > - }, > - }, > - .num_lvds = 1, > - .num_rpf = 5, > - .dpll_mask = BIT(2) | BIT(1), > -}; > - > static const struct rcar_du_device_info rcar_du_r8a7796_info = { > .gen = 3, > .features = RCAR_DU_FEATURE_CRTC_IRQ > @@ -614,11 +576,6 @@ static const struct of_device_id rcar_du_of_table[] = { > > MODULE_DEVICE_TABLE(of, rcar_du_of_table); > > -static const struct soc_device_attribute rcar_du_soc_table[] = { > - { .soc_id = "r8a7795", .revision = "ES1.*", .data = &rcar_du_r8a7795_es1_info }, > - { /* sentinel */ } > -}; > - > const char *rcar_du_output_name(enum rcar_du_output output) > { > static const char * const names[] = { > @@ -707,7 +664,6 @@ static void rcar_du_shutdown(struct platform_device *pdev) > > static int rcar_du_probe(struct platform_device *pdev) > { > - const struct soc_device_attribute *soc_attr; > struct rcar_du_device *rcdu; > unsigned int mask; > int ret; > @@ -725,10 +681,6 @@ static int rcar_du_probe(struct platform_device *pdev) > > rcdu->info = of_device_get_match_data(rcdu->dev); > > - soc_attr = soc_device_match(rcar_du_soc_table); > - if (soc_attr) > - rcdu->info = soc_attr->data; > - > platform_set_drvdata(pdev, rcdu); > > /* I/O resources */ > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.h b/drivers/gpu/drm/rcar-du/rcar_du_drv.h > index acc3673fefe1..5cfa2bb7ad93 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.h > +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.h > @@ -34,8 +34,6 @@ struct rcar_du_device; > #define RCAR_DU_FEATURE_NO_BLENDING BIT(5) /* PnMR.SPIM does not have ALP nor EOR bits */ > > #define RCAR_DU_QUIRK_ALIGN_128B BIT(0) /* Align pitches to 128 bytes */ > -#define RCAR_DU_QUIRK_H3_ES1_PCLK_STABILITY BIT(1) /* H3 ES1 has pclk stability issue */ > -#define RCAR_DU_QUIRK_H3_ES1_PLL BIT(2) /* H3 ES1 PLL setup differs from non-ES1 */ > > enum rcar_du_output { > RCAR_DU_OUTPUT_DPAD0, > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_regs.h b/drivers/gpu/drm/rcar-du/rcar_du_regs.h > index 789ae9285108..288eff12b2b1 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_du_regs.h > +++ b/drivers/gpu/drm/rcar-du/rcar_du_regs.h > @@ -283,8 +283,7 @@ > #define DPLLCR 0x20044 > #define DPLLCR_CODE (0x95 << 24) > #define DPLLCR_PLCS1 (1 << 23) > -#define DPLLCR_PLCS0_PLL (1 << 21) > -#define DPLLCR_PLCS0_H3ES1X_PLL1 (1 << 20) > +#define DPLLCR_PLCS0 (1 << 21) > #define DPLLCR_CLKE (1 << 18) > #define DPLLCR_FDPLL(n) ((n) << 12) > #define DPLLCR_N(n) ((n) << 5) > -- > 2.35.1 >
WARNING: multiple messages have this Message-ID (diff)
From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> To: Wolfram Sang <wsa+renesas@sang-engineering.com>, linux-renesas-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Wolfram Sang <wsa+renesas@sang-engineering.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com> Subject: Re: [PATCH 02/11] drm: rcar-du: remove R-Car H3 ES1.* workarounds Date: Wed, 08 Mar 2023 10:11:51 +0000 [thread overview] Message-ID: <167827031185.93391.13063424473910902940@Monstersaurus> (raw) In-Reply-To: <20230307163041.3815-3-wsa+renesas@sang-engineering.com> Hi Wolfram, Quoting Wolfram Sang (2023-03-07 16:30:30) > 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 > and disable booting for this SoC. Public users only have ES2 onwards. > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Wow, this lets us get rid of workarounds all throughout. This looks pretty decisive, and complete to me. Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> > --- > Please apply individually per subsystem. There are no dependencies and the SoC > doesn't boot anymore since v6.3-rc1. > > drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 37 ++------------------ > drivers/gpu/drm/rcar-du/rcar_du_drv.c | 48 -------------------------- > drivers/gpu/drm/rcar-du/rcar_du_drv.h | 2 -- > drivers/gpu/drm/rcar-du/rcar_du_regs.h | 3 +- > 4 files changed, 4 insertions(+), 86 deletions(-) > > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c > index 008e172ed43b..84411c452e30 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c > +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c > @@ -223,20 +223,6 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc) > * DU channels that have a display PLL can't use the internal > * system clock, and have no internal clock divider. > */ > - > - /* > - * The H3 ES1.x exhibits dot clock duty cycle stability issues. > - * We can work around them by configuring the DPLL to twice the > - * desired frequency, coupled with a /2 post-divider. Restrict > - * the workaround to H3 ES1.x as ES2.0 and all other SoCs have > - * no post-divider when a display PLL is present (as shown by > - * the workaround breaking HDMI output on M3-W during testing). > - */ > - if (rcdu->info->quirks & RCAR_DU_QUIRK_H3_ES1_PCLK_STABILITY) { > - target *= 2; > - div = 1; > - } > - > extclk = clk_get_rate(rcrtc->extclock); > rcar_du_dpll_divider(rcrtc, &dpll, extclk, target); > > @@ -245,30 +231,13 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc) > | DPLLCR_N(dpll.n) | DPLLCR_M(dpll.m) > | DPLLCR_STBY; > > - if (rcrtc->index == 1) { > + if (rcrtc->index == 1) > dpllcr |= DPLLCR_PLCS1 > | DPLLCR_INCS_DOTCLKIN1; > - } else { > - dpllcr |= DPLLCR_PLCS0_PLL > + else > + dpllcr |= DPLLCR_PLCS0 > | DPLLCR_INCS_DOTCLKIN0; > > - /* > - * On ES2.x we have a single mux controlled via bit 21, > - * which selects between DCLKIN source (bit 21 = 0) and > - * a PLL source (bit 21 = 1), where the PLL is always > - * PLL1. > - * > - * On ES1.x we have an additional mux, controlled > - * via bit 20, for choosing between PLL0 (bit 20 = 0) > - * and PLL1 (bit 20 = 1). We always want to use PLL1, > - * so on ES1.x, in addition to setting bit 21, we need > - * to set the bit 20. > - */ > - > - if (rcdu->info->quirks & RCAR_DU_QUIRK_H3_ES1_PLL) > - dpllcr |= DPLLCR_PLCS0_H3ES1X_PLL1; > - } > - > rcar_du_group_write(rcrtc->group, DPLLCR, dpllcr); > > escr = ESCR_DCLKSEL_DCLKIN | div; > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c > index b9a94c5260e9..1ffde19cb87f 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c > +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c > @@ -16,7 +16,6 @@ > #include <linux/platform_device.h> > #include <linux/pm.h> > #include <linux/slab.h> > -#include <linux/sys_soc.h> > #include <linux/wait.h> > > #include <drm/drm_atomic_helper.h> > @@ -387,43 +386,6 @@ static const struct rcar_du_device_info rcar_du_r8a7795_info = { > .dpll_mask = BIT(2) | BIT(1), > }; > > -static const struct rcar_du_device_info rcar_du_r8a7795_es1_info = { > - .gen = 3, > - .features = RCAR_DU_FEATURE_CRTC_IRQ > - | RCAR_DU_FEATURE_CRTC_CLOCK > - | RCAR_DU_FEATURE_VSP1_SOURCE > - | RCAR_DU_FEATURE_INTERLACED > - | RCAR_DU_FEATURE_TVM_SYNC, > - .quirks = RCAR_DU_QUIRK_H3_ES1_PCLK_STABILITY > - | RCAR_DU_QUIRK_H3_ES1_PLL, > - .channels_mask = BIT(3) | BIT(2) | BIT(1) | BIT(0), > - .routes = { > - /* > - * R8A7795 has one RGB output, two HDMI outputs and one > - * LVDS output. > - */ > - [RCAR_DU_OUTPUT_DPAD0] = { > - .possible_crtcs = BIT(3), > - .port = 0, > - }, > - [RCAR_DU_OUTPUT_HDMI0] = { > - .possible_crtcs = BIT(1), > - .port = 1, > - }, > - [RCAR_DU_OUTPUT_HDMI1] = { > - .possible_crtcs = BIT(2), > - .port = 2, > - }, > - [RCAR_DU_OUTPUT_LVDS0] = { > - .possible_crtcs = BIT(0), > - .port = 3, > - }, > - }, > - .num_lvds = 1, > - .num_rpf = 5, > - .dpll_mask = BIT(2) | BIT(1), > -}; > - > static const struct rcar_du_device_info rcar_du_r8a7796_info = { > .gen = 3, > .features = RCAR_DU_FEATURE_CRTC_IRQ > @@ -614,11 +576,6 @@ static const struct of_device_id rcar_du_of_table[] = { > > MODULE_DEVICE_TABLE(of, rcar_du_of_table); > > -static const struct soc_device_attribute rcar_du_soc_table[] = { > - { .soc_id = "r8a7795", .revision = "ES1.*", .data = &rcar_du_r8a7795_es1_info }, > - { /* sentinel */ } > -}; > - > const char *rcar_du_output_name(enum rcar_du_output output) > { > static const char * const names[] = { > @@ -707,7 +664,6 @@ static void rcar_du_shutdown(struct platform_device *pdev) > > static int rcar_du_probe(struct platform_device *pdev) > { > - const struct soc_device_attribute *soc_attr; > struct rcar_du_device *rcdu; > unsigned int mask; > int ret; > @@ -725,10 +681,6 @@ static int rcar_du_probe(struct platform_device *pdev) > > rcdu->info = of_device_get_match_data(rcdu->dev); > > - soc_attr = soc_device_match(rcar_du_soc_table); > - if (soc_attr) > - rcdu->info = soc_attr->data; > - > platform_set_drvdata(pdev, rcdu); > > /* I/O resources */ > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.h b/drivers/gpu/drm/rcar-du/rcar_du_drv.h > index acc3673fefe1..5cfa2bb7ad93 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.h > +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.h > @@ -34,8 +34,6 @@ struct rcar_du_device; > #define RCAR_DU_FEATURE_NO_BLENDING BIT(5) /* PnMR.SPIM does not have ALP nor EOR bits */ > > #define RCAR_DU_QUIRK_ALIGN_128B BIT(0) /* Align pitches to 128 bytes */ > -#define RCAR_DU_QUIRK_H3_ES1_PCLK_STABILITY BIT(1) /* H3 ES1 has pclk stability issue */ > -#define RCAR_DU_QUIRK_H3_ES1_PLL BIT(2) /* H3 ES1 PLL setup differs from non-ES1 */ > > enum rcar_du_output { > RCAR_DU_OUTPUT_DPAD0, > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_regs.h b/drivers/gpu/drm/rcar-du/rcar_du_regs.h > index 789ae9285108..288eff12b2b1 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_du_regs.h > +++ b/drivers/gpu/drm/rcar-du/rcar_du_regs.h > @@ -283,8 +283,7 @@ > #define DPLLCR 0x20044 > #define DPLLCR_CODE (0x95 << 24) > #define DPLLCR_PLCS1 (1 << 23) > -#define DPLLCR_PLCS0_PLL (1 << 21) > -#define DPLLCR_PLCS0_H3ES1X_PLL1 (1 << 20) > +#define DPLLCR_PLCS0 (1 << 21) > #define DPLLCR_CLKE (1 << 18) > #define DPLLCR_FDPLL(n) ((n) << 12) > #define DPLLCR_N(n) ((n) << 5) > -- > 2.35.1 >
next prev parent reply other threads:[~2023-03-08 10:12 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-07 16:30 [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1 Wolfram Sang 2023-03-07 16:30 ` Wolfram Sang 2023-03-07 16:30 ` [PATCH 01/11] iommu/ipmmu-vmsa: remove R-Car H3 ES1.* handling Wolfram Sang 2023-03-22 13:28 ` Joerg Roedel 2023-03-07 16:30 ` [PATCH 02/11] drm: rcar-du: remove R-Car H3 ES1.* workarounds Wolfram Sang 2023-03-07 16:30 ` Wolfram Sang 2023-03-08 10:11 ` Kieran Bingham [this message] 2023-03-08 10:11 ` Kieran Bingham 2023-03-07 16:30 ` [PATCH 03/11] media: rcar-vin: remove R-Car H3 ES1.* handling Wolfram Sang 2023-03-07 16:30 ` [PATCH 04/11] media: rcar-vin: csi2: " Wolfram Sang 2023-03-07 16:30 ` [PATCH 05/11] media: renesas: fdp1: " Wolfram Sang 2023-03-08 0:36 ` Kieran Bingham 2023-04-24 17:37 ` Geert Uytterhoeven 2023-04-24 19:17 ` Wolfram Sang 2023-04-24 19:37 ` Geert Uytterhoeven 2023-04-24 23:52 ` Laurent Pinchart 2023-03-07 16:30 ` [PATCH 06/11] thermal/drivers/rcar_gen3_thermal: " Wolfram Sang 2023-03-08 18:04 ` Daniel Lezcano 2023-03-07 16:30 ` [PATCH 07/11] ravb: " Wolfram Sang 2023-03-07 17:21 ` Simon Horman 2023-03-08 9:39 ` Sergei Shtylyov 2023-03-07 16:30 ` [PATCH 08/11] mmc: renesas_sdhi: " Wolfram Sang 2023-03-09 15:02 ` Ulf Hansson 2023-03-07 16:30 ` [PATCH 09/11] usb: host: xhci-rcar: remove leftover quirk handling Wolfram Sang 2023-03-07 16:30 ` [PATCH 10/11] usb: host: xhci-rcar: remove R-Car H3 ES1.* handling Wolfram Sang 2023-03-07 16:30 ` [PATCH 11/11] usb: gadget: udc: renesas_usb3: " Wolfram Sang 2023-03-09 7:30 ` [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1 patchwork-bot+netdevbpf 2023-03-09 7:30 ` patchwork-bot+netdevbpf
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=167827031185.93391.13063424473910902940@Monstersaurus \ --to=kieran.bingham+renesas@ideasonboard.com \ --cc=airlied@gmail.com \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=laurent.pinchart@ideasonboard.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-renesas-soc@vger.kernel.org \ --cc=wsa+renesas@sang-engineering.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.