Re: [v4 2/5] drm/mediatek: dpi dual edge support
Hi, Jitao: On Sat, 2019-05-18 at 17:56 +0800, Jitao Shi wrote: > DPI sample the data both rising and falling edge. > It can reduce half data io pins. All the registers which you control in this patch exist in MT8173. So I think this is not a SoC-level feature. This feature depends on how much io pins you want to use in this platform. Could we get the io pins information from device tree or calling any driver's api to get? If there is no way to get this information, I could just temporarily apply this patch and need plan to fix this temporary solution. Regards, CK > > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c > b/drivers/gpu/drm/mediatek/mtk_dpi.c > index 22e68a100e7b..ccef3ac1c560 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c > @@ -117,6 +117,7 @@ struct mtk_dpi_conf { > unsigned int (*cal_factor)(int clock); > u32 reg_h_fre_con; > bool edge_sel_en; > + bool dual_edge; > }; > > static void mtk_dpi_mask(struct mtk_dpi *dpi, u32 offset, u32 val, u32 mask) > @@ -353,6 +354,13 @@ static void mtk_dpi_config_disable_edge(struct mtk_dpi > *dpi) > mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, 0, EDGE_SEL_EN); > } > > +static void mtk_dpi_enable_dual_edge(struct mtk_dpi *dpi) > +{ > + mtk_dpi_mask(dpi, DPI_DDR_SETTING, DDR_EN | DDR_4PHASE, > + DDR_EN | DDR_4PHASE); > + mtk_dpi_mask(dpi, DPI_OUTPUT_SETTING, EDGE_SEL, EDGE_SEL); > +} > + > static void mtk_dpi_config_color_format(struct mtk_dpi *dpi, > enum mtk_dpi_out_color_format format) > { > @@ -444,7 +452,8 @@ static int mtk_dpi_set_display_mode(struct mtk_dpi *dpi, > pll_rate = clk_get_rate(dpi->tvd_clk); > > vm.pixelclock = pll_rate / factor; > - clk_set_rate(dpi->pixel_clk, vm.pixelclock); > + clk_set_rate(dpi->pixel_clk, > + vm.pixelclock * (dpi->conf->dual_edge ? 2 : 1)); > vm.pixelclock = clk_get_rate(dpi->pixel_clk); > > dev_dbg(dpi->dev, "Got PLL %lu Hz, pixel clock %lu Hz\n", > @@ -509,6 +518,8 @@ static int mtk_dpi_set_display_mode(struct mtk_dpi *dpi, > mtk_dpi_config_color_format(dpi, dpi->color_format); > mtk_dpi_config_2n_h_fre(dpi); > mtk_dpi_config_disable_edge(dpi); > + if (dpi->conf->dual_edge) > + mtk_dpi_enable_dual_edge(dpi); > mtk_dpi_sw_reset(dpi, false); > > return 0; ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v1 2/2] drm/komeda: Enable color-encoding (YUV format) support
On Thu, May 16, 2019 at 02:13:13PM +0800, Lowry Li (Arm Technology China) wrote: > Adds color-encoding properties if layer can support YUV format. > Updates HW YUV-RGB matrix state according to the color-encoding > properties. > > Signed-off-by: Lowry Li (Arm Technology China) > --- > drivers/gpu/drm/arm/display/komeda/Makefile| 1 + > .../gpu/drm/arm/display/komeda/d71/d71_component.c | 6 ++ > .../gpu/drm/arm/display/komeda/komeda_color_mgmt.c | 67 > ++ > .../gpu/drm/arm/display/komeda/komeda_color_mgmt.h | 17 ++ > drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 13 + > 5 files changed, 104 insertions(+) > create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.c > create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.h > > diff --git a/drivers/gpu/drm/arm/display/komeda/Makefile > b/drivers/gpu/drm/arm/display/komeda/Makefile > index d7e29fc..73b8e8b 100644 > --- a/drivers/gpu/drm/arm/display/komeda/Makefile > +++ b/drivers/gpu/drm/arm/display/komeda/Makefile > @@ -8,6 +8,7 @@ komeda-y := \ > komeda_drv.o \ > komeda_dev.o \ > komeda_format_caps.o \ > + komeda_color_mgmt.o \ > komeda_pipeline.o \ > komeda_pipeline_state.o \ > komeda_framebuffer.o \ > diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > index dfc70f5..b85514b 100644 > --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > @@ -10,6 +10,7 @@ > #include "komeda_kms.h" > #include "malidp_io.h" > #include "komeda_framebuffer.h" > +#include "komeda_color_mgmt.h" > > static void get_resources_id(u32 hw_id, u32 *pipe_id, u32 *comp_id) > { > @@ -239,6 +240,11 @@ static void d71_layer_update(struct komeda_component *c, > } > > malidp_write32(reg, LAYER_R_CONTROL, upsampling); > + malidp_write_group(reg, LAYER_YUV_RGB_COEFF0, > +KOMEDA_N_YUV2RGB_COEFFS, > +komeda_select_yuv2rgb_coeffs( > + plane_st->color_encoding, > + plane_st->color_range)); > } > > malidp_write32(reg, LAYER_FMT, kfb->format_caps->hw_id); > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.c > b/drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.c > new file mode 100644 > index 000..9d14a92 > --- /dev/null > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.c > @@ -0,0 +1,67 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * (C) COPYRIGHT 2019 ARM Limited. All rights reserved. > + * Author: James.Qian.Wang > + * > + */ > + > +#include "komeda_color_mgmt.h" > + > +/* 10bit precision YUV2RGB matrix */ > +static const s32 yuv2rgb_bt601_narrow[KOMEDA_N_YUV2RGB_COEFFS] = { > + 1192,0, 1634, > + 1192, -401, -832, > + 1192, 2066,0, > + 64, 512, 512 > +}; > + > +static const s32 yuv2rgb_bt601_wide[KOMEDA_N_YUV2RGB_COEFFS] = { > + 1024,0, 1436, > + 1024, -352, -731, > + 1024, 1815,0, > +0, 512, 512 > +}; > + > +static const s32 yuv2rgb_bt709_narrow[KOMEDA_N_YUV2RGB_COEFFS] = { > + 1192,0, 1836, > + 1192, -218, -546, > + 1192, 2163,0, > + 64, 512, 512 > +}; > + > +static const s32 yuv2rgb_bt709_wide[KOMEDA_N_YUV2RGB_COEFFS] = { > + 1024,0, 1613, > + 1024, -192, -479, > + 1024, 1900,0, > +0, 512, 512 > +}; > + > +static const s32 yuv2rgb_bt2020[KOMEDA_N_YUV2RGB_COEFFS] = { > + 1024,0, 1476, > + 1024, -165, -572, > + 1024, 1884,0, > +0, 512, 512 > +}; > + > +const s32 *komeda_select_yuv2rgb_coeffs(u32 color_encoding, u32 color_range) > +{ > + bool narrow = color_range == DRM_COLOR_YCBCR_LIMITED_RANGE; > + const s32 *coeffs; > + > + switch (color_encoding) { > + case DRM_COLOR_YCBCR_BT709: > + coeffs = narrow ? yuv2rgb_bt709_narrow : yuv2rgb_bt709_wide; > + break; > + case DRM_COLOR_YCBCR_BT601: > + coeffs = narrow ? yuv2rgb_bt601_narrow : yuv2rgb_bt601_wide; > + break; > + case DRM_COLOR_YCBCR_BT2020: > + coeffs = yuv2rgb_bt2020; > + break; > + default: > + coeffs = NULL; > + break; > + } > + > + return coeffs; > +} > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.h > b/drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.h > new file mode 100644 > index 000..a2df218 > --- /dev/null > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_color_mgmt.h > @@ -0,0 +1,17 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * (C) COPYRIGHT 2019 ARM Limited. All rights reserved. > + * Author: James.Qian.Wang > + * > + */ > + > +#ifndef _KOMEDA_COLOR_MGMT_H_ > +#define _KOMEDA_COLOR_MGMT_H_ > + > +#include
Re: [PATCH v1 1/2] drm/komeda: Update HW up-sampling on D71
On Thu, May 16, 2019 at 02:13:09PM +0800, Lowry Li (Arm Technology China) wrote: > Updates HW up-sampling method according to the format type. > > Signed-off-by: Lowry Li (Arm Technology China) > --- > .../gpu/drm/arm/display/komeda/d71/d71_component.c | 29 > ++ > 1 file changed, 29 insertions(+) > > diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > index f8846c6..dfc70f5 100644 > --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > @@ -212,6 +212,35 @@ static void d71_layer_update(struct komeda_component *c, > malidp_write32(reg, BLK_P1_PTR_HIGH, upper_32_bits(addr)); > } > > + if (fb->format->is_yuv) { > + u32 upsampling = 0; > + > + switch (kfb->format_caps->fourcc) { > + case DRM_FORMAT_YUYV: > + upsampling = fb->modifier ? LR_CHI422_BILINEAR : > + LR_CHI422_REPLICATION; > + break; > + case DRM_FORMAT_UYVY: > + upsampling = LR_CHI422_REPLICATION; > + break; > + case DRM_FORMAT_NV12: > + case DRM_FORMAT_YUV420_8BIT: > + case DRM_FORMAT_YUV420_10BIT: > + case DRM_FORMAT_YUV420: > + case DRM_FORMAT_P010: > + /* these fmt support MPGE/JPEG both, here perfer JPEG*/ > + upsampling = LR_CHI420_JPEG; > + break; > + case DRM_FORMAT_X0L2: > + upsampling = LR_CHI420_JPEG; > + break; > + default: > + break; > + } > + > + malidp_write32(reg, LAYER_R_CONTROL, upsampling); > + } > + > malidp_write32(reg, LAYER_FMT, kfb->format_caps->hw_id); > malidp_write32(reg, BLK_IN_SIZE, HV_SIZE(st->hsize, st->vsize)); > > -- > 1.9.1 > Reviewed-by: James Qian Wang (Arm Technology China) Looks good to me. Thank you ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/komeda: Clear enable bit in CU_INPUTx_CONTROL
On Wed, May 15, 2019 at 11:02:05AM +0800, Lowry Li (Arm Technology China) wrote: > Besides clearing the input ID to zero, D71 compiz also has input > enable bit in CU_INPUTx_CONTROL which need to be cleared. > > Signed-off-by: Lowry Li (Arm Technology China) > --- > drivers/gpu/drm/arm/display/komeda/d71/d71_component.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > index 1135e38..f8846c6 100644 > --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c > @@ -435,8 +435,18 @@ static void d71_component_disable(struct > komeda_component *c) > > malidp_write32(reg, BLK_CONTROL, 0); > > - for (i = 0; i < c->max_active_inputs; i++) > + for (i = 0; i < c->max_active_inputs; i++) { > malidp_write32(reg, BLK_INPUT_ID0 + (i << 2), 0); > + > + /* Besides clearing the input ID to zero, D71 compiz also has > + * input enable bit in CU_INPUTx_CONTROL which need to be > + * cleared. > + */ > + if (has_bit(c->id, KOMEDA_PIPELINE_COMPIZS)) > + malidp_write32(reg, CU_INPUT0_CONTROL + > +i * CU_PER_INPUT_REGS * 4, > +CU_INPUT_CTRL_ALPHA(0xFF)); > + } > } > > static void compiz_enable_input(u32 __iomem *id_reg, > -- > 1.9.1 > Looks good to me. Reviewed-by: James Qian Wang (Arm Technology China)
Re: drm/komeda: Potential error pointer dereference
On Fri, May 03, 2019 at 03:25:25PM +0300, Dan Carpenter wrote: > We need to check whether drm_atomic_get_crtc_state() returns an error > pointer before dereferencing "crtc_st". > > Fixes: 7d31b9e7a550 ("drm/komeda: Add komeda_plane/plane_helper_funcs") > Signed-off-by: Dan Carpenter > Acked-by: Liviu Dudau > --- > drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > index 07ed0cc1bc44..c7e5fc6e5500 100644 > --- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > @@ -64,7 +64,7 @@ komeda_plane_atomic_check(struct drm_plane *plane, > return 0; > > crtc_st = drm_atomic_get_crtc_state(state->state, state->crtc); > - if (!crtc_st->enable) { > + if (IS_ERR(crtc_st) || !crtc_st->enable) { > DRM_DEBUG_ATOMIC("Cannot update plane on a disabled CRTC.\n"); > return -EINVAL; > } Thank you for the fixing. Reviewed-by: James Qian Wang (Arm Technology China) ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: drm/komeda: Potential error pointer dereference
Hi Dan On Fri, May 03, 2019 at 03:25:25PM +0300, Dan Carpenter wrote: > We need to check whether drm_atomic_get_crtc_state() returns an error > pointer before dereferencing "crtc_st". > > Fixes: 7d31b9e7a550 ("drm/komeda: Add komeda_plane/plane_helper_funcs") > Signed-off-by: Dan Carpenter > Acked-by: Liviu Dudau > --- > drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > index 07ed0cc1bc44..c7e5fc6e5500 100644 > --- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c > @@ -64,7 +64,7 @@ komeda_plane_atomic_check(struct drm_plane *plane, > return 0; > > crtc_st = drm_atomic_get_crtc_state(state->state, state->crtc); > - if (!crtc_st->enable) { > + if (IS_ERR(crtc_st) || !crtc_st->enable) { > DRM_DEBUG_ATOMIC("Cannot update plane on a disabled CRTC.\n"); > return -EINVAL; > } Thank you for the fixing. -- Reviewed-by: James Qian Wang (Arm Technology China) ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [v2 3/3] drm/mediatek: add mipi_tx driver for mt8183
On Sat, 2019-05-18 at 15:51 +0800, Jitao Shi wrote: > On Mon, 2019-05-06 at 17:17 +0800, CK Hu wrote: > > Hi, Jitao: > > > > On Tue, 2019-04-16 at 13:42 +0800, Jitao Shi wrote: > > > This patch add mt8183 mipi_tx driver. > > > And also support other chips that use the same binding and driver. > > > > > > Signed-off-by: Jitao Shi > > > --- > > > drivers/gpu/drm/mediatek/Makefile | 1 + > > > drivers/gpu/drm/mediatek/mtk_mipi_tx.c| 2 + > > > drivers/gpu/drm/mediatek/mtk_mipi_tx.h| 1 + > > > drivers/gpu/drm/mediatek/mtk_mt8183_mipi_tx.c | 154 ++ > > > 4 files changed, 158 insertions(+) > > > create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8183_mipi_tx.c > > > > > > > [snip] > > > > > + > > > +static int mtk_mipi_tx_pll_prepare(struct clk_hw *hw) > > > +{ > > > + struct mtk_mipi_tx *mipi_tx = mtk_mipi_tx_from_clk_hw(hw); > > > + unsigned int txdiv, txdiv0; > > > + u64 pcw; > > > + int ret; > > > + > > > + dev_dbg(mipi_tx->dev, "prepare: %u bps\n", mipi_tx->data_rate); > > > + > > > + if (mipi_tx->data_rate >= 20) { > > > + txdiv = 1; > > > + txdiv0 = 0; > > > + } else if (mipi_tx->data_rate >= 10) { > > > + txdiv = 2; > > > + txdiv0 = 1; > > > + } else if (mipi_tx->data_rate >= 5) { > > > + txdiv = 4; > > > + txdiv0 = 2; > > > + } else if (mipi_tx->data_rate > 25000) { > > > + txdiv = 8; > > > + txdiv0 = 3; > > > + } else if (mipi_tx->data_rate >= 12500) { > > > + txdiv = 16; > > > + txdiv0 = 4; > > > + } else { > > > + return -EINVAL; > > > + } > > > + > > > + ret = clk_prepare_enable(mipi_tx->ref_clk); > > > + if (ret < 0) { > > > + dev_err(mipi_tx->dev, > > > + "can't prepare and enable mipi_tx ref_clk %d\n", ret); > > > + return ret; > > > + } > > > > You enable the parent clock when prepare this clock here, this behavior > > looks strange. I think the flow should be: > > > > 1. Parent clock prepare > > 2. This clock prepare > > 3. Parent clock enable > > 4. This clock enable > > > > Maybe you should implement 'enable callback' so that parent clock would > > be already enabled. > > > > One question is, mipi_tx_pll is used by dsi driver, but I does not see > > dsi prepare_enable() mipi_tx_pll, how does this work? > > > > Regards, > > CK > > > > The mipi_tx can be accessed after clk_prepare_enable(mipi_tx->ref_clk); > > So place the clk_prepare_enable(mipi_tx->ref_clk) before accessing > mipitx. > > mipi_tx_pll is enable by mtk_mipi_tx_power_on() in mtk_mip_tx.c. > clk_prepare_enable(mipi_tx->pll) will enable mipi_tx_pll. OK, so it start from dsi driver. The callstack is: phy_power_on(dsi->phy); -> mtk_mipi_tx_power_on() --> clk_prepare_enable(mipi_tx->pll); ---> mtk_mipi_tx_pll_prepare(); In clk_prepare_enable(), it separately call clk_prepare() and clk_enable(). When clk_prepare(), it prepare the parent clock then prepare this clock. When clk_enable(), it enable the parent clock then enable this clock. So this would result in the sequence: 1. Prepare mipi_tx->ref_clk 2. Prepare mipi_tx->pll 3. Enable mipi_tx->ref_clk 4. Enable mipi_tx->pll You say 'So place the clk_prepare_enable(mipi_tx->ref_clk) before accessing mipitx.', so the step 1 and step 3 is equal to clk_prepare_enable(mipi_tx->ref_clk), so I require you to access mipitx in step 4, not in step 2. Regards, CK > > Beset Regards > Jitao > > > > + > > > + mtk_mipi_tx_clear_bits(mipi_tx, MIPITX_PLL_CON4, RG_DSI_PLL_IBIAS); > > > + > > > + mtk_mipi_tx_set_bits(mipi_tx, MIPITX_PLL_PWR, AD_DSI_PLL_SDM_PWR_ON); > > > + usleep_range(30, 100); > > > + mtk_mipi_tx_clear_bits(mipi_tx, MIPITX_PLL_PWR, AD_DSI_PLL_SDM_ISO_EN); > > > + pcw = div_u64(((u64)mipi_tx->data_rate * txdiv) << 24, 2600); > > > + writel(pcw, mipi_tx->regs + MIPITX_PLL_CON0); > > > + mtk_mipi_tx_update_bits(mipi_tx, MIPITX_PLL_CON1, RG_DSI_PLL_POSDIV, > > > + txdiv0 << 8); > > > + usleep_range(1000, 2000); > > > + mtk_mipi_tx_set_bits(mipi_tx, MIPITX_PLL_CON1, RG_DSI_PLL_EN); > > > + > > > + return 0; > > > +} > > > + > > > +static void mtk_mipi_tx_pll_unprepare(struct clk_hw *hw) > > > +{ > > > + struct mtk_mipi_tx *mipi_tx = mtk_mipi_tx_from_clk_hw(hw); > > > + > > > + dev_dbg(mipi_tx->dev, "unprepare\n"); > > > + > > > + mtk_mipi_tx_clear_bits(mipi_tx, MIPITX_PLL_CON1, RG_DSI_PLL_EN); > > > + > > > + mtk_mipi_tx_set_bits(mipi_tx, MIPITX_PLL_PWR, AD_DSI_PLL_SDM_ISO_EN); > > > + mtk_mipi_tx_clear_bits(mipi_tx, MIPITX_PLL_PWR, AD_DSI_PLL_SDM_PWR_ON); > > > + clk_disable_unprepare(mipi_tx->ref_clk); > > > +} > > > + > > > > > >
[Bug 110701] GPU faults in in Unigine Valley 1.0
https://bugs.freedesktop.org/show_bug.cgi?id=110701 --- Comment #18 from Christian Widmer --- (In reply to kyle.devir from comment #17) > Vega 10 seems affected in a different way, for some reason. It does indeed seem like that is the case. I have a RX580 like you and for me it is even enough to only revert commit 78e35df52aa2f7d770f929a0866a0faa89c261a9. Even later commits do not seem to cause any problems for me as I have been using mesa (on git-28c2ce7105) with only that single commit patched out without issues for two days. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110701] GPU faults in in Unigine Valley 1.0
https://bugs.freedesktop.org/show_bug.cgi?id=110701 --- Comment #17 from kyle.de...@mykolab.com --- A few seconds. The corruption was almost immediately visible to me. I could trigger the glitches with little effort. Prior commit is fine, though. I've been using 0f1b070bad34c46c4bcc6c679fa533bf6b4b79e5 without a single visual glitch happening, thus far. Vega 10 seems affected in a different way, for some reason. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/komeda: Adds zorder support
- Creates the zpos property. - Implement komeda_crtc_normalize_zpos to replace drm_atomic_normalize_zpos, reasons as the following: 1. The drm_atomic_normalize_zpos allows to configure same zpos for different planes, but komeda doesn't support such configuration. 2. For further slave pipline case, Komeda need to calculate the max_slave_zorder, we will merge such calculation into komed_crtc_normalize_zpos to save a separated plane_state loop. 3. For feature none-scaling layer_split, which a plane_state will be assigned to two individual layers(left/right), which requires two normalize_zpos for this plane, plane_st->normalize_zpos will be used by left layer, normalize_zpos + 1 for right_layer. This patch series depends on: - https://patchwork.freedesktop.org/series/58710/ - https://patchwork.freedesktop.org/series/59000/ - https://patchwork.freedesktop.org/series/59002/ - https://patchwork.freedesktop.org/series/59747/ - https://patchwork.freedesktop.org/series/59915/ - https://patchwork.freedesktop.org/series/60083/ - https://patchwork.freedesktop.org/series/60698/ Signed-off-by: Lowry Li (Arm Technology China) --- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 90 ++- drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 3 + drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 6 +- 3 files changed, 97 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c index 306ea06..0ec7665 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c @@ -100,6 +100,90 @@ static void komeda_kms_commit_tail(struct drm_atomic_state *old_state) .atomic_commit_tail = komeda_kms_commit_tail, }; +static int komeda_plane_state_list_add(struct drm_plane_state *plane_st, + struct list_head *zorder_list) +{ + struct komeda_plane_state *new = to_kplane_st(plane_st); + struct komeda_plane_state *node, *last; + + last = list_empty(zorder_list) ? + NULL : list_last_entry(zorder_list, typeof(*last), zlist_node); + + /* Considering the list sequence is zpos increasing, so if list is empty +* or the zpos of new node bigger than the last node in list, no need +* loop and just insert the new one to the tail of the list. +*/ + if (!last || (new->base.zpos > last->base.zpos)) { + list_add_tail(>zlist_node, zorder_list); + return 0; + } + + /* Build the list by zpos increasing */ + list_for_each_entry(node, zorder_list, zlist_node) { + if (new->base.zpos < node->base.zpos) { + list_add_tail(>zlist_node, >zlist_node); + break; + } else if (node->base.zpos == new->base.zpos) { + struct drm_plane *a = node->base.plane; + struct drm_plane *b = new->base.plane; + + /* Komeda doesn't support setting a same zpos for +* different planes. +*/ + DRM_DEBUG_ATOMIC("PLANE: %s and PLANE: %s are configured same zpos: %d.\n", +a->name, b->name, node->base.zpos); + return -EINVAL; + } + } + + return 0; +} + +static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc, + struct drm_crtc_state *crtc_st) +{ + struct drm_atomic_state *state = crtc_st->state; + struct komeda_plane_state *kplane_st; + struct drm_plane_state *plane_st; + struct drm_framebuffer *fb; + struct drm_plane *plane; + struct list_head zorder_list; + int order = 0, err; + + DRM_DEBUG_ATOMIC("[CRTC:%d:%s] calculating normalized zpos values\n", +crtc->base.id, crtc->name); + + INIT_LIST_HEAD(_list); + + /* This loop also added all effected planes into the new state */ + drm_for_each_plane_mask(plane, crtc->dev, crtc_st->plane_mask) { + plane_st = drm_atomic_get_plane_state(state, plane); + if (IS_ERR(plane_st)) + return PTR_ERR(plane_st); + + /* Build a list by zpos increasing */ + err = komeda_plane_state_list_add(plane_st, _list); + if (err) + return err; + } + + list_for_each_entry(kplane_st, _list, zlist_node) { + plane_st = _st->base; + fb = plane_st->fb; + plane = plane_st->plane; + + plane_st->normalized_zpos = order++; + + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] zpos:%d, normalized zpos: %d\n", +plane->base.id, plane->name, +plane_st->zpos, plane_st->normalized_zpos); + } + +
[Bug 110701] GPU faults in in Unigine Valley 1.0
https://bugs.freedesktop.org/show_bug.cgi?id=110701 --- Comment #16 from Yury Zhuravlev --- (In reply to kyle.devir from comment #15) > Ah, also, recent LLVM master with RX580. probably for Vega something break before but I can agree after that commit everything became much worst. How long was you testing commit before 78e35df52aa2f7d770f929a0866a0faa89c261a9 ? -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [v3 2/3] drm/mediatek: separate mipi_tx to different file
Hi, Jitao: On Sat, 2019-05-18 at 16:22 +0800, Jitao Shi wrote: > Different IC has different mipi_tx setting of dsi. > This patch separates the mipi_tx hardware relate part for mt8173. This patch looks good to me except the last blank line, I'll remove it before I apply this patch. Reviewed-by: CK Hu > > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/Makefile | 1 + > drivers/gpu/drm/mediatek/mtk_mipi_tx.c| 342 ++ > drivers/gpu/drm/mediatek/mtk_mipi_tx.h| 49 +++ > drivers/gpu/drm/mediatek/mtk_mt8173_mipi_tx.c | 289 +++ > 4 files changed, 362 insertions(+), 319 deletions(-) > create mode 100644 drivers/gpu/drm/mediatek/mtk_mipi_tx.h > create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8173_mipi_tx.c > > diff --git a/drivers/gpu/drm/mediatek/Makefile > b/drivers/gpu/drm/mediatek/Makefile > index 82ae49c64221..2c8de1f5a5ee 100644 > --- a/drivers/gpu/drm/mediatek/Makefile > +++ b/drivers/gpu/drm/mediatek/Makefile > @@ -12,6 +12,7 @@ mediatek-drm-y := mtk_disp_color.o \ > mtk_drm_plane.o \ > mtk_dsi.o \ > mtk_mipi_tx.o \ > + mtk_mt8173_mipi_tx.o \ > mtk_dpi.o > > obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o > diff --git a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c > b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c > index 90e913108950..46bc02cfe85c 100644 > --- a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c > +++ b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c > @@ -11,292 +11,39 @@ > * GNU General Public License for more details. > */ > > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -#define MIPITX_DSI_CON 0x00 > -#define RG_DSI_LDOCORE_ENBIT(0) > -#define RG_DSI_CKG_LDOOUT_EN BIT(1) > -#define RG_DSI_BCLK_SEL (3 << 2) > -#define RG_DSI_LD_IDX_SEL(7 << 4) > -#define RG_DSI_PHYCLK_SEL(2 << 8) > -#define RG_DSI_DSICLK_FREQ_SEL BIT(10) > -#define RG_DSI_LPTX_CLMP_EN BIT(11) > - > -#define MIPITX_DSI_CLOCK_LANE0x04 > -#define MIPITX_DSI_DATA_LANE00x08 > -#define MIPITX_DSI_DATA_LANE10x0c > -#define MIPITX_DSI_DATA_LANE20x10 > -#define MIPITX_DSI_DATA_LANE30x14 > -#define RG_DSI_LNTx_LDOOUT_ENBIT(0) > -#define RG_DSI_LNTx_CKLANE_ENBIT(1) > -#define RG_DSI_LNTx_LPTX_IPLUS1 BIT(2) > -#define RG_DSI_LNTx_LPTX_IPLUS2 BIT(3) > -#define RG_DSI_LNTx_LPTX_IMINUS BIT(4) > -#define RG_DSI_LNTx_LPCD_IPLUS BIT(5) > -#define RG_DSI_LNTx_LPCD_IMINUS BIT(6) > -#define RG_DSI_LNTx_RT_CODE (0xf << 8) > - > -#define MIPITX_DSI_TOP_CON 0x40 > -#define RG_DSI_LNT_INTR_EN BIT(0) > -#define RG_DSI_LNT_HS_BIAS_ENBIT(1) > -#define RG_DSI_LNT_IMP_CAL_ENBIT(2) > -#define RG_DSI_LNT_TESTMODE_EN BIT(3) > -#define RG_DSI_LNT_IMP_CAL_CODE (0xf << 4) > -#define RG_DSI_LNT_AIO_SEL (7 << 8) > -#define RG_DSI_PAD_TIE_LOW_ENBIT(11) > -#define RG_DSI_DEBUG_INPUT_ENBIT(12) > -#define RG_DSI_PRESERVE (7 << 13) > - > -#define MIPITX_DSI_BG_CON0x44 > -#define RG_DSI_BG_CORE_ENBIT(0) > -#define RG_DSI_BG_CKEN BIT(1) > -#define RG_DSI_BG_DIV(0x3 << 2) > -#define RG_DSI_BG_FAST_CHARGEBIT(4) > -#define RG_DSI_VOUT_MSK (0x3 << 5) > -#define RG_DSI_V12_SEL (7 << 5) > -#define RG_DSI_V10_SEL (7 << 8) > -#define RG_DSI_V072_SEL (7 << 11) > -#define RG_DSI_V04_SEL (7 << 14) > -#define RG_DSI_V032_SEL (7 << 17) > -#define RG_DSI_V02_SEL (7 << 20) > -#define RG_DSI_BG_R1_TRIM(0xf << 24) > -#define RG_DSI_BG_R2_TRIM(0xf << 28) > - > -#define MIPITX_DSI_PLL_CON0 0x50 > -#define RG_DSI_MPPLL_PLL_EN BIT(0) > -#define RG_DSI_MPPLL_DIV_MSK (0x1ff << 1) > -#define RG_DSI_MPPLL_PREDIV (3 << 1) > -#define RG_DSI_MPPLL_TXDIV0 (3 << 3) > -#define RG_DSI_MPPLL_TXDIV1 (3 << 5) > -#define RG_DSI_MPPLL_POSDIV (7 << 7) > -#define RG_DSI_MPPLL_MONVC_ENBIT(10) > -#define RG_DSI_MPPLL_MONREF_EN BIT(11) > -#define RG_DSI_MPPLL_VOD_EN BIT(12) > - > -#define MIPITX_DSI_PLL_CON1 0x54 > -#define RG_DSI_MPPLL_SDM_FRA_EN BIT(0) > -#define RG_DSI_MPPLL_SDM_SSC_PH_INIT BIT(1) > -#define RG_DSI_MPPLL_SDM_SSC_EN BIT(2) > -#define RG_DSI_MPPLL_SDM_SSC_PRD (0x << 16) > - > -#define MIPITX_DSI_PLL_CON2 0x58 > - > -#define MIPITX_DSI_PLL_TOP 0x64 > -#define RG_DSI_MPPLL_PRESERVE(0xff << 8) > - > -#define
[Bug 96906] OpenCL program causes steady stream of GPU fault detected errors
https://bugs.freedesktop.org/show_bug.cgi?id=96906 --- Comment #9 from danagoye...@gmail.com --- It's not just miners that can cause it. I get similar messages when running Luxmark and the LuxVR mode. In my case, the device is a Radeon Pro WX 4100 ("Baffin"). Once these errors occur, all sorts of OpenGL applications freeze, including Chrome tabs. After that, it seems like I can only fix it by rebooting. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH V2] drm/vkms: Remove useless call to drm_connector_register/unregister()
Hi Daniel, I forgot to apply this patch. Is it ok for you if I apply it? On Fri, Mar 15, 2019 at 1:11 PM Rodrigo Siqueira wrote: > > The function vkms_output_init() is invoked during the module > initialization, and it handles the creation/configuration of the vkms > essential elements (e.g., connectors, encoder, etc). Among the > initializations, this function tries to initialize a connector and > register it by calling drm_connector_register(). However, inside the > drm_connector_register(), at the beginning of this function there is the > following validation: > > if (!connector->dev->registered) >return 0; > > In this sense, invoke drm_connector_register() after initializing the > connector has no effect because the register field is false. The > connector register happens when drm_dev_register() is invoked; the same > issue exists with drm_connector_unregister(). Therefore, this commit > removes the unnecessary call to drm_connector_register() and > drm_connector_unregister(). > > Changes since v2: > * Remove unnecessary call to drm_connector_unregister() > * Remove unused label > > Signed-off-by: Rodrigo Siqueira > Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/vkms/vkms_output.c | 10 -- > 1 file changed, 10 deletions(-) > > diff --git a/drivers/gpu/drm/vkms/vkms_output.c > b/drivers/gpu/drm/vkms/vkms_output.c > index 3b162b25312e..56fb5c2a2315 100644 > --- a/drivers/gpu/drm/vkms/vkms_output.c > +++ b/drivers/gpu/drm/vkms/vkms_output.c > @@ -6,7 +6,6 @@ > > static void vkms_connector_destroy(struct drm_connector *connector) > { > - drm_connector_unregister(connector); > drm_connector_cleanup(connector); > } > > @@ -71,12 +70,6 @@ int vkms_output_init(struct vkms_device *vkmsdev) > > drm_connector_helper_add(connector, _conn_helper_funcs); > > - ret = drm_connector_register(connector); > - if (ret) { > - DRM_ERROR("Failed to register connector\n"); > - goto err_connector_register; > - } > - > ret = drm_encoder_init(dev, encoder, _encoder_funcs, >DRM_MODE_ENCODER_VIRTUAL, NULL); > if (ret) { > @@ -99,9 +92,6 @@ int vkms_output_init(struct vkms_device *vkmsdev) > drm_encoder_cleanup(encoder); > > err_encoder: > - drm_connector_unregister(connector); > - > -err_connector_register: > drm_connector_cleanup(connector); > > err_connector: > -- > 2.21.0 -- Rodrigo Siqueira https://siqueira.tech ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110708] this is test error
https://bugs.freedesktop.org/show_bug.cgi?id=110708 Andre Klapper changed: What|Removed |Added Resolution|FIXED |INVALID Group||spam Product|DRI |Spam Version|DRI git |unspecified Component|DRM/other |Two --- Comment #1 from Andre Klapper --- Go away and test somewhere else. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110701] GPU faults in in Unigine Valley 1.0
https://bugs.freedesktop.org/show_bug.cgi?id=110701 --- Comment #15 from kyle.de...@mykolab.com --- Ah, also, recent LLVM master with RX580. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110701] GPU faults in in Unigine Valley 1.0
https://bugs.freedesktop.org/show_bug.cgi?id=110701 --- Comment #14 from kyle.de...@mykolab.com --- 78e35df52aa2f7d770f929a0866a0faa89c261a9 confirmed as the first bad commit for me. It was causing text corruption in Plasma Shell, and random visual corruption in Blender-git, KDE System Settings, VSCode. Immediate prior commit showed no issues at all. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/vkms: Avoid extra discount in the timestamp value
After the commit def35e7c5926 ("drm/vkms: Bugfix extra vblank frame") some of the crc tests (IGT) start to fail in the vkms with the following error: [drm:drm_crtc_add_crc_entry [drm]] *ERROR* Overflow of CRC buffer, userspace reads too slow. [drm] failed to queue vkms_crc_work_handle ... The commit def35e7c5926 ("drm/vkms: Bugfix extra vblank frame") added an operation for decrement the timestamp value returned by `get_vblank_timestamp()` which solved the problems related to kms_flip tests. However, each call to `get_vblank_timestamp()` reduces the timestamp even when it is not required. Such decrement generates a negative number in the following calculation within `drm_update_vblank_count()`: u64 diff_ns = ktime_to_ns(ktime_sub(t_vblank, vblank->time)); Next, the DIV_ROUND_CLOSEST_ULL macro is invoked using the diff_ns value, which generates an undefined result. Therefore, the returned frame is incorrect, which assign a huge number to the variable frame_end. In this case, causing the loop (`vkms_crc_work_handle()`) below to take a long time: frame_end = drm_crtc_accurate_vblank_count(crtc); while (frame_start <= frame_end) drm_crtc_add_crc_entry(crtc, true, frame_start++, ); This commit fixes this issue by adding a check that validates whether the current vblank timestamp is still the same, thus avoiding excessive timestamp decrement of the timestamp value. Signed-off-by: Rodrigo Siqueira Signed-off-by: Shayenne Moura --- drivers/gpu/drm/vkms/vkms_crtc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c index 7508815fac11..3ce60e66673e 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -74,9 +74,13 @@ bool vkms_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe, { struct vkms_device *vkmsdev = drm_device_to_vkms_device(dev); struct vkms_output *output = >output; + struct drm_vblank_crtc *vblank = >vblank[pipe]; *vblank_time = output->vblank_hrtimer.node.expires; + if (*vblank_time == vblank->time) + return true; + if (!in_vblank_irq) *vblank_time -= output->period_ns; -- 2.21.0 signature.asc Description: PGP signature
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #28 from Tom B --- as a complete amateur looking at the commit history, this looks like a possible culprit: https://github.com/torvalds/linux/commit/e9c5b46e3c50f58403aeca6d6419b9235d2518b2#diff-db8ff8bb932e2ba3f89c9402f6856661 It has a block specifically for Vega20 and deals with power states. Though the related tag is 5.2-rc1 it's from back in January so that seems unlikely. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110701] GPU faults in in Unigine Valley 1.0
https://bugs.freedesktop.org/show_bug.cgi?id=110701 --- Comment #13 from LoneVVolf --- https://bugs.freedesktop.org/show_bug.cgi?id=108824 appears to be related -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 108824] Invalid handling when GL buffer is bound on one context and invalidated on another
https://bugs.freedesktop.org/show_bug.cgi?id=108824 --- Comment #8 from LoneVVolf --- Baldur, I encounter similar visual corruption when running knetwalk. See comment #12 in https://bugs.freedesktop.org/show_bug.cgi?id=110701#c12 Maybe these 2 bugs are related ? -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110701] GPU faults in in Unigine Valley 1.0
https://bugs.freedesktop.org/show_bug.cgi?id=110701 --- Comment #12 from LoneVVolf --- I get a similar bug when running knetwalk[1] . As soon as the application gets focus, there's visual corruption in its window. If I move the mouse away the corruption (and messafes) are gone. Running mesa-git built an hour ago on a RX 580 . Will try to verify which of the the commits mentioned matter tomorrow. [1] https://kde.org/applications/games/knetwalk/ dmesg snippet [ 1642.706004] amdgpu :42:00.0: GPU fault detected: 146 0x0e08040c for process knetwalk pid 2647 thread knetwalk:cs0 pid 2656 [ 1642.706010] amdgpu :42:00.0: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00100BC1 [ 1642.706012] amdgpu :42:00.0: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x0E00400C [ 1642.706016] amdgpu :42:00.0: VM fault (0x0c, vmid 7, pasid 32772) at page 1051585, read from 'TC1' (0x54433100) (4) [ 1642.706074] amdgpu :42:00.0: GPU fault detected: 146 0x0c38440c for process knetwalk pid 2647 thread knetwalk:cs0 pid 2656 [ 1642.706078] amdgpu :42:00.0: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00100B87 [ 1642.706080] amdgpu :42:00.0: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x0E04400C [ 1642.706082] amdgpu :42:00.0: VM fault (0x0c, vmid 7, pasid 32772) at page 1051527, read from 'TC5' (0x54433500) (68) [ 1642.706087] amdgpu :42:00.0: GPU fault detected: 146 0x0c38480c for process knetwalk pid 2647 thread knetwalk:cs0 pid 2656 [ 1642.706089] amdgpu :42:00.0: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00100B9D [ 1642.706090] amdgpu :42:00.0: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x0E04400C [ 1642.706093] amdgpu :42:00.0: VM fault (0x0c, vmid 7, pasid 32772) at page 1051549, read from 'TC5' (0x54433500) (68) [ 1642.706098] amdgpu :42:00.0: GPU fault detected: 146 0x0c38c80c for process knetwalk pid 2647 thread knetwalk:cs0 pid 2656 [ 1642.706102] amdgpu :42:00.0: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00100BE2 [ 1642.706104] amdgpu :42:00.0: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x0E04400C [ 1642.706106] amdgpu :42:00.0: VM fault (0x0c, vmid 7, pasid 32772) at page 1051618, read from 'TC5' (0x54433500) (68) [ 1642.706111] amdgpu :42:00.0: GPU fault detected: 146 0x0c38c40c for process knetwalk pid 2647 thread knetwalk:cs0 pid 2656 [ 1642.706113] amdgpu :42:00.0: VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x00100BD0 [ 1642.706115] amdgpu :42:00.0: VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x0E0C800C -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #27 from Tom B --- Boost is definitely the problem. Idle 5.0.13: $ cat /sys/kernel/debug/dri/0/amdgpu_pm_info Clock Gating Flags Mask: 0x36974f Graphics Medium Grain Clock Gating: On Graphics Medium Grain memory Light Sleep: On Graphics Coarse Grain Clock Gating: On Graphics Coarse Grain memory Light Sleep: On Graphics Coarse Grain Tree Shader Clock Gating: Off Graphics Coarse Grain Tree Shader Light Sleep: Off Graphics Command Processor Light Sleep: On Graphics Run List Controller Light Sleep: Off Graphics 3D Coarse Grain Clock Gating: On Graphics 3D Coarse Grain memory Light Sleep: On Memory Controller Light Sleep: On Memory Controller Medium Grain Clock Gating: On System Direct Memory Access Light Sleep: On System Direct Memory Access Medium Grain Clock Gating: Off Bus Interface Medium Grain Clock Gating: Off Bus Interface Light Sleep: On Unified Video Decoder Medium Grain Clock Gating: Off Video Compression Engine Medium Grain Clock Gating: Off Host Data Path Light Sleep: On Host Data Path Medium Grain Clock Gating: Off Digital Right Management Medium Grain Clock Gating: Off Digital Right Management Light Sleep: On Rom Medium Grain Clock Gating: On Data Fabric Medium Grain Clock Gating: Off GFX Clocks and Power: 351 MHz (MCLK) 809 MHz (SCLK) 1373 MHz (PSTATE_SCLK) 1001 MHz (PSTATE_MCLK) 737 mV (VDDGFX) 23.0 W (average GPU) GPU Temperature: 31 C GPU Load: 0 % SMC Feature Mask: 0x19f0e3cf UVD: Disabled VCE: Disabled Load 5.0.13: Clock Gating Flags Mask: 0x36974f Graphics Medium Grain Clock Gating: On Graphics Medium Grain memory Light Sleep: On Graphics Coarse Grain Clock Gating: On Graphics Coarse Grain memory Light Sleep: On Graphics Coarse Grain Tree Shader Clock Gating: Off Graphics Coarse Grain Tree Shader Light Sleep: Off Graphics Command Processor Light Sleep: On Graphics Run List Controller Light Sleep: Off Graphics 3D Coarse Grain Clock Gating: On Graphics 3D Coarse Grain memory Light Sleep: On Memory Controller Light Sleep: On Memory Controller Medium Grain Clock Gating: On System Direct Memory Access Light Sleep: On System Direct Memory Access Medium Grain Clock Gating: Off Bus Interface Medium Grain Clock Gating: Off Bus Interface Light Sleep: On Unified Video Decoder Medium Grain Clock Gating: Off Video Compression Engine Medium Grain Clock Gating: Off Host Data Path Light Sleep: On Host Data Path Medium Grain Clock Gating: Off Digital Right Management Medium Grain Clock Gating: Off Digital Right Management Light Sleep: On Rom Medium Grain Clock Gating: On Data Fabric Medium Grain Clock Gating: Off GFX Clocks and Power: 1001 MHz (MCLK) 1802 MHz (SCLK) 1373 MHz (PSTATE_SCLK) 1001 MHz (PSTATE_MCLK) 1068 mV (VDDGFX) 191.0 W (average GPU) GPU Temperature: 63 C GPU Load: 0 % SMC Feature Mask: 0x19f0e3cf UVD: Disabled VCE: Disabled On 5.1, the same clocks, voltage and wattage are used, it never changes power states. On 5.0 it idles at 23w low clocks and boosts to 191w with 1802mhz. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #26 from Tom B --- Ok, running unigine-heaven and watching /sys/kernel/debug/dri/0/amdgpu_pm_info the wattage and voltage never change. It also never boosts to 1800mhz as it should and sticks at 1373. I should have mentioned in my last post that previously the card went down to about 23w when idle. I'm guessing the crash occurs when the GPU needs more than the 135w that it's getting. Chris Hodapp, did you come across any commits referencing power profiles as that looks to be the cause of the issue. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #25 from Tom B --- On 5.1.3 (and presumably all 5.1 kernels) I am seeing a strange power profile. Can everyone else run sensors (after sensors-detect if you don't have the amdgpu device showing) I'm seeing this: amdgpu-pci-4400 Adapter: PCI adapter vddgfx: +1.11 V fan1: 0 RPM (min =0 RPM, max = 3850 RPM) temp1:+33.0°C (crit = +118.0°C, hyst = -273.1°C) power1: 135.00 W (cap = 250.00 W) Even at idle my GPU is running at 1100mv (my default base voltage) and constantly running at 135w. My output of cat /sys/kernel/debug/dri/0/amdgpu_pm_info shows the same thing: Clock Gating Flags Mask: 0x36974f Graphics Medium Grain Clock Gating: On Graphics Medium Grain memory Light Sleep: On Graphics Coarse Grain Clock Gating: On Graphics Coarse Grain memory Light Sleep: On Graphics Coarse Grain Tree Shader Clock Gating: Off Graphics Coarse Grain Tree Shader Light Sleep: Off Graphics Command Processor Light Sleep: On Graphics Run List Controller Light Sleep: Off Graphics 3D Coarse Grain Clock Gating: On Graphics 3D Coarse Grain memory Light Sleep: On Memory Controller Light Sleep: On Memory Controller Medium Grain Clock Gating: On System Direct Memory Access Light Sleep: On System Direct Memory Access Medium Grain Clock Gating: Off Bus Interface Medium Grain Clock Gating: Off Bus Interface Light Sleep: On Unified Video Decoder Medium Grain Clock Gating: Off Video Compression Engine Medium Grain Clock Gating: Off Host Data Path Light Sleep: On Host Data Path Medium Grain Clock Gating: Off Digital Right Management Medium Grain Clock Gating: Off Digital Right Management Light Sleep: On Rom Medium Grain Clock Gating: On Data Fabric Medium Grain Clock Gating: Off GFX Clocks and Power: 351 MHz (MCLK) 0 MHz (SCLK) 1373 MHz (PSTATE_SCLK) 1001 MHz (PSTATE_MCLK) 1106 mV (VDDGFX) 135.0 W (average GPU) GPU Temperature: 33 C GPU Load: 0 % SMC Feature Mask: 0x00c0c002 UVD: Disabled VCE: Disabled It's locked at 135w and 1106mv. Are you guys seeing similar? Apologies for the multiple posts but I'll post in a second after running unigine to see if it tries to boost before it crashes. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #24 from Hameer Abbasi --- > I restarted thrice on 5.0.13, no issue. Scratch that... I get minor corruption even on 5.0.13 on accelerated video playback during high CPU usage (such as compilation). The videos freeze, glitch out, and sometimes there's graphical corruption. > I am running two 4k 60hz monitors without Freesync. The only common factor > there is that we are both running two displays. Both of mine are DisplayPort. Not the only thing... We're both doing similar amounts of pixels per second, in a sense, more or less. Mine are DisplayPort too, so that's also common for us. I'm on GNOME desktop and the entire GNOME suite. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #23 from Chris Hodapp --- I've been building kernels like a fiend the last couple days. Making matters more difficult is the fact that most of the intermediate commits produce kernels that get stuck waiting for devices to come up (something that went in the run-up to 5.1 disagrees with my machine but then got fixed for the actual 5.1 release). No conclusive results yet except that both 5.0 and 5.0.17 work (so I'm assuming the whole 5.0.X series works) but nothing in the 5.1 series has truly been stable for me. It's interesting that you both have two monitors. I am also trying to run two monitors over displayport. For what it's worth, I'm also using KDE with sddm, though if KDE or sddm is making the GPU reset then that is on the graphics driver, not the userspace programs that are trying to use it. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #22 from Tom B --- I was just able to run heaven again without issue by setting high performance mode. Can anyone get a crash after running # echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level > One additional piece of information: I have two 1440p 144 Hz Freesync > displays with audio... I'm not sure if anything about that is a contributing > factor. I am running two 4k 60hz monitors without Freesync. The only common factor there is that we are both running two displays. Both of mine are DisplayPort. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #21 from Tom B --- Ignore my last post, I just tried unigine-heaven again and it crashed instantly. I don't know why it worked once. It took me 5 hard resets to be able to log in. It seems like if it lasts long enough to log in then it's fine until the GPU is intermittently under load. As such, it's probably worth mentioning that I'm using SDDM and KDE. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #20 from Tom B --- Created attachment 144303 --> https://bugs.freedesktop.org/attachment.cgi?id=144303=edit 5.1.3 crash after resume Journal output from suspend to crash on resume -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #19 from Tom B --- I've just resumed from suspend (5.1.3). Had complete graphical corruption and a frozen system. I couldn't switch TTY and had to do a hard reset. First two reboots froze, third is working fine. Youtube was fine for my 30 second test, as is running unigine-heaven to try GPU load. I'll attach my journal from after suspend. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 2/2] drm/bridge: drop drmP.h usage
Hi Sam, Thank you for the patch. On Sun, May 19, 2019 at 08:36:36PM +0200, Sam Ravnborg wrote: > Drop use of the deprecated drmP.h header file. > > While touching the list of include files: > - Divide include files in blocks of linux/* drm/* etc. > - Sort individual blocks of include files > - Remove duplicated header file > > v2: > - Be consistent in the order of the include blocks (Laurent) > > Signed-off-by: Sam Ravnborg > Cc: Andrzej Hajda > Cc: Laurent Pinchart > Cc: David Airlie > Cc: Daniel Vetter > Cc: Peter Senna Tschudin > Cc: Martin Donnelly > Cc: Martyn Welch Reviewed-by: Laurent Pinchart By the way, on a side note, I came across a neat trick recently to help making headers self-contained. By including the header related to a C file as the very first header, the compiler will throw an error if the header is not self-contained. It would be a bit of an intrusive change in DRM, but maybe something to keep in mind. > --- > drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 8 +++--- > drivers/gpu/drm/bridge/analogix-anx78xx.c | 8 +++--- > .../drm/bridge/analogix/analogix_dp_core.c| 18 ++--- > drivers/gpu/drm/bridge/dumb-vga-dac.c | 2 +- > drivers/gpu/drm/bridge/lvds-encoder.c | 10 --- > .../bridge/megachips-stdp-ge-b850v3-fw.c | 3 ++- > drivers/gpu/drm/bridge/nxp-ptn3460.c | 3 ++- > drivers/gpu/drm/bridge/panel.c| 5 ++-- > drivers/gpu/drm/bridge/parade-ps8622.c| 3 ++- > drivers/gpu/drm/bridge/sii902x.c | 3 ++- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 27 ++- > drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 9 --- > drivers/gpu/drm/bridge/tc358764.c | 14 ++ > drivers/gpu/drm/bridge/thc63lvd1024.c | 10 --- > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 18 +++-- > drivers/gpu/drm/bridge/ti-tfp410.c| 4 +-- > 16 files changed, 81 insertions(+), 64 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > index ec2ca71e1323..6d5a40aa52aa 100644 > --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > @@ -6,21 +6,21 @@ > * Licensed under the GPL-2. > */ > > +#include > #include > #include > #include > #include > #include > -#include > > -#include > +#include > + > #include > #include > #include > +#include > #include > > -#include > - > #include "adv7511.h" > > /* ADI recommended values for proper operation. */ > diff --git a/drivers/gpu/drm/bridge/analogix-anx78xx.c > b/drivers/gpu/drm/bridge/analogix-anx78xx.c > index c09aaf93ae1b..479ce3642a79 100644 > --- a/drivers/gpu/drm/bridge/analogix-anx78xx.c > +++ b/drivers/gpu/drm/bridge/analogix-anx78xx.c > @@ -16,23 +16,23 @@ > */ > #include > #include > -#include > +#include > #include > +#include > #include > #include > #include > #include > #include > #include > -#include > -#include > #include > +#include > > -#include > #include > #include > #include > #include > +#include > #include > > #include "analogix-anx78xx.h" > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > index 225f5e5dd69b..53b1393c3dd2 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > @@ -10,27 +10,27 @@ > * option) any later version. > */ > > -#include > -#include > -#include > #include > +#include > +#include > +#include > +#include > #include > #include > -#include > +#include > #include > #include > -#include > -#include > #include > +#include > > -#include > +#include > #include > #include > +#include > #include > +#include > #include > > -#include > - > #include "analogix_dp_core.h" > #include "analogix_dp_reg.h" > > diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c > b/drivers/gpu/drm/bridge/dumb-vga-dac.c > index e64736c39a9f..1a3800a58aaf 100644 > --- a/drivers/gpu/drm/bridge/dumb-vga-dac.c > +++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c > @@ -15,9 +15,9 @@ > #include > #include > > -#include > #include > #include > +#include > #include > > struct dumb_vga { > diff --git a/drivers/gpu/drm/bridge/lvds-encoder.c > b/drivers/gpu/drm/bridge/lvds-encoder.c > index ae8fc597eb38..6eaaa76970b1 100644 > --- a/drivers/gpu/drm/bridge/lvds-encoder.c > +++ b/drivers/gpu/drm/bridge/lvds-encoder.c > @@ -7,12 +7,14 @@ > * the License, or (at your option) any later version. > */ > > -#include > -#include > -#include > - > #include > +#include > +#include > #include > +#include > + > +#include > +#include > > struct lvds_encoder { > struct drm_bridge bridge; > diff --git a/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c >
Re: [PATCH v2 1/2] drm/bridge: make dw_mipi_dsi.h self-contained
Hi Sam, Thank you for the patch. On Sun, May 19, 2019 at 08:36:35PM +0200, Sam Ravnborg wrote: > To allow users to include dw_mipi_dsi.h without pulling in dependencies > make dw_mipi_dsi.h self-contained. > Use forward declarations when possible. > > Signed-off-by: Sam Ravnborg > Cc: Andrzej Hajda > Cc: Laurent Pinchart > Cc: David Airlie > Cc: Daniel Vetter > Cc: Peter Senna Tschudin > Cc: Martin Donnelly > Cc: Martyn Welch > --- > include/drm/bridge/dw_mipi_dsi.h | 8 > 1 file changed, 8 insertions(+) > > diff --git a/include/drm/bridge/dw_mipi_dsi.h > b/include/drm/bridge/dw_mipi_dsi.h > index 7d3dd69a5caa..825c222afbfc 100644 > --- a/include/drm/bridge/dw_mipi_dsi.h > +++ b/include/drm/bridge/dw_mipi_dsi.h > @@ -9,8 +9,16 @@ > > #ifndef __DW_MIPI_DSI__ > #define __DW_MIPI_DSI__ > +#include > > +struct drm_display_mode; > +struct drm_encoder; > struct dw_mipi_dsi; > +struct dw_mipi_dsi_host_ops; > +struct dw_mipi_dsi_phy_ops; > +struct dw_mipi_dsi_plat_data; No need to forward-declare these three structures, they're defined in this very .h file. > +struct mipi_dsi_device; > +struct platform_device; You need to pull in drm/modes.h for drm_mode_status. Apart from that, Reviewed-by: Laurent Pinchart > > struct dw_mipi_dsi_phy_ops { > int (*init)(void *priv_data); -- Regards, Laurent Pinchart ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #18 from Hameer Abbasi --- Hmm, I'm fairly certain at this point that the issue happened between 5.0.13 and 5.1.0. Those are the ones available in the Arch repos, I lack the knowledge to build the kernel myself. I restarted thrice on 5.0.13, no issue. Restarted once on 5.1.0, there was an issue. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #17 from Hameer Abbasi --- Hmm. 5.1.3 had issues for me too, on login and when launching Evolution (the GNOME mail client). Seems the success was intermittent. One additional piece of information: I have two 1440p 144 Hz Freesync displays with audio... I'm not sure if anything about that is a contributing factor. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2 5/5] drm/gma500: drop drmp.h include from all .c files
Drop remaining uses of the deprecated drmP.h in gma500 Replaced drmp.h with forward declarations or include files as relevant. Moved all include files to blocks in following order: \#include \#include \#include \#include "" And within each block sort the include files alphabetically. Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/gma500/accel_2d.c | 18 +- drivers/gpu/drm/gma500/cdv_device.c | 11 --- drivers/gpu/drm/gma500/cdv_intel_crt.c| 8 ++--- drivers/gpu/drm/gma500/cdv_intel_display.c| 10 +++--- drivers/gpu/drm/gma500/cdv_intel_dp.c | 9 ++--- drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 9 ++--- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 9 +++-- drivers/gpu/drm/gma500/framebuffer.c | 24 +++--- drivers/gpu/drm/gma500/gem.c | 3 +- drivers/gpu/drm/gma500/gma_device.c | 1 - drivers/gpu/drm/gma500/gma_display.c | 12 +-- drivers/gpu/drm/gma500/gtt.c | 5 +-- drivers/gpu/drm/gma500/intel_bios.c | 3 +- drivers/gpu/drm/gma500/intel_gmbus.c | 9 ++--- drivers/gpu/drm/gma500/intel_i2c.c| 1 + drivers/gpu/drm/gma500/mdfld_device.c | 10 +++--- drivers/gpu/drm/gma500/mdfld_dsi_dpi.c| 2 +- drivers/gpu/drm/gma500/mdfld_dsi_output.c | 7 ++-- drivers/gpu/drm/gma500/mdfld_dsi_output.h | 6 ++-- drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 2 +- drivers/gpu/drm/gma500/mdfld_intel_display.c | 11 --- drivers/gpu/drm/gma500/mid_bios.c | 3 +- drivers/gpu/drm/gma500/mmu.c | 6 ++-- drivers/gpu/drm/gma500/oaktrail_crtc.c| 8 +++-- drivers/gpu/drm/gma500/oaktrail_device.c | 16 + drivers/gpu/drm/gma500/oaktrail_hdmi.c| 6 ++-- drivers/gpu/drm/gma500/oaktrail_lvds.c| 6 ++-- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c| 11 +++ drivers/gpu/drm/gma500/psb_device.c | 10 +++--- drivers/gpu/drm/gma500/psb_drv.c | 33 --- drivers/gpu/drm/gma500/psb_drv.h | 12 +++ drivers/gpu/drm/gma500/psb_intel_display.c| 7 ++-- drivers/gpu/drm/gma500/psb_intel_lvds.c | 5 ++- drivers/gpu/drm/gma500/psb_intel_modes.c | 2 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 13 drivers/gpu/drm/gma500/psb_irq.c | 9 ++--- drivers/gpu/drm/gma500/psb_lid.c | 6 ++-- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c| 5 +-- 38 files changed, 181 insertions(+), 147 deletions(-) diff --git a/drivers/gpu/drm/gma500/accel_2d.c b/drivers/gpu/drm/gma500/accel_2d.c index 204c8e452eb7..6536ed5552fa 100644 --- a/drivers/gpu/drm/gma500/accel_2d.c +++ b/drivers/gpu/drm/gma500/accel_2d.c @@ -20,24 +20,24 @@ * **/ -#include -#include +#include +#include #include -#include +#include +#include #include -#include +#include #include -#include -#include -#include +#include +#include -#include #include #include +#include +#include "framebuffer.h" #include "psb_drv.h" #include "psb_reg.h" -#include "framebuffer.h" /** * psb_spank - reset the 2D engine diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c index 6ba605ac7123..31b931941c2b 100644 --- a/drivers/gpu/drm/gma500/cdv_device.c +++ b/drivers/gpu/drm/gma500/cdv_device.c @@ -18,15 +18,16 @@ **/ #include -#include +#include + #include -#include "psb_drv.h" -#include "psb_reg.h" -#include "psb_intel_reg.h" -#include "intel_bios.h" #include "cdv_device.h" #include "gma_device.h" +#include "intel_bios.h" +#include "psb_drv.h" +#include "psb_intel_reg.h" +#include "psb_reg.h" #define VGA_SR_INDEX 0x3c4 #define VGA_SR_DATA0x3c5 diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c index cb5a14b7ec7f..29c36d63b20e 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_crt.c +++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c @@ -24,16 +24,16 @@ * Eric Anholt */ +#include #include -#include +#include +#include "cdv_device.h" #include "intel_bios.h" +#include "power.h" #include "psb_drv.h" #include "psb_intel_drv.h" #include "psb_intel_reg.h" -#include "power.h" -#include "cdv_device.h" -#include static void cdv_intel_crt_dpms(struct drm_encoder *encoder, int mode) diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c index 17db4b4749d5..9be7c375b55c 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_display.c +++ b/drivers/gpu/drm/gma500/cdv_intel_display.c @@ -18,16 +18,18 @@ * Eric Anholt */ +#include #include -#include +#include + +#include
[PATCH v2 3/5] drm/gma500: make local header files more self-contained
Add proper forward declarations to minimize dependencies on other header files. Just add enough that we can safely include all header files in alphabetically order in relevant files. Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/gma500/blitter.h | 2 ++ drivers/gpu/drm/gma500/cdv_device.h | 4 drivers/gpu/drm/gma500/gma_device.h | 1 + drivers/gpu/drm/gma500/gma_display.h | 3 +++ drivers/gpu/drm/gma500/mid_bios.h| 1 + drivers/gpu/drm/gma500/oaktrail.h| 2 ++ 6 files changed, 13 insertions(+) diff --git a/drivers/gpu/drm/gma500/blitter.h b/drivers/gpu/drm/gma500/blitter.h index b83648df590d..69551a2fc0f4 100644 --- a/drivers/gpu/drm/gma500/blitter.h +++ b/drivers/gpu/drm/gma500/blitter.h @@ -17,6 +17,8 @@ #ifndef __BLITTER_H #define __BLITTER_H +struct drm_psb_private; + extern int gma_blt_wait_idle(struct drm_psb_private *dev_priv); #endif diff --git a/drivers/gpu/drm/gma500/cdv_device.h b/drivers/gpu/drm/gma500/cdv_device.h index 705c11d47d45..19e544ba21cb 100644 --- a/drivers/gpu/drm/gma500/cdv_device.h +++ b/drivers/gpu/drm/gma500/cdv_device.h @@ -15,6 +15,10 @@ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. */ +struct drm_crtc; +struct drm_device; +struct psb_intel_mode_device; + extern const struct drm_crtc_helper_funcs cdv_intel_helper_funcs; extern const struct drm_crtc_funcs cdv_intel_crtc_funcs; extern const struct gma_clock_funcs cdv_clock_funcs; diff --git a/drivers/gpu/drm/gma500/gma_device.h b/drivers/gpu/drm/gma500/gma_device.h index e1dbb007b820..9f0bb916562f 100644 --- a/drivers/gpu/drm/gma500/gma_device.h +++ b/drivers/gpu/drm/gma500/gma_device.h @@ -15,6 +15,7 @@ #ifndef _GMA_DEVICE_H #define _GMA_DEVICE_H +struct drm_device; extern void gma_get_core_freq(struct drm_device *dev); diff --git a/drivers/gpu/drm/gma500/gma_display.h b/drivers/gpu/drm/gma500/gma_display.h index 239c374b6169..e970cb869ea7 100644 --- a/drivers/gpu/drm/gma500/gma_display.h +++ b/drivers/gpu/drm/gma500/gma_display.h @@ -24,6 +24,9 @@ #include +struct drm_encoder; +struct drm_mode_set; + struct gma_clock_t { /* given values */ int n; diff --git a/drivers/gpu/drm/gma500/mid_bios.h b/drivers/gpu/drm/gma500/mid_bios.h index 00e7d564b7eb..59e43a68a21d 100644 --- a/drivers/gpu/drm/gma500/mid_bios.h +++ b/drivers/gpu/drm/gma500/mid_bios.h @@ -16,6 +16,7 @@ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * **/ +struct drm_device; extern int mid_chip_setup(struct drm_device *dev); diff --git a/drivers/gpu/drm/gma500/oaktrail.h b/drivers/gpu/drm/gma500/oaktrail.h index 30adbbe23024..e41bcab5a585 100644 --- a/drivers/gpu/drm/gma500/oaktrail.h +++ b/drivers/gpu/drm/gma500/oaktrail.h @@ -17,6 +17,8 @@ * **/ +struct psb_intel_mode_device; + /* MID device specific descriptors */ struct oaktrail_timing_info { -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2 1/5] drm/gma500: remove empty gma_drm.h header file
The header file gma_drm.h is empty so remove it and drop all uses of the file. Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/gma500/cdv_device.c | 2 +- drivers/gpu/drm/gma500/gem.c | 2 +- drivers/gpu/drm/gma500/intel_bios.c | 2 +- drivers/gpu/drm/gma500/intel_gmbus.c | 2 +- drivers/gpu/drm/gma500/mid_bios.c| 2 +- drivers/gpu/drm/gma500/oaktrail_device.c | 2 +- drivers/gpu/drm/gma500/psb_device.c | 2 +- drivers/gpu/drm/gma500/psb_drv.h | 2 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 2 +- include/drm/gma_drm.h| 25 10 files changed, 9 insertions(+), 34 deletions(-) delete mode 100644 include/drm/gma_drm.h diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c index 34b85767e4da..6ba605ac7123 100644 --- a/drivers/gpu/drm/gma500/cdv_device.c +++ b/drivers/gpu/drm/gma500/cdv_device.c @@ -20,7 +20,7 @@ #include #include #include -#include + #include "psb_drv.h" #include "psb_reg.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c index 576f1b272f23..cfc5b559c77b 100644 --- a/drivers/gpu/drm/gma500/gem.c +++ b/drivers/gpu/drm/gma500/gem.c @@ -25,8 +25,8 @@ #include #include -#include #include + #include "psb_drv.h" void psb_gem_free_object(struct drm_gem_object *obj) diff --git a/drivers/gpu/drm/gma500/intel_bios.c b/drivers/gpu/drm/gma500/intel_bios.c index 63bde4e86c6a..45c17c6f58f8 100644 --- a/drivers/gpu/drm/gma500/intel_bios.c +++ b/drivers/gpu/drm/gma500/intel_bios.c @@ -20,7 +20,7 @@ */ #include #include -#include + #include "psb_drv.h" #include "psb_intel_drv.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c index e7e22187c539..b1bf314ab150 100644 --- a/drivers/gpu/drm/gma500/intel_gmbus.c +++ b/drivers/gpu/drm/gma500/intel_gmbus.c @@ -30,8 +30,8 @@ #include #include #include + #include "psb_intel_drv.h" -#include #include "psb_drv.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/mid_bios.c b/drivers/gpu/drm/gma500/mid_bios.c index 237041a37532..e00778b002ec 100644 --- a/drivers/gpu/drm/gma500/mid_bios.c +++ b/drivers/gpu/drm/gma500/mid_bios.c @@ -25,7 +25,7 @@ #include #include -#include + #include "psb_drv.h" #include "mid_bios.h" diff --git a/drivers/gpu/drm/gma500/oaktrail_device.c b/drivers/gpu/drm/gma500/oaktrail_device.c index ba30b43a3412..f0872e2c22d5 100644 --- a/drivers/gpu/drm/gma500/oaktrail_device.c +++ b/drivers/gpu/drm/gma500/oaktrail_device.c @@ -22,7 +22,7 @@ #include #include #include -#include + #include "psb_drv.h" #include "psb_reg.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/psb_device.c b/drivers/gpu/drm/gma500/psb_device.c index dc0f8527570c..9fd418985d70 100644 --- a/drivers/gpu/drm/gma500/psb_device.c +++ b/drivers/gpu/drm/gma500/psb_device.c @@ -20,7 +20,7 @@ #include #include #include -#include + #include "psb_drv.h" #include "psb_reg.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h index 941b238bdcc9..fbccf2abdad7 100644 --- a/drivers/gpu/drm/gma500/psb_drv.h +++ b/drivers/gpu/drm/gma500/psb_drv.h @@ -24,7 +24,7 @@ #include #include -#include + #include "psb_reg.h" #include "psb_intel_drv.h" #include "gma_display.h" diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c index dd3cec0e3190..5090ef5f348d 100644 --- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c +++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c @@ -32,8 +32,8 @@ #include #include #include + #include "psb_intel_drv.h" -#include #include "psb_drv.h" #include "psb_intel_sdvo_regs.h" #include "psb_intel_reg.h" diff --git a/include/drm/gma_drm.h b/include/drm/gma_drm.h deleted file mode 100644 index 87ac5e6ca551.. --- a/include/drm/gma_drm.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) 2007-2011, Intel Corporation. - * All Rights Reserved. - * Copyright (c) 2008, Tungsten Graphics Inc. Cedar Park, TX., USA. - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St - Fifth Floor,
[PATCH v2 0/5] drm/gma500: drop use of drmP.h
The following patchset remove use of the deprecated drmP.h header file in the gma500 driver. As preparation an empty header file is removed and a dependency on drm_os_linux.h is dropped. The local header files are made more self-contained to allow them to be included in alphabetical order in the files where they are used. When removing drmP.h the include files are divided up in blocks: \#include \#include \#include \#include "" Within each block the include files are sorted alphabetically Build tested with allmodconfig and allyesconfig for x86, arm, alpha and more. Patchset made on top of drm-misc-next v2: - Be consitent in dividing includes files into blocks - Sort all include files, not only the blocks touched - Made local header files more self-contained To allow them to be included in alphabetically order Sam Sam Ravnborg (5): drm/gma500: remove empty gma_drm.h header file drm/gma500: drop drmP.h from header files drm/gma500: make local header files more self-contained drm/gma500: drop use of DRM_UDELAY wrapper drm/gma500: drop drmp.h include from all .c files drivers/gpu/drm/gma500/accel_2d.c | 18 +++ drivers/gpu/drm/gma500/blitter.h | 2 ++ drivers/gpu/drm/gma500/cdv_device.c | 13 ++- drivers/gpu/drm/gma500/cdv_device.h | 4 drivers/gpu/drm/gma500/cdv_intel_crt.c| 8 +++ drivers/gpu/drm/gma500/cdv_intel_display.c| 10 drivers/gpu/drm/gma500/cdv_intel_dp.c | 9 drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 9 drivers/gpu/drm/gma500/cdv_intel_lvds.c | 9 drivers/gpu/drm/gma500/framebuffer.c | 24 +-- drivers/gpu/drm/gma500/framebuffer.h | 1 - drivers/gpu/drm/gma500/gem.c | 5 ++-- drivers/gpu/drm/gma500/gma_device.c | 1 - drivers/gpu/drm/gma500/gma_device.h | 1 + drivers/gpu/drm/gma500/gma_display.c | 12 +++--- drivers/gpu/drm/gma500/gma_display.h | 3 +++ drivers/gpu/drm/gma500/gtt.c | 5 ++-- drivers/gpu/drm/gma500/gtt.h | 1 - drivers/gpu/drm/gma500/intel_bios.c | 6 ++--- drivers/gpu/drm/gma500/intel_bios.h | 3 +-- drivers/gpu/drm/gma500/intel_gmbus.c | 11 + drivers/gpu/drm/gma500/intel_i2c.c| 4 +++- drivers/gpu/drm/gma500/mdfld_device.c | 16 +++-- drivers/gpu/drm/gma500/mdfld_dsi_dpi.c| 4 +++- drivers/gpu/drm/gma500/mdfld_dsi_output.c | 12 ++ drivers/gpu/drm/gma500/mdfld_dsi_output.h | 8 +++ drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 4 +++- drivers/gpu/drm/gma500/mdfld_intel_display.c | 11 + drivers/gpu/drm/gma500/mdfld_tmd_vid.c| 2 ++ drivers/gpu/drm/gma500/mid_bios.c | 5 ++-- drivers/gpu/drm/gma500/mid_bios.h | 1 + drivers/gpu/drm/gma500/mmu.c | 6 +++-- drivers/gpu/drm/gma500/oaktrail.h | 2 ++ drivers/gpu/drm/gma500/oaktrail_crtc.c| 8 --- drivers/gpu/drm/gma500/oaktrail_device.c | 20 drivers/gpu/drm/gma500/oaktrail_hdmi.c| 8 --- drivers/gpu/drm/gma500/oaktrail_lvds.c| 6 ++--- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c| 11 - drivers/gpu/drm/gma500/power.h| 4 +++- drivers/gpu/drm/gma500/psb_device.c | 12 +- drivers/gpu/drm/gma500/psb_drv.c | 33 +-- drivers/gpu/drm/gma500/psb_drv.h | 16 ++--- drivers/gpu/drm/gma500/psb_intel_display.c| 7 +++--- drivers/gpu/drm/gma500/psb_intel_lvds.c | 5 ++-- drivers/gpu/drm/gma500/psb_intel_modes.c | 2 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 15 ++-- drivers/gpu/drm/gma500/psb_irq.c | 9 drivers/gpu/drm/gma500/psb_irq.h | 2 +- drivers/gpu/drm/gma500/psb_lid.c | 6 ++--- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c| 13 +++ include/drm/gma_drm.h | 25 51 files changed, 233 insertions(+), 199 deletions(-) ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2 2/5] drm/gma500: drop drmP.h from header files
Drop use of drmp.h from all header files in drm/gma500. Fix fallout in all files. In some cases moved include lines and sorted them too. With drmP.h removed from all header files it can now be removed from each .c file without any further dependencies Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/gma500/framebuffer.h | 1 - drivers/gpu/drm/gma500/gtt.h | 1 - drivers/gpu/drm/gma500/intel_bios.c | 1 + drivers/gpu/drm/gma500/intel_bios.h | 3 +-- drivers/gpu/drm/gma500/intel_i2c.c| 3 ++- drivers/gpu/drm/gma500/mdfld_device.c | 2 ++ drivers/gpu/drm/gma500/mdfld_dsi_dpi.c| 2 ++ drivers/gpu/drm/gma500/mdfld_dsi_output.c | 5 +++-- drivers/gpu/drm/gma500/mdfld_dsi_output.h | 2 +- drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 2 ++ drivers/gpu/drm/gma500/mdfld_tmd_vid.c| 2 ++ drivers/gpu/drm/gma500/power.h| 4 +++- drivers/gpu/drm/gma500/psb_drv.h | 2 +- drivers/gpu/drm/gma500/psb_irq.h | 2 +- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c| 8 +--- 15 files changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/gma500/framebuffer.h b/drivers/gpu/drm/gma500/framebuffer.h index e8e6357f033b..b54477aec95f 100644 --- a/drivers/gpu/drm/gma500/framebuffer.h +++ b/drivers/gpu/drm/gma500/framebuffer.h @@ -22,7 +22,6 @@ #ifndef _FRAMEBUFFER_H_ #define _FRAMEBUFFER_H_ -#include #include #include "psb_drv.h" diff --git a/drivers/gpu/drm/gma500/gtt.h b/drivers/gpu/drm/gma500/gtt.h index cb0c3a2a1fd4..c9449aabc58f 100644 --- a/drivers/gpu/drm/gma500/gtt.h +++ b/drivers/gpu/drm/gma500/gtt.h @@ -20,7 +20,6 @@ #ifndef _PSB_GTT_H_ #define _PSB_GTT_H_ -#include #include /* This wants cleaning up with respect to the psb_dev and un-needed stuff */ diff --git a/drivers/gpu/drm/gma500/intel_bios.c b/drivers/gpu/drm/gma500/intel_bios.c index 45c17c6f58f8..9c67d08a55ea 100644 --- a/drivers/gpu/drm/gma500/intel_bios.c +++ b/drivers/gpu/drm/gma500/intel_bios.c @@ -20,6 +20,7 @@ */ #include #include +#include #include "psb_drv.h" #include "psb_intel_drv.h" diff --git a/drivers/gpu/drm/gma500/intel_bios.h b/drivers/gpu/drm/gma500/intel_bios.h index e0ccf1d19a4d..bb3b813d1e68 100644 --- a/drivers/gpu/drm/gma500/intel_bios.h +++ b/drivers/gpu/drm/gma500/intel_bios.h @@ -22,8 +22,7 @@ #ifndef _INTEL_BIOS_H_ #define _INTEL_BIOS_H_ -#include -#include +struct drm_device; struct vbt_header { u8 signature[20]; /**< Always starts with 'VBT$' */ diff --git a/drivers/gpu/drm/gma500/intel_i2c.c b/drivers/gpu/drm/gma500/intel_i2c.c index 98a28c209555..147b556deeb0 100644 --- a/drivers/gpu/drm/gma500/intel_i2c.c +++ b/drivers/gpu/drm/gma500/intel_i2c.c @@ -17,9 +17,10 @@ * Authors: * Eric Anholt */ +#include #include -#include #include +#include #include "psb_drv.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/mdfld_device.c b/drivers/gpu/drm/gma500/mdfld_device.c index e2ab858122f9..585ec2e46166 100644 --- a/drivers/gpu/drm/gma500/mdfld_device.c +++ b/drivers/gpu/drm/gma500/mdfld_device.c @@ -17,6 +17,8 @@ * **/ +#include + #include "psb_drv.h" #include "mid_bios.h" #include "mdfld_output.h" diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c index d0bf5a1e94e8..832bae24fd72 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c +++ b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c @@ -25,6 +25,8 @@ * Jackie Li */ +#include + #include "mdfld_dsi_dpi.h" #include "mdfld_output.h" #include "mdfld_dsi_pkg_sender.h" diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c index fe020926ea4f..9ca982e77fa5 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c @@ -25,14 +25,15 @@ * Jackie Li */ -#include +#include +#include +#include #include "mdfld_dsi_output.h" #include "mdfld_dsi_dpi.h" #include "mdfld_output.h" #include "mdfld_dsi_pkg_sender.h" #include "tc35876x-dsi-lvds.h" -#include #include /* get the LABC from command line. */ diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.h b/drivers/gpu/drm/gma500/mdfld_dsi_output.h index 5b646c1f0c3e..68d14451e303 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.h +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.h @@ -29,7 +29,7 @@ #define __MDFLD_DSI_OUTPUT_H__ #include -#include + #include #include #include diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c b/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c index c50534c923df..003e96a20139 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c +++ b/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c @@ -24,7 +24,9 @@ * Jackie Li */ +#include #include + #include
[PATCH v2 4/5] drm/gma500: drop use of DRM_UDELAY wrapper
The DRM_UDELAY wrapper from drm_os_linux.h is used in a few places, all other places calls udelay() with no wrapper. There is no reason to continue to use this wrapper - so drop it and direct call udelay(). Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/gma500/mdfld_device.c| 4 ++-- drivers/gpu/drm/gma500/oaktrail_device.c | 2 +- drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/gma500/mdfld_device.c b/drivers/gpu/drm/gma500/mdfld_device.c index 585ec2e46166..edb9b1bbd6c6 100644 --- a/drivers/gpu/drm/gma500/mdfld_device.c +++ b/drivers/gpu/drm/gma500/mdfld_device.c @@ -344,7 +344,7 @@ static int mdfld_restore_display_registers(struct drm_device *dev, int pipenum) if (pipenum == 1) { /* restore palette (gamma) */ - /*DRM_UDELAY(5); */ + /* udelay(5); */ for (i = 0; i < 256; i++) PSB_WVDC32(pipe->palette[i], map->palette + (i << 2)); @@ -406,7 +406,7 @@ static int mdfld_restore_display_registers(struct drm_device *dev, int pipenum) PSB_WVDC32(pipe->conf, map->conf); /* restore palette (gamma) */ - /*DRM_UDELAY(5); */ + /* udelay(5); */ for (i = 0; i < 256; i++) PSB_WVDC32(pipe->palette[i], map->palette + (i << 2)); diff --git a/drivers/gpu/drm/gma500/oaktrail_device.c b/drivers/gpu/drm/gma500/oaktrail_device.c index f0872e2c22d5..2d8afbb51a77 100644 --- a/drivers/gpu/drm/gma500/oaktrail_device.c +++ b/drivers/gpu/drm/gma500/oaktrail_device.c @@ -327,7 +327,7 @@ static int oaktrail_restore_display_registers(struct drm_device *dev) /* Actually enable it */ PSB_WVDC32(p->dpll, MRST_DPLL_A); - DRM_UDELAY(150); + udelay(150); /* Restore mode */ PSB_WVDC32(p->htotal, HTOTAL_A); diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c index c6d72de1c054..797329028439 100644 --- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c +++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c @@ -815,7 +815,7 @@ void oaktrail_hdmi_restore(struct drm_device *dev) PSB_WVDC32(hdmi_dev->saveDPLL_ADJUST, DPLL_ADJUST); PSB_WVDC32(hdmi_dev->saveDPLL_UPDATE, DPLL_UPDATE); PSB_WVDC32(hdmi_dev->saveDPLL_CLK_ENABLE, DPLL_CLK_ENABLE); - DRM_UDELAY(150); + udelay(150); /* pipe */ PSB_WVDC32(pipeb->src, PIPEBSRC); -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [v3 6/7] drm/mediatek: change the dsi phytiming calculate method
Hi Jitao, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.1 next-20190517] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jitao-Shi/Support-dsi-for-mt8183/20190519-231001 config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=arm If you fix the issue, kindly add following tag Reported-by: kbuild test robot All errors (new ones prefixed by >>): >> ERROR: "__aeabi_uldivmod" [drivers/gpu/drm/mediatek/mediatek-drm.ko] >> undefined! --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 105530] Stuttering on Raven Ridge when TearFree is on
https://bugs.freedesktop.org/show_bug.cgi?id=105530 --- Comment #20 from Haxk20 --- Same issue on VEGA8 and RX560X PRIME configuration. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2 2/2] drm/bridge: drop drmP.h usage
Drop use of the deprecated drmP.h header file. While touching the list of include files: - Divide include files in blocks of linux/* drm/* etc. - Sort individual blocks of include files - Remove duplicated header file v2: - Be consistent in the order of the include blocks (Laurent) Signed-off-by: Sam Ravnborg Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: David Airlie Cc: Daniel Vetter Cc: Peter Senna Tschudin Cc: Martin Donnelly Cc: Martyn Welch --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 8 +++--- drivers/gpu/drm/bridge/analogix-anx78xx.c | 8 +++--- .../drm/bridge/analogix/analogix_dp_core.c| 18 ++--- drivers/gpu/drm/bridge/dumb-vga-dac.c | 2 +- drivers/gpu/drm/bridge/lvds-encoder.c | 10 --- .../bridge/megachips-stdp-ge-b850v3-fw.c | 3 ++- drivers/gpu/drm/bridge/nxp-ptn3460.c | 3 ++- drivers/gpu/drm/bridge/panel.c| 5 ++-- drivers/gpu/drm/bridge/parade-ps8622.c| 3 ++- drivers/gpu/drm/bridge/sii902x.c | 3 ++- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 27 ++- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 9 --- drivers/gpu/drm/bridge/tc358764.c | 14 ++ drivers/gpu/drm/bridge/thc63lvd1024.c | 10 --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 18 +++-- drivers/gpu/drm/bridge/ti-tfp410.c| 4 +-- 16 files changed, 81 insertions(+), 64 deletions(-) diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index ec2ca71e1323..6d5a40aa52aa 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -6,21 +6,21 @@ * Licensed under the GPL-2. */ +#include #include #include #include #include #include -#include -#include +#include + #include #include #include +#include #include -#include - #include "adv7511.h" /* ADI recommended values for proper operation. */ diff --git a/drivers/gpu/drm/bridge/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix-anx78xx.c index c09aaf93ae1b..479ce3642a79 100644 --- a/drivers/gpu/drm/bridge/analogix-anx78xx.c +++ b/drivers/gpu/drm/bridge/analogix-anx78xx.c @@ -16,23 +16,23 @@ */ #include #include -#include +#include #include +#include #include #include #include #include #include #include -#include -#include #include +#include -#include #include #include #include #include +#include #include #include "analogix-anx78xx.h" diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 225f5e5dd69b..53b1393c3dd2 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -10,27 +10,27 @@ * option) any later version. */ -#include -#include -#include #include +#include +#include +#include +#include #include #include -#include +#include #include #include -#include -#include #include +#include -#include +#include #include #include +#include #include +#include #include -#include - #include "analogix_dp_core.h" #include "analogix_dp_reg.h" diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/bridge/dumb-vga-dac.c index e64736c39a9f..1a3800a58aaf 100644 --- a/drivers/gpu/drm/bridge/dumb-vga-dac.c +++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c @@ -15,9 +15,9 @@ #include #include -#include #include #include +#include #include struct dumb_vga { diff --git a/drivers/gpu/drm/bridge/lvds-encoder.c b/drivers/gpu/drm/bridge/lvds-encoder.c index ae8fc597eb38..6eaaa76970b1 100644 --- a/drivers/gpu/drm/bridge/lvds-encoder.c +++ b/drivers/gpu/drm/bridge/lvds-encoder.c @@ -7,12 +7,14 @@ * the License, or (at your option) any later version. */ -#include -#include -#include - #include +#include +#include #include +#include + +#include +#include struct lvds_encoder { struct drm_bridge bridge; diff --git a/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c b/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c index a01028ec4de6..1644d281558a 100644 --- a/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c +++ b/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c @@ -34,11 +34,12 @@ #include #include #include + #include #include #include +#include #include -#include #define EDID_EXT_BLOCK_CNT 0x7E diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c b/drivers/gpu/drm/bridge/nxp-ptn3460.c index fb335afea4cf..3f4d4aef19e1 100644 --- a/drivers/gpu/drm/bridge/nxp-ptn3460.c +++ b/drivers/gpu/drm/bridge/nxp-ptn3460.c @@ -20,13 +20,14 @@ #include #include #include + #include #include #include #include #include +#include #include -#include #define PTN3460_EDID_ADDR 0x0 #define PTN3460_EDID_EMULATION_ADDR
[PATCH v2 1/2] drm/bridge: make dw_mipi_dsi.h self-contained
To allow users to include dw_mipi_dsi.h without pulling in dependencies make dw_mipi_dsi.h self-contained. Use forward declarations when possible. Signed-off-by: Sam Ravnborg Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: David Airlie Cc: Daniel Vetter Cc: Peter Senna Tschudin Cc: Martin Donnelly Cc: Martyn Welch --- include/drm/bridge/dw_mipi_dsi.h | 8 1 file changed, 8 insertions(+) diff --git a/include/drm/bridge/dw_mipi_dsi.h b/include/drm/bridge/dw_mipi_dsi.h index 7d3dd69a5caa..825c222afbfc 100644 --- a/include/drm/bridge/dw_mipi_dsi.h +++ b/include/drm/bridge/dw_mipi_dsi.h @@ -9,8 +9,16 @@ #ifndef __DW_MIPI_DSI__ #define __DW_MIPI_DSI__ +#include +struct drm_display_mode; +struct drm_encoder; struct dw_mipi_dsi; +struct dw_mipi_dsi_host_ops; +struct dw_mipi_dsi_phy_ops; +struct dw_mipi_dsi_plat_data; +struct mipi_dsi_device; +struct platform_device; struct dw_mipi_dsi_phy_ops { int (*init)(void *priv_data); -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2 0/2] drm/bridge: drop drmP.h usage
To avoid that people start to pick up bad habits get rid of the deprecated drmP.h in all of the bridge/ code. Build tested using allmodconfig/allyesconfig with arm, x86, alpha (that has a tendency to break) and a few more v2: Sort include blocks like this: #include #include #include #include "foo.h" And within each block sort alphabetically. Laurent pointed out the order of the blocks was not consistent. And it was not consistent what was in each block. The re-ordering caused the build to fail due to dw_mipi_dsi.h. Fix so this header becomes self-contained to avoid this. Sam Ravnborg (2): drm/bridge: make dw_mipi_dsi.h self-contained drm/bridge: drop drmP.h usage drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 8 +++ drivers/gpu/drm/bridge/analogix-anx78xx.c | 8 +++ drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 18 +++ drivers/gpu/drm/bridge/dumb-vga-dac.c | 2 +- drivers/gpu/drm/bridge/lvds-encoder.c | 10 .../drm/bridge/megachips-stdp-ge-b850v3-fw.c | 3 ++- drivers/gpu/drm/bridge/nxp-ptn3460.c | 3 ++- drivers/gpu/drm/bridge/panel.c | 5 ++-- drivers/gpu/drm/bridge/parade-ps8622.c | 3 ++- drivers/gpu/drm/bridge/sii902x.c | 3 ++- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 27 +++--- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 9 +--- drivers/gpu/drm/bridge/tc358764.c | 14 +++ drivers/gpu/drm/bridge/thc63lvd1024.c | 10 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 18 --- drivers/gpu/drm/bridge/ti-tfp410.c | 4 ++-- include/drm/bridge/dw_mipi_dsi.h | 8 +++ 17 files changed, 89 insertions(+), 64 deletions(-) ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110712] [regression]Raven Ridge: System freeze but mouse cursor able to move when using Firefox Webrender.
https://bugs.freedesktop.org/show_bug.cgi?id=110712 Bug ID: 110712 Summary: [regression]Raven Ridge: System freeze but mouse cursor able to move when using Firefox Webrender. Product: DRI Version: XOrg git Hardware: Other OS: Linux (All) Status: NEW Severity: major Priority: medium Component: DRM/AMDgpu Assignee: dri-devel@lists.freedesktop.org Reporter: haxk...@gmail.com System: Arch Linux Kernel: Git (72cf0b07418a9c8349aa9137194b1ccba6e54a9d) MESA version (19.2-4689e98f) When using Firefox Webrender and browsing some heavy site the system freezes but mouse cursor is still able to move as normal. This wasnt an issue on my last build of MESA (db329260bff) and once i build new version the system started to freeze. As a temporary workaround im using my last build thats working but this is not an OK solution for obvious reasons. I found bug 108718 which is the same as this one but nobody responded to it and i think it got solved as the reporter didnt respond to it anymore thus i think this is an regression. Im unable to provide dmesg of the issue as when the system locks up i cannot even go to TTY. Will try to set up SSH and capture dmesg like that. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 108718] Raven Ridge: ring sdma0 timeout on heavy CSS website with Firefox WebRender
https://bugs.freedesktop.org/show_bug.cgi?id=108718 --- Comment #1 from Haxk20 --- I have the same exact bug. As a workaround i used earlier build of mesa but indeed the latest one is borked and unusable in Firefox. And without webrenderer firefox is kind of unusable as the color gradient look horrible. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #16 from Chris Hodapp --- Hrm, 5.1.3 does not truly fix things for me. Would you folks mind rebooting a few times and then maybe playing a couple Youtube videos and reporting back? -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/mediatek: add dsi module reset driver
Hi Jitao, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.1 next-20190517] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jitao-Shi/drm-mediatek-add-dsi-module-reset-driver/20190519-214457 config: arm64-allyesconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=arm64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All warnings (new ones prefixed by >>): In file included from drivers/gpu//drm/mediatek/mtk_dsi.c:29:0: drivers/gpu//drm/mediatek/mtk_dsi.c: In function 'mtk_dsi_reset_all': >> drivers/gpu//drm/mediatek/mtk_dsi.c:250:27: warning: large integer >> implicitly truncated to unsigned type [-Woverflow] MMSYS_SW_RST_DSI_B, ~MMSYS_SW_RST_DSI_B); ^ include/linux/regmap.h:77:42: note: in definition of macro 'regmap_update_bits' regmap_update_bits_base(map, reg, mask, val, NULL, false, false) ^~~ vim +250 drivers/gpu//drm/mediatek/mtk_dsi.c 246 247 static void mtk_dsi_reset_all(struct mtk_dsi *dsi) 248 { 249 regmap_update_bits(dsi->mmsys_sw_rst_b, dsi->sw_rst_b, > 250 MMSYS_SW_RST_DSI_B, ~MMSYS_SW_RST_DSI_B); 251 usleep_range(1000, 1100); 252 253 regmap_update_bits(dsi->mmsys_sw_rst_b, dsi->sw_rst_b, 254 MMSYS_SW_RST_DSI_B, MMSYS_SW_RST_DSI_B); 255 } 256 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110701] GPU faults in in Unigine Valley 1.0
https://bugs.freedesktop.org/show_bug.cgi?id=110701 --- Comment #11 from Mariusz Ceier --- (In reply to Yury Zhuravlev from comment #10) > (In reply to Mariusz Ceier from comment #9) > > (In reply to Yury Zhuravlev from comment #5) > > > > can you try to build mesa for previous commit? Like > > > > 6b3343e5d80abf162b45f0d7e977449588824706 > > > > > > > > I think we need to change the title of this bug. > > > > > > sorry, it's also unstable, but I can't reproduce error easily. > > > > Opening firefox private window causes this error every time (built with > > --enable-webrender and --enable-rust-simd, not sure if it makes difference). > > Currently, I am on 04122532e3c06260ae889a4f6a28d6f9849b00f5 and it's stable > for me. Can you check this one? > (I have no modern firefox yet) Just tried it and the error doesn't happen. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110711] American Truck Simulator shows strange colored reflections
https://bugs.freedesktop.org/show_bug.cgi?id=110711 Gregor Münch changed: What|Removed |Added Summary|American Truck shows|American Truck Simulator |strange colored reflections |shows strange colored ||reflections -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110701] GPU faults in in Unigine Valley 1.0
https://bugs.freedesktop.org/show_bug.cgi?id=110701 --- Comment #10 from Yury Zhuravlev --- (In reply to Mariusz Ceier from comment #9) > (In reply to Yury Zhuravlev from comment #5) > > > can you try to build mesa for previous commit? Like > > > 6b3343e5d80abf162b45f0d7e977449588824706 > > > > > > I think we need to change the title of this bug. > > > > sorry, it's also unstable, but I can't reproduce error easily. > > Opening firefox private window causes this error every time (built with > --enable-webrender and --enable-rust-simd, not sure if it makes difference). Currently, I am on 04122532e3c06260ae889a4f6a28d6f9849b00f5 and it's stable for me. Can you check this one? (I have no modern firefox yet) -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110711] American Truck shows strange colored reflections
https://bugs.freedesktop.org/show_bug.cgi?id=110711 Bug ID: 110711 Summary: American Truck shows strange colored reflections Product: Mesa Version: git Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel@lists.freedesktop.org Reporter: gr.mue...@gmail.com QA Contact: dri-devel@lists.freedesktop.org Created attachment 144301 --> https://bugs.freedesktop.org/attachment.cgi?id=144301=edit ATS Menu There is strange colored noise on the chrome parts of the Truck, see screenshot. Wasnt sure if this was a game bug or a radeonsi one, so I didnt report, although it was there for several years. After I saw that a lot graphical issues in other games went away R600_DEBUG=zerovram I tried that here too and voila! For me, that looks like a general problem that was undiscovered for several years and needs examination. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v1 1/1] drm/bridge: drop drmP.h usage
Hi Laurent Thanks for the quick feedback. > > @@ -15,14 +15,17 @@ > > #include > > #include > > #include > > -#include > > + > > #include > > #include > > #include > > #include > > #include > > +#include > > #include > > + > > #include > > If you separate this file fromt he rest of the drm/ includes, you should > do the same in drivers/gpu/drm/bridge/synopsys/dw-hdmi.c for > consistency. I'm fine either way. > > > index a20e454ddd64..170f162ffa55 100644 > > --- a/drivers/gpu/drm/bridge/tc358764.c > > +++ b/drivers/gpu/drm/bridge/tc358764.c > > @@ -7,18 +7,22 @@ > > * Maciej Purski > > */ > > > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > + > > #include > > #include > > #include > > #include > > #include > > #include > > +#include > > #include > > -#include > > -#include > > -#include > > -#include > > -#include > > Similarly, in drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c you have > video/ after drm/, while it's the other way around. I think we should > pick one order and stick with it. Well done to spot this inconsistency. I will go through the files and consistently use following order: "" This seems to match the majority but all variants can be found. And then the principle is: - most general includes first, with linux/* first - drm includes second-last - local drm includes last > > With these small issues fixed, > > Reviewed-by: Laurent Pinchart Thanks. I will post a v2 - where I can also fix so the mail is sent to the relevant people (my cc: was missing some this time). Sam ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v1 1/1] drm/bridge: drop drmP.h usage
Hi Sam, Thank you for the patch. On Sun, May 19, 2019 at 01:00:49PM +0200, Sam Ravnborg wrote: > Drop use of the deprecated drmP.h header file. > > While touching the list of include files: > - Divide include files in blocks of linux/* drm/* etc. > Followed the drm style with the most general files first > - Sort individual blocks of include files > > Signed-off-by: Sam Ravnborg > Cc: Andrzej Hajda > Cc: Laurent Pinchart > Cc: David Airlie > Cc: Daniel Vetter > Cc: Peter Senna Tschudin > Cc: Martin Donnelly > Cc: Martyn Welch > --- > > The patch is made on top of drm-misc-next. > Buildtested using x86,arm,arm64,alpha + more > allyesconfig + allmodconfig > > This is part of the ongoing effort to drop use of drmP.h. > > Squashed into a single patch as this touched an acceptable > low amount of files - and the individual changes are trivial. > > With this patch drm/bridge/ no longer uses drmP.h. Great work ! > drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 ++-- > drivers/gpu/drm/bridge/analogix-anx78xx.c | 8 > .../gpu/drm/bridge/analogix/analogix_dp_core.c | 15 --- > drivers/gpu/drm/bridge/dumb-vga-dac.c | 2 +- > drivers/gpu/drm/bridge/lvds-encoder.c | 10 ++ > .../bridge/megachips-stdp-ge-b850v3-fw.c | 3 ++- > drivers/gpu/drm/bridge/nxp-ptn3460.c | 3 ++- > drivers/gpu/drm/bridge/panel.c | 5 ++--- > drivers/gpu/drm/bridge/parade-ps8622.c | 3 ++- > drivers/gpu/drm/bridge/sii902x.c | 3 ++- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 17 + > drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 5 - > drivers/gpu/drm/bridge/tc358764.c | 14 +- > drivers/gpu/drm/bridge/thc63lvd1024.c | 10 ++ > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 18 ++ > drivers/gpu/drm/bridge/ti-tfp410.c | 4 ++-- > 16 files changed, 71 insertions(+), 53 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > index ec2ca71e1323..f9fff1b6f245 100644 > --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > @@ -6,17 +6,17 @@ > * Licensed under the GPL-2. > */ > > +#include > #include > #include > #include > #include > #include > -#include > > -#include > #include > #include > #include > +#include > #include > > #include > diff --git a/drivers/gpu/drm/bridge/analogix-anx78xx.c > b/drivers/gpu/drm/bridge/analogix-anx78xx.c > index c09aaf93ae1b..479ce3642a79 100644 > --- a/drivers/gpu/drm/bridge/analogix-anx78xx.c > +++ b/drivers/gpu/drm/bridge/analogix-anx78xx.c > @@ -16,23 +16,23 @@ > */ > #include > #include > -#include > +#include > #include > +#include > #include > #include > #include > #include > #include > #include > -#include > -#include > #include > +#include > > -#include > #include > #include > #include > #include > +#include > #include > > #include "analogix-anx78xx.h" > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > index 225f5e5dd69b..a0cf70c450d7 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > @@ -10,23 +10,24 @@ > * option) any later version. > */ > > -#include > -#include > -#include > #include > +#include > +#include > +#include > +#include > #include > #include > -#include > +#include > #include > #include > -#include > -#include > #include > +#include > > -#include > #include > #include > +#include > #include > +#include > #include > > #include > diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c > b/drivers/gpu/drm/bridge/dumb-vga-dac.c > index e64736c39a9f..1a3800a58aaf 100644 > --- a/drivers/gpu/drm/bridge/dumb-vga-dac.c > +++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c > @@ -15,9 +15,9 @@ > #include > #include > > -#include > #include > #include > +#include > #include > > struct dumb_vga { > diff --git a/drivers/gpu/drm/bridge/lvds-encoder.c > b/drivers/gpu/drm/bridge/lvds-encoder.c > index ae8fc597eb38..6eaaa76970b1 100644 > --- a/drivers/gpu/drm/bridge/lvds-encoder.c > +++ b/drivers/gpu/drm/bridge/lvds-encoder.c > @@ -7,12 +7,14 @@ > * the License, or (at your option) any later version. > */ > > -#include > -#include > -#include > - > #include > +#include > +#include > #include > +#include > + > +#include > +#include > > struct lvds_encoder { > struct drm_bridge bridge; > diff --git a/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c > b/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c > index a01028ec4de6..1644d281558a 100644 > --- a/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c > +++
[Bug 110702] segfault in radeonsi HEVC hardware decoding
https://bugs.freedesktop.org/show_bug.cgi?id=110702 --- Comment #2 from Pierre Ossman --- I think I've spotted a difference. The crashing files are all yuv420p10le, whilst everything else is in yuv420. Hope this helps. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110710] Non recoverable crashes when entering screensaver
https://bugs.freedesktop.org/show_bug.cgi?id=110710 Bug ID: 110710 Summary: Non recoverable crashes when entering screensaver Product: DRI Version: XOrg git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: major Priority: medium Component: DRM/AMDgpu Assignee: dri-devel@lists.freedesktop.org Reporter: freedesk...@soerensoerensen.de Created attachment 144300 --> https://bugs.freedesktop.org/attachment.cgi?id=144300=edit Logs Computer crashes each time the screensaver is started and the whole machine must be restarted forcefully. I can't even switch to other virtual consoles. I'm running Fedora 30 using Sway 1 as WM. The following message appears in the log A LOT: May 19 15:36:24 workstation kernel: [ cut here ] May 19 15:36:24 workstation kernel: Global lock should be Set, overall_update_type should be UPDATE_TYPE_MED or UPDATE_TYPE_FULL May 19 15:36:24 workstation kernel: WARNING: CPU: 3 PID: 2983 at drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6079 amdgpu_dm_atomic_check+0x42b/0x470 [amdgpu] May 19 15:36:24 workstation kernel: Modules linked in: xt_CHECKSUM ipt_MASQUERADE tun devlink bridge stp llc ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4 nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables sunrpc vfat fat edac_mce_amd kvm_amd snd_hda_codec_realtek ccp snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi kvm snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_seq irqbypass snd_seq_device snd_pcm wmi_bmof k10temp snd_timer sp5100_tco i2c_piix4 snd soundcore joydev gpio_amdpt gpio_generic pcc_cpufreq acpi_cpufreq dm_crypt amdgpu crct10dif_pclmul crc32_pclmul crc32c_intel chash amd_iommu_v2 gpu_sched i2c_algo_bit ttm drm_kms_helper ghash_clmulni_intel drm nvme nvme_core r8169 wmi video pinctrl_amd May 19 15:36:24 workstation kernel: CPU: 3 PID: 2983 Comm: sway Tainted: G W 5.0.16-300.fc30.x86_64 #1 May 19 15:36:24 workstation kernel: Hardware name: Gigabyte Technology Co., Ltd. AB350M-DS3H/AB350M-DS3H-CF, BIOS F24c 12/06/2018 May 19 15:36:24 workstation kernel: RIP: 0010:amdgpu_dm_atomic_check+0x42b/0x470 [amdgpu] May 19 15:36:24 workstation kernel: Code: ff 49 8b 57 20 41 8b 77 60 48 c7 c7 f8 0d 4c c0 e8 8a 32 df ff eb 80 31 db e9 6d fe ff ff 48 c7 c7 48 0d 4c c0 e8 84 1f d7 f0 <0f> 0b e9 8d fe ff ff 48 c7 c7 a8 0d 4c c0 e8 71 1f d7 f0 0f 0b e9 May 19 15:36:24 workstation kernel: RSP: 0018:b900424efb68 EFLAGS: 00010286 May 19 15:36:24 workstation kernel: RAX: RBX: RCX: May 19 15:36:24 workstation kernel: RDX: 0004 RSI: b29b067c RDI: 0246 May 19 15:36:24 workstation kernel: RBP: 8d304e4b9800 R08: 090c1eec5c2d R09: b900424efb00 May 19 15:36:24 workstation kernel: R10: 00018630 R11: 0003 R12: May 19 15:36:24 workstation kernel: R13: 8d3046c74800 R14: 8d3000e35050 R15: 8d304c1cc280 May 19 15:36:24 workstation kernel: FS: 7f37bba61a80() GS:8d3050ac() knlGS: May 19 15:36:24 workstation kernel: CS: 0010 DS: ES: CR0: 80050033 May 19 15:36:24 workstation kernel: CR2: 01054e78 CR3: 00040a5be000 CR4: 003406e0 May 19 15:36:24 workstation kernel: Call Trace: May 19 15:36:24 workstation kernel: drm_atomic_check_only+0x57f/0x7b0 [drm] May 19 15:36:24 workstation kernel: ? drm_event_reserve_init_locked+0x4c/0x80 [drm] May 19 15:36:24 workstation kernel: drm_atomic_nonblocking_commit+0x13/0x50 [drm] May 19 15:36:24 workstation kernel: drm_mode_atomic_ioctl+0x821/0x920 [drm] May 19 15:36:24 workstation kernel: ? drm_atomic_set_property+0x990/0x990 [drm] May 19 15:36:24 workstation kernel: drm_ioctl_kernel+0xa7/0xf0 [drm] May 19 15:36:24 workstation kernel: drm_ioctl+0x208/0x390 [drm] May 19 15:36:24 workstation kernel: ? drm_atomic_set_property+0x990/0x990 [drm] May 19 15:36:24 workstation kernel: ? __handle_mm_fault+0xd5f/0x1ae0 May 19 15:36:24 workstation kernel: amdgpu_drm_ioctl+0x49/0x80 [amdgpu] May 19 15:36:24 workstation kernel: do_vfs_ioctl+0x405/0x660 May 19 15:36:24 workstation kernel: ksys_ioctl+0x5e/0x90 May 19 15:36:24 workstation kernel: __x64_sys_ioctl+0x16/0x20 May 19 15:36:24 workstation kernel: do_syscall_64+0x5b/0x170 May 19 15:36:24 workstation kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9 May 19 15:36:24 workstation kernel: RIP: 0033:0x7f37bc7be03b May 19 15:36:24 workstation kernel: Code: 0f 1e fa 48 8b 05 4d de 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #15 from Tom B --- Have been running 5.0 since release without issue but upgraded this morning and got crashes as described here within a few seconds of boot. 5.1.3 also fixed it for me, however I am still seeing powerplay errors in dmesg: [6.198409] amdgpu: [powerplay] Failed to send message 0x28, response 0x0 [6.198411] amdgpu: [powerplay] [SetUclkToHightestDpmLevel] Set hard min uclk failed! [7.396661] amdgpu: [powerplay] Failed to send message 0x28, response 0x0 [7.396662] amdgpu: [powerplay] Attempt to set Hard Min for DCEFCLK Failed! [8.587385] amdgpu: [powerplay] Failed to send message 0x28, response 0x0 [8.587386] amdgpu: [powerplay] [SetHardMinFreq] Set hard min uclk failed! [9.779135] amdgpu: [powerplay] Failed to send message 0x26, response 0x0 [9.779136] amdgpu: [powerplay] Failed to set soft min gfxclk ! [9.779136] amdgpu: [powerplay] Failed to upload DPM Bootup Levels! The GPU seems to be boosting as expected so I don't think there is any major issue. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 03/06] drm: make drm_crtc_internal.h self-contained
Do not require users of drm_crtc_internal.h to include other files just to let it build Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/drm_crtc_internal.h | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index 0719a235d6cc..c78a44fad13d 100644 --- a/drivers/gpu/drm/drm_crtc_internal.h +++ b/drivers/gpu/drm/drm_crtc_internal.h @@ -31,14 +31,30 @@ * and are not exported to drivers. */ -enum drm_mode_status; +#include + +enum drm_color_encoding; +enum drm_color_range; enum drm_connector_force; +enum drm_mode_status; -struct drm_display_mode; -struct work_struct; -struct drm_connector; +struct drm_atomic_state; struct drm_bridge; +struct drm_connector; +struct drm_crtc; +struct drm_device; +struct drm_display_mode; +struct drm_file; +struct drm_framebuffer; +struct drm_mode_create_dumb; +struct drm_mode_fb_cmd2; +struct drm_mode_fb_cmd; +struct drm_mode_object; +struct drm_plane; +struct drm_property; struct edid; +struct kref; +struct work_struct; /* drm_crtc.c */ int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj, -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 0/6] drm: make headers self-contained
While removing use of drmP.h from files in drm/* I noticed that I had to add the same include files due to build errors in the header files. It is better to let the header files include what is necessary and let the users pull in only the additional headers files required. So I went ahead and made the header files self-conatined. (I did not check if this made any includes redundant in some files, I do not have tooling in place to do so). These patches are preparation for removing use of drmP.h in all the files in drm/* I have the patchset ready - one patch per file. It is a lot of small patches (59) and maybe it is better to squash them all into one big patch. Any opinions on this? I will await feedback on this patchset before sending the patch(es) to remove drmP.h in drm/* Sam Sam Ravnborg (6): drm: make drm_auth.h self contained drm: make drm_legacy.h self-contained drm: make drm_crtc_internal.h self-contained drm: make drm_internal.h self-contained drm: make drm_legacy.h self-contained drm: make drm_trace.h self-contained drivers/gpu/drm/drm_crtc_internal.h | 24 drivers/gpu/drm/drm_internal.h | 10 +- drivers/gpu/drm/drm_legacy.h| 4 drivers/gpu/drm/drm_trace.h | 2 ++ include/drm/drm_auth.h | 7 +++ include/drm/drm_legacy.h| 2 ++ 6 files changed, 44 insertions(+), 5 deletions(-) ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 01/06] drm: make drm_auth.h self contained
Do not require users of drm_auth.h to include other files just to let it build. Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter --- include/drm/drm_auth.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/drm/drm_auth.h b/include/drm/drm_auth.h index 871008118bab..f34b7b842976 100644 --- a/include/drm/drm_auth.h +++ b/include/drm/drm_auth.h @@ -28,6 +28,13 @@ #ifndef _DRM_AUTH_H_ #define _DRM_AUTH_H_ +#include +#include +#include + +struct drm_file; +struct drm_hw_lock; + /* * Legacy DRI1 locking data structure. Only here instead of in drm_legacy.h for * include ordering reasons. -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 02/06] drm: make drm_legacy.h self-contained
Do not require users of drm_legacy.h to include other files just to let it build. Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter --- include/drm/drm_legacy.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h index 2182a56ac421..1d32acd712de 100644 --- a/include/drm/drm_legacy.h +++ b/include/drm/drm_legacy.h @@ -1,10 +1,12 @@ #ifndef __DRM_DRM_LEGACY_H__ #define __DRM_DRM_LEGACY_H__ +#include #include #include struct drm_device; +struct file; /* * Legacy driver interfaces for the Direct Rendering Manager -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 05/06] drm: make drm_legacy.h self-contained
Do not require users of drm_ilegacy.h to include other files just to let it build Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/drm_legacy.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_legacy.h b/drivers/gpu/drm/drm_legacy.h index 013ccdfd90be..1be3ea320474 100644 --- a/drivers/gpu/drm/drm_legacy.h +++ b/drivers/gpu/drm/drm_legacy.h @@ -29,11 +29,15 @@ * drivers use them, and removing them are API breaks. */ #include + +#include +#include #include struct agp_memory; struct drm_device; struct drm_file; +struct drm_buf_desc; /* * Generic DRM Contexts -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 06/06] drm: make drm_trace.h self-contained
Do not require users of drm_trace.h to include other files just to let it build Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/drm_trace.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_trace.h b/drivers/gpu/drm/drm_trace.h index baccc63db106..471eb927474b 100644 --- a/drivers/gpu/drm/drm_trace.h +++ b/drivers/gpu/drm/drm_trace.h @@ -6,6 +6,8 @@ #include #include +struct drm_file; + #undef TRACE_SYSTEM #define TRACE_SYSTEM drm #define TRACE_INCLUDE_FILE drm_trace -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 04/06] drm: make drm_internal.h self-contained
Do not require users of drm_internal.h to include other files just to let it build Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/drm_internal.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h index e6281d9f9c87..76bd4b81c5b1 100644 --- a/drivers/gpu/drm/drm_internal.h +++ b/drivers/gpu/drm/drm_internal.h @@ -28,8 +28,16 @@ #define DRM_IF_VERSION(maj, min) (maj << 16 | min) -struct drm_prime_file_private; +struct dentry; struct dma_buf; +struct drm_connector; +struct drm_crtc; +struct drm_framebuffer; +struct drm_gem_object; +struct drm_master; +struct drm_minor; +struct drm_prime_file_private; +struct drm_printer; /* drm_file.c */ extern struct mutex drm_global_mutex; -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 0/4] drm/nouveau: drop use of drmP.h
The following patchset remove use of the deprecated drmP.h header file in the nouveau driver(s). As preparation a dependency on drm_os_linux.h is dropped. The list of include files are sorted and are in some cases divided up in blocks of linux/* drm/* etc. The removal is divided up in a few patches that was the logical steps to remove the use of drmP.h. Build tested with allmodconfig and allyesconfig for x86, arm, alpha and more. Patchset made on top of drm-misc-next. Sam Sam Ravnborg (4): drm/nouveau: drop use of DRM_UDELAY drm/nouveau: drop drmP.h from nouveau_drv.h drm/nouveau: drop drmP.h from all header files drm/nouveau: drop use of drmp.h drivers/gpu/drm/nouveau/dispnv04/arb.c | 2 -- drivers/gpu/drm/nouveau/dispnv04/crtc.c| 3 ++- drivers/gpu/drm/nouveau/dispnv04/cursor.c | 1 - drivers/gpu/drm/nouveau/dispnv04/dac.c | 1 - drivers/gpu/drm/nouveau/dispnv04/dfp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/disp.c| 1 - drivers/gpu/drm/nouveau/dispnv04/hw.c | 1 - drivers/gpu/drm/nouveau/dispnv04/hw.h | 1 - drivers/gpu/drm/nouveau/dispnv04/overlay.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 1 - drivers/gpu/drm/nouveau/dispnv50/base507c.c| 2 ++ drivers/gpu/drm/nouveau/dispnv50/disp.c| 4 ++-- drivers/gpu/drm/nouveau/dispnv50/ovly507e.c| 1 + drivers/gpu/drm/nouveau/dispnv50/wndw.c| 2 ++ drivers/gpu/drm/nouveau/nouveau_bios.c | 2 -- drivers/gpu/drm/nouveau/nouveau_connector.c| 1 - drivers/gpu/drm/nouveau/nouveau_crtc.h | 2 ++ drivers/gpu/drm/nouveau/nouveau_debugfs.h | 2 +- drivers/gpu/drm/nouveau/nouveau_display.c | 4 +++- drivers/gpu/drm/nouveau/nouveau_display.h | 4 drivers/gpu/drm/nouveau/nouveau_dma.c | 2 +- drivers/gpu/drm/nouveau/nouveau_dp.c | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_drv.h | 5 - drivers/gpu/drm/nouveau/nouveau_fbcon.c| 2 +- drivers/gpu/drm/nouveau/nouveau_fence.c| 3 +-- drivers/gpu/drm/nouveau/nouveau_gem.h | 2 -- drivers/gpu/drm/nouveau/nouveau_hwmon.c| 2 -- drivers/gpu/drm/nouveau/nouveau_ioc32.c| 3 ++- drivers/gpu/drm/nouveau/nouveau_prime.c| 1 - drivers/gpu/drm/nouveau/nouveau_vga.c | 1 - 33 files changed, 31 insertions(+), 34 deletions(-) ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 4/4] drm/nouveau: drop use of drmp.h
Drop use of the deprecated drmP.h file from drm/nouveau. Build tested using allyesconfig and allmodconfig. Signed-off-by: Sam Ravnborg Cc: Ben Skeggs Cc: nouv...@lists.freedesktop.org --- drivers/gpu/drm/nouveau/dispnv04/arb.c | 2 -- drivers/gpu/drm/nouveau/dispnv04/crtc.c| 3 ++- drivers/gpu/drm/nouveau/dispnv04/cursor.c | 1 - drivers/gpu/drm/nouveau/dispnv04/dac.c | 1 - drivers/gpu/drm/nouveau/dispnv04/dfp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/disp.c| 1 - drivers/gpu/drm/nouveau/dispnv04/hw.c | 1 - drivers/gpu/drm/nouveau/dispnv04/overlay.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 1 - drivers/gpu/drm/nouveau/dispnv50/disp.c| 4 ++-- drivers/gpu/drm/nouveau/nouveau_bios.c | 2 -- drivers/gpu/drm/nouveau/nouveau_connector.c| 1 - drivers/gpu/drm/nouveau/nouveau_display.c | 4 +++- drivers/gpu/drm/nouveau/nouveau_dp.c | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_fbcon.c| 2 +- drivers/gpu/drm/nouveau/nouveau_fence.c| 3 +-- drivers/gpu/drm/nouveau/nouveau_hwmon.c| 2 -- drivers/gpu/drm/nouveau/nouveau_ioc32.c| 3 ++- drivers/gpu/drm/nouveau/nouveau_prime.c| 1 - drivers/gpu/drm/nouveau/nouveau_vga.c | 1 - 23 files changed, 14 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv04/arb.c b/drivers/gpu/drm/nouveau/dispnv04/arb.c index c79160c37f84..362495535e69 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/arb.c +++ b/drivers/gpu/drm/nouveau/dispnv04/arb.c @@ -21,8 +21,6 @@ * SOFTWARE. */ -#include - #include "nouveau_drv.h" #include "nouveau_reg.h" #include "hw.h" diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index f22f01020625..210f13b145c1 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c @@ -24,9 +24,10 @@ */ #include -#include #include +#include #include +#include #include "nouveau_drv.h" #include "nouveau_reg.h" diff --git a/drivers/gpu/drm/nouveau/dispnv04/cursor.c b/drivers/gpu/drm/nouveau/dispnv04/cursor.c index ebf860bd59af..25e16fa8a428 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/cursor.c +++ b/drivers/gpu/drm/nouveau/dispnv04/cursor.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#include #include #include "nouveau_drv.h" #include "nouveau_reg.h" diff --git a/drivers/gpu/drm/nouveau/dispnv04/dac.c b/drivers/gpu/drm/nouveau/dispnv04/dac.c index e7af95d37ddb..e8eef88a8382 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/dac.c +++ b/drivers/gpu/drm/nouveau/dispnv04/dac.c @@ -24,7 +24,6 @@ * DEALINGS IN THE SOFTWARE. */ -#include #include #include "nouveau_drv.h" diff --git a/drivers/gpu/drm/nouveau/dispnv04/dfp.c b/drivers/gpu/drm/nouveau/dispnv04/dfp.c index 73d41abbb510..f9f4482c79b5 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/dfp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/dfp.c @@ -24,8 +24,8 @@ * DEALINGS IN THE SOFTWARE. */ -#include #include +#include #include "nouveau_drv.h" #include "nouveau_reg.h" diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.c b/drivers/gpu/drm/nouveau/dispnv04/disp.c index 5713bacaee80..0f8e186f3d07 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/disp.c @@ -22,7 +22,6 @@ * Author: Ben Skeggs */ -#include #include #include "nouveau_drv.h" diff --git a/drivers/gpu/drm/nouveau/dispnv04/hw.c b/drivers/gpu/drm/nouveau/dispnv04/hw.c index 0c9bdf023f5b..3fdfafa8b0ad 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/hw.c +++ b/drivers/gpu/drm/nouveau/dispnv04/hw.c @@ -22,7 +22,6 @@ * SOFTWARE. */ -#include #include "nouveau_drv.h" #include "hw.h" diff --git a/drivers/gpu/drm/nouveau/dispnv04/overlay.c b/drivers/gpu/drm/nouveau/dispnv04/overlay.c index df4358e31075..a3a0a73ae8ab 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/overlay.c +++ b/drivers/gpu/drm/nouveau/dispnv04/overlay.c @@ -23,7 +23,6 @@ * written by Arthur Huillet. */ -#include #include #include diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c index 2b83b2c39d1d..2f6d2b6711ab 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c +++ b/drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c @@ -24,7 +24,6 @@ * */ -#include #include #include "nouveau_drv.h" #include "nouveau_encoder.h" diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c index de4490b4ed30..b701a4d8fe76 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv04.c @@ -24,7 +24,6 @@ * */ -#include #include "nouveau_drv.h" #include "nouveau_reg.h" #include "nouveau_encoder.h" diff --git
[PATCH v1 2/4] drm/nouveau: drop drmP.h from nouveau_drv.h
Drop the deprecated drmP.h header from nouveau_drv.h. Fix fallout in other parts of the driver. Build tested using allmodconfig and allyesconfig. Signed-off-by: Sam Ravnborg Cc: Ben Skeggs Cc: nouv...@lists.freedesktop.org --- drivers/gpu/drm/nouveau/dispnv50/base507c.c | 2 ++ drivers/gpu/drm/nouveau/dispnv50/ovly507e.c | 1 + drivers/gpu/drm/nouveau/dispnv50/wndw.c | 2 ++ drivers/gpu/drm/nouveau/nouveau_display.h | 4 drivers/gpu/drm/nouveau/nouveau_drv.h | 5 - 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/base507c.c b/drivers/gpu/drm/nouveau/dispnv50/base507c.c index d5e295ca2caa..80e020611bcb 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/base507c.c +++ b/drivers/gpu/drm/nouveau/dispnv50/base507c.c @@ -25,7 +25,9 @@ #include #include +#include #include + #include "nouveau_bo.h" void diff --git a/drivers/gpu/drm/nouveau/dispnv50/ovly507e.c b/drivers/gpu/drm/nouveau/dispnv50/ovly507e.c index cc417664f823..7354aaf79158 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/ovly507e.c +++ b/drivers/gpu/drm/nouveau/dispnv50/ovly507e.c @@ -23,6 +23,7 @@ #include "atom.h" #include +#include #include #include diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c index b95181027b31..a501bb62034b 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c +++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c @@ -26,6 +26,8 @@ #include #include +#include + #include "nouveau_bo.h" static void diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h index 311e175f0513..31eb85f223b2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.h +++ b/drivers/gpu/drm/nouveau/nouveau_display.h @@ -1,9 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0 */ #ifndef __NOUVEAU_DISPLAY_H__ #define __NOUVEAU_DISPLAY_H__ + #include "nouveau_drv.h" + #include +#include + struct nouveau_framebuffer { struct drm_framebuffer base; struct nouveau_bo *nvbo; diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 35ff0ca01a3b..81f823df1989 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -46,7 +46,10 @@ #include #include -#include +#include +#include +#include +#include #include #include -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 1/4] drm/nouveau: drop use of DRM_UDELAY
The DRM_UDELAY is a simple wrapper for udealy() and to be consistent call udelay() direct like in may other places. This avoids the need to pull in drm_os_linux.h when we later drop drmP.h uses in nouveau. Signed-off-by: Sam Ravnborg Cc: Ben Skeggs Cc: nouv...@lists.freedesktop.org --- drivers/gpu/drm/nouveau/nouveau_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c index 078f65d849ce..3c430a550a51 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dma.c +++ b/drivers/gpu/drm/nouveau/nouveau_dma.c @@ -118,7 +118,7 @@ nv50_dma_push_wait(struct nouveau_channel *chan, int count) } if ((++cnt & 0xff) == 0) { - DRM_UDELAY(1); + udelay(1); if (cnt > 10) return -EBUSY; } -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 3/4] drm/nouveau: drop drmP.h from all header files
Drop include of the deprecated drmP.h from all nouveau heder files. This allows us to remove drmP.h from all .c files without any side-effects in a follow-up commit. Build tested using allyeyconfig and allmodconfig Signed-off-by: Sam Ravnborg Cc: Ben Skeggs Cc: nouv...@lists.freedesktop.org --- drivers/gpu/drm/nouveau/dispnv04/hw.h | 1 - drivers/gpu/drm/nouveau/nouveau_crtc.h| 2 ++ drivers/gpu/drm/nouveau/nouveau_debugfs.h | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.h | 2 -- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv04/hw.h b/drivers/gpu/drm/nouveau/dispnv04/hw.h index 3a2be47fb4f1..6987e1766cd2 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/hw.h +++ b/drivers/gpu/drm/nouveau/dispnv04/hw.h @@ -23,7 +23,6 @@ #ifndef __NOUVEAU_HW_H__ #define __NOUVEAU_HW_H__ -#include #include "disp.h" #include "nvreg.h" diff --git a/drivers/gpu/drm/nouveau/nouveau_crtc.h b/drivers/gpu/drm/nouveau/nouveau_crtc.h index 366acb928f57..7f63be2ec35d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_crtc.h +++ b/drivers/gpu/drm/nouveau/nouveau_crtc.h @@ -27,6 +27,8 @@ #ifndef __NOUVEAU_CRTC_H__ #define __NOUVEAU_CRTC_H__ +#include + #include struct nouveau_crtc { diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.h b/drivers/gpu/drm/nouveau/nouveau_debugfs.h index 1d01a82d4b6f..1f2d97b7211c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.h +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.h @@ -2,7 +2,7 @@ #ifndef __NOUVEAU_DEBUGFS_H__ #define __NOUVEAU_DEBUGFS_H__ -#include +#include #if defined(CONFIG_DEBUG_FS) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.h b/drivers/gpu/drm/nouveau/nouveau_gem.h index fe39998f65cc..615156fefcbc 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.h +++ b/drivers/gpu/drm/nouveau/nouveau_gem.h @@ -2,8 +2,6 @@ #ifndef __NOUVEAU_GEM_H__ #define __NOUVEAU_GEM_H__ -#include - #include "nouveau_drv.h" #include "nouveau_bo.h" -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 2/4] drm/gma500: drop drmP.h from header files
Drop use of drmp.h from all header files in drm/gma500. Fix fallout in all files. In some cases moved include lines and sorted them too. With drmP.h removed from all header files it can now be removed from each .c file without any further dependencies Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/gma500/framebuffer.h | 1 - drivers/gpu/drm/gma500/gtt.h | 1 - drivers/gpu/drm/gma500/intel_bios.c | 1 + drivers/gpu/drm/gma500/intel_bios.h | 3 +-- drivers/gpu/drm/gma500/intel_i2c.c| 3 ++- drivers/gpu/drm/gma500/mdfld_device.c | 2 ++ drivers/gpu/drm/gma500/mdfld_dsi_dpi.c| 2 ++ drivers/gpu/drm/gma500/mdfld_dsi_output.c | 5 +++-- drivers/gpu/drm/gma500/mdfld_dsi_output.h | 2 +- drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 2 ++ drivers/gpu/drm/gma500/mdfld_tmd_vid.c| 2 ++ drivers/gpu/drm/gma500/power.h| 4 +++- drivers/gpu/drm/gma500/psb_drv.h | 2 +- drivers/gpu/drm/gma500/psb_irq.h | 2 +- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c| 8 +--- 15 files changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/gma500/framebuffer.h b/drivers/gpu/drm/gma500/framebuffer.h index e8e6357f033b..b54477aec95f 100644 --- a/drivers/gpu/drm/gma500/framebuffer.h +++ b/drivers/gpu/drm/gma500/framebuffer.h @@ -22,7 +22,6 @@ #ifndef _FRAMEBUFFER_H_ #define _FRAMEBUFFER_H_ -#include #include #include "psb_drv.h" diff --git a/drivers/gpu/drm/gma500/gtt.h b/drivers/gpu/drm/gma500/gtt.h index cb0c3a2a1fd4..c9449aabc58f 100644 --- a/drivers/gpu/drm/gma500/gtt.h +++ b/drivers/gpu/drm/gma500/gtt.h @@ -20,7 +20,6 @@ #ifndef _PSB_GTT_H_ #define _PSB_GTT_H_ -#include #include /* This wants cleaning up with respect to the psb_dev and un-needed stuff */ diff --git a/drivers/gpu/drm/gma500/intel_bios.c b/drivers/gpu/drm/gma500/intel_bios.c index 45c17c6f58f8..9c67d08a55ea 100644 --- a/drivers/gpu/drm/gma500/intel_bios.c +++ b/drivers/gpu/drm/gma500/intel_bios.c @@ -20,6 +20,7 @@ */ #include #include +#include #include "psb_drv.h" #include "psb_intel_drv.h" diff --git a/drivers/gpu/drm/gma500/intel_bios.h b/drivers/gpu/drm/gma500/intel_bios.h index e0ccf1d19a4d..bb3b813d1e68 100644 --- a/drivers/gpu/drm/gma500/intel_bios.h +++ b/drivers/gpu/drm/gma500/intel_bios.h @@ -22,8 +22,7 @@ #ifndef _INTEL_BIOS_H_ #define _INTEL_BIOS_H_ -#include -#include +struct drm_device; struct vbt_header { u8 signature[20]; /**< Always starts with 'VBT$' */ diff --git a/drivers/gpu/drm/gma500/intel_i2c.c b/drivers/gpu/drm/gma500/intel_i2c.c index 98a28c209555..147b556deeb0 100644 --- a/drivers/gpu/drm/gma500/intel_i2c.c +++ b/drivers/gpu/drm/gma500/intel_i2c.c @@ -17,9 +17,10 @@ * Authors: * Eric Anholt */ +#include #include -#include #include +#include #include "psb_drv.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/mdfld_device.c b/drivers/gpu/drm/gma500/mdfld_device.c index e2ab858122f9..585ec2e46166 100644 --- a/drivers/gpu/drm/gma500/mdfld_device.c +++ b/drivers/gpu/drm/gma500/mdfld_device.c @@ -17,6 +17,8 @@ * **/ +#include + #include "psb_drv.h" #include "mid_bios.h" #include "mdfld_output.h" diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c index d0bf5a1e94e8..832bae24fd72 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c +++ b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c @@ -25,6 +25,8 @@ * Jackie Li */ +#include + #include "mdfld_dsi_dpi.h" #include "mdfld_output.h" #include "mdfld_dsi_pkg_sender.h" diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c index fe020926ea4f..9ca982e77fa5 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c @@ -25,14 +25,15 @@ * Jackie Li */ -#include +#include +#include +#include #include "mdfld_dsi_output.h" #include "mdfld_dsi_dpi.h" #include "mdfld_output.h" #include "mdfld_dsi_pkg_sender.h" #include "tc35876x-dsi-lvds.h" -#include #include /* get the LABC from command line. */ diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.h b/drivers/gpu/drm/gma500/mdfld_dsi_output.h index 5b646c1f0c3e..68d14451e303 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.h +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.h @@ -29,7 +29,7 @@ #define __MDFLD_DSI_OUTPUT_H__ #include -#include + #include #include #include diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c b/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c index c50534c923df..003e96a20139 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c +++ b/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c @@ -24,7 +24,9 @@ * Jackie Li */ +#include #include + #include
[PATCH v1 4/4] drm/gma500: drop drmp.h include from all .c files
Drop remaining uses of the deprecated drmP.h in gma500 Replaced drmp.h with forward declarations or include files as relevant. Sorted include files and in some cases moved relevant includes together. Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/gma500/accel_2d.c| 2 +- drivers/gpu/drm/gma500/cdv_device.c | 3 ++- drivers/gpu/drm/gma500/cdv_intel_crt.c | 2 +- drivers/gpu/drm/gma500/cdv_intel_display.c | 4 ++- drivers/gpu/drm/gma500/cdv_intel_dp.c| 7 +++--- drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 5 ++-- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 5 ++-- drivers/gpu/drm/gma500/framebuffer.c | 2 +- drivers/gpu/drm/gma500/gem.c | 3 ++- drivers/gpu/drm/gma500/gma_device.c | 1 - drivers/gpu/drm/gma500/gma_display.c | 8 +- drivers/gpu/drm/gma500/gtt.c | 3 ++- drivers/gpu/drm/gma500/intel_bios.c | 1 - drivers/gpu/drm/gma500/intel_gmbus.c | 7 +++--- drivers/gpu/drm/gma500/mdfld_intel_display.c | 5 +++- drivers/gpu/drm/gma500/mid_bios.c| 1 - drivers/gpu/drm/gma500/mmu.c | 4 ++- drivers/gpu/drm/gma500/oaktrail_crtc.c | 4 ++- drivers/gpu/drm/gma500/oaktrail_device.c | 3 ++- drivers/gpu/drm/gma500/oaktrail_hdmi.c | 4 ++- drivers/gpu/drm/gma500/oaktrail_lvds.c | 4 +-- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c | 1 - drivers/gpu/drm/gma500/psb_device.c | 2 +- drivers/gpu/drm/gma500/psb_drv.c | 26 +--- drivers/gpu/drm/gma500/psb_intel_display.c | 3 ++- drivers/gpu/drm/gma500/psb_intel_lvds.c | 3 +-- drivers/gpu/drm/gma500/psb_intel_modes.c | 2 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 8 +++--- drivers/gpu/drm/gma500/psb_irq.c | 3 ++- drivers/gpu/drm/gma500/psb_lid.c | 4 +-- 30 files changed, 79 insertions(+), 51 deletions(-) diff --git a/drivers/gpu/drm/gma500/accel_2d.c b/drivers/gpu/drm/gma500/accel_2d.c index 204c8e452eb7..424289e49f5d 100644 --- a/drivers/gpu/drm/gma500/accel_2d.c +++ b/drivers/gpu/drm/gma500/accel_2d.c @@ -31,9 +31,9 @@ #include #include -#include #include #include +#include #include "psb_drv.h" #include "psb_reg.h" diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c index 6ba605ac7123..6384eab68af8 100644 --- a/drivers/gpu/drm/gma500/cdv_device.c +++ b/drivers/gpu/drm/gma500/cdv_device.c @@ -18,7 +18,8 @@ **/ #include -#include +#include + #include #include "psb_drv.h" diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c index cb5a14b7ec7f..4c4a97cb50ce 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_crt.c +++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c @@ -24,8 +24,8 @@ * Eric Anholt */ +#include #include -#include #include "intel_bios.h" #include "psb_drv.h" diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c index 17db4b4749d5..d24289676fc7 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_display.c +++ b/drivers/gpu/drm/gma500/cdv_intel_display.c @@ -18,9 +18,11 @@ * Eric Anholt */ +#include #include -#include +#include + #include "framebuffer.h" #include "psb_drv.h" #include "psb_intel_drv.h" diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c index 90ed20083009..400097b4385c 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_dp.c +++ b/drivers/gpu/drm/gma500/cdv_intel_dp.c @@ -26,16 +26,17 @@ */ #include -#include #include -#include +#include + #include #include +#include + #include "psb_drv.h" #include "psb_intel_drv.h" #include "psb_intel_reg.h" #include "gma_display.h" -#include /** * struct i2c_algo_dp_aux_data - driver interface structure for i2c over dp diff --git a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c index 4e4e4a66eaee..7aae144f4472 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c +++ b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c @@ -27,15 +27,16 @@ * We should probably make this generic and share it with Medfield */ -#include +#include + #include #include #include + #include "psb_intel_drv.h" #include "psb_drv.h" #include "psb_intel_reg.h" #include "cdv_device.h" -#include /* hdmi control bits */ #define HDMI_NULL_PACKETS_DURING_VSYNC (1 << 9) diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c index de9531caaca0..a3337302a229 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c +++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c @@ -20,16 +20,15 @@ * Jesse Barnes */ -#include #include -#include +#include +#include #include "intel_bios.h" #include "psb_drv.h"
[PATCH v1 1/4] drm/gma500: remove empty gma_drm.h header file
The header file gma_drm.h is empty so remove it and drop all uses of the file. Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/gma500/cdv_device.c | 2 +- drivers/gpu/drm/gma500/gem.c | 2 +- drivers/gpu/drm/gma500/intel_bios.c | 2 +- drivers/gpu/drm/gma500/intel_gmbus.c | 2 +- drivers/gpu/drm/gma500/mid_bios.c| 2 +- drivers/gpu/drm/gma500/oaktrail_device.c | 2 +- drivers/gpu/drm/gma500/psb_device.c | 2 +- drivers/gpu/drm/gma500/psb_drv.h | 2 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 2 +- include/drm/gma_drm.h| 25 10 files changed, 9 insertions(+), 34 deletions(-) delete mode 100644 include/drm/gma_drm.h diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c index 34b85767e4da..6ba605ac7123 100644 --- a/drivers/gpu/drm/gma500/cdv_device.c +++ b/drivers/gpu/drm/gma500/cdv_device.c @@ -20,7 +20,7 @@ #include #include #include -#include + #include "psb_drv.h" #include "psb_reg.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c index 576f1b272f23..cfc5b559c77b 100644 --- a/drivers/gpu/drm/gma500/gem.c +++ b/drivers/gpu/drm/gma500/gem.c @@ -25,8 +25,8 @@ #include #include -#include #include + #include "psb_drv.h" void psb_gem_free_object(struct drm_gem_object *obj) diff --git a/drivers/gpu/drm/gma500/intel_bios.c b/drivers/gpu/drm/gma500/intel_bios.c index 63bde4e86c6a..45c17c6f58f8 100644 --- a/drivers/gpu/drm/gma500/intel_bios.c +++ b/drivers/gpu/drm/gma500/intel_bios.c @@ -20,7 +20,7 @@ */ #include #include -#include + #include "psb_drv.h" #include "psb_intel_drv.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c index e7e22187c539..b1bf314ab150 100644 --- a/drivers/gpu/drm/gma500/intel_gmbus.c +++ b/drivers/gpu/drm/gma500/intel_gmbus.c @@ -30,8 +30,8 @@ #include #include #include + #include "psb_intel_drv.h" -#include #include "psb_drv.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/mid_bios.c b/drivers/gpu/drm/gma500/mid_bios.c index 237041a37532..e00778b002ec 100644 --- a/drivers/gpu/drm/gma500/mid_bios.c +++ b/drivers/gpu/drm/gma500/mid_bios.c @@ -25,7 +25,7 @@ #include #include -#include + #include "psb_drv.h" #include "mid_bios.h" diff --git a/drivers/gpu/drm/gma500/oaktrail_device.c b/drivers/gpu/drm/gma500/oaktrail_device.c index ba30b43a3412..f0872e2c22d5 100644 --- a/drivers/gpu/drm/gma500/oaktrail_device.c +++ b/drivers/gpu/drm/gma500/oaktrail_device.c @@ -22,7 +22,7 @@ #include #include #include -#include + #include "psb_drv.h" #include "psb_reg.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/psb_device.c b/drivers/gpu/drm/gma500/psb_device.c index dc0f8527570c..9fd418985d70 100644 --- a/drivers/gpu/drm/gma500/psb_device.c +++ b/drivers/gpu/drm/gma500/psb_device.c @@ -20,7 +20,7 @@ #include #include #include -#include + #include "psb_drv.h" #include "psb_reg.h" #include "psb_intel_reg.h" diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h index 941b238bdcc9..fbccf2abdad7 100644 --- a/drivers/gpu/drm/gma500/psb_drv.h +++ b/drivers/gpu/drm/gma500/psb_drv.h @@ -24,7 +24,7 @@ #include #include -#include + #include "psb_reg.h" #include "psb_intel_drv.h" #include "gma_display.h" diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c index dd3cec0e3190..5090ef5f348d 100644 --- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c +++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c @@ -32,8 +32,8 @@ #include #include #include + #include "psb_intel_drv.h" -#include #include "psb_drv.h" #include "psb_intel_sdvo_regs.h" #include "psb_intel_reg.h" diff --git a/include/drm/gma_drm.h b/include/drm/gma_drm.h deleted file mode 100644 index 87ac5e6ca551.. --- a/include/drm/gma_drm.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) 2007-2011, Intel Corporation. - * All Rights Reserved. - * Copyright (c) 2008, Tungsten Graphics Inc. Cedar Park, TX., USA. - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St - Fifth Floor,
[PATCH v1 3/4] drm/gma500: drop use of DRM_UDELAY wrapper
The DRM_UDELAY wrapper from drm_os_linux.h is used in a few places, all other places calls udelay() with no wrapper. There is no reason to continue to use this wrapper - so drop it and direct call udelay(). Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/gma500/mdfld_device.c| 4 ++-- drivers/gpu/drm/gma500/oaktrail_device.c | 2 +- drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/gma500/mdfld_device.c b/drivers/gpu/drm/gma500/mdfld_device.c index 585ec2e46166..edb9b1bbd6c6 100644 --- a/drivers/gpu/drm/gma500/mdfld_device.c +++ b/drivers/gpu/drm/gma500/mdfld_device.c @@ -344,7 +344,7 @@ static int mdfld_restore_display_registers(struct drm_device *dev, int pipenum) if (pipenum == 1) { /* restore palette (gamma) */ - /*DRM_UDELAY(5); */ + /* udelay(5); */ for (i = 0; i < 256; i++) PSB_WVDC32(pipe->palette[i], map->palette + (i << 2)); @@ -406,7 +406,7 @@ static int mdfld_restore_display_registers(struct drm_device *dev, int pipenum) PSB_WVDC32(pipe->conf, map->conf); /* restore palette (gamma) */ - /*DRM_UDELAY(5); */ + /* udelay(5); */ for (i = 0; i < 256; i++) PSB_WVDC32(pipe->palette[i], map->palette + (i << 2)); diff --git a/drivers/gpu/drm/gma500/oaktrail_device.c b/drivers/gpu/drm/gma500/oaktrail_device.c index f0872e2c22d5..2d8afbb51a77 100644 --- a/drivers/gpu/drm/gma500/oaktrail_device.c +++ b/drivers/gpu/drm/gma500/oaktrail_device.c @@ -327,7 +327,7 @@ static int oaktrail_restore_display_registers(struct drm_device *dev) /* Actually enable it */ PSB_WVDC32(p->dpll, MRST_DPLL_A); - DRM_UDELAY(150); + udelay(150); /* Restore mode */ PSB_WVDC32(p->htotal, HTOTAL_A); diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c index c6d72de1c054..797329028439 100644 --- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c +++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c @@ -815,7 +815,7 @@ void oaktrail_hdmi_restore(struct drm_device *dev) PSB_WVDC32(hdmi_dev->saveDPLL_ADJUST, DPLL_ADJUST); PSB_WVDC32(hdmi_dev->saveDPLL_UPDATE, DPLL_UPDATE); PSB_WVDC32(hdmi_dev->saveDPLL_CLK_ENABLE, DPLL_CLK_ENABLE); - DRM_UDELAY(150); + udelay(150); /* pipe */ PSB_WVDC32(pipeb->src, PIPEBSRC); -- 2.20.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 0/4] drm/gma500: drop use of drmP.h
The following patchset remove use of the deprecated drmP.h header file in the gma500 driver. As preparation an empty header file is removed and a dependency on drm_os_linux.h is dropped. The list of include files are sorted and is some cases divided up in blocks of linux/* drm/* etc. Build tested with allmodconfig and allyesconfig for x86, arm, alpha and more. Patchset made on top of drm-misc-next Sam Sam Ravnborg (4): drm/gma500: remove empty gma_drm.h header file drm/gma500: drop drmP.h from header files drm/gma500: drop use of DRM_UDELAY wrapper drm/gma500: drop drmp.h include from all .c files drivers/gpu/drm/gma500/accel_2d.c | 2 +- drivers/gpu/drm/gma500/cdv_device.c | 5 +++-- drivers/gpu/drm/gma500/cdv_intel_crt.c| 2 +- drivers/gpu/drm/gma500/cdv_intel_display.c| 4 +++- drivers/gpu/drm/gma500/cdv_intel_dp.c | 7 --- drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 5 +++-- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 5 ++--- drivers/gpu/drm/gma500/framebuffer.c | 2 +- drivers/gpu/drm/gma500/framebuffer.h | 1 - drivers/gpu/drm/gma500/gem.c | 5 +++-- drivers/gpu/drm/gma500/gma_device.c | 1 - drivers/gpu/drm/gma500/gma_display.c | 8 +++- drivers/gpu/drm/gma500/gtt.c | 3 ++- drivers/gpu/drm/gma500/gtt.h | 1 - drivers/gpu/drm/gma500/intel_bios.c | 4 ++-- drivers/gpu/drm/gma500/intel_bios.h | 3 +-- drivers/gpu/drm/gma500/intel_gmbus.c | 9 + drivers/gpu/drm/gma500/intel_i2c.c| 3 ++- drivers/gpu/drm/gma500/mdfld_device.c | 6 -- drivers/gpu/drm/gma500/mdfld_dsi_dpi.c| 2 ++ drivers/gpu/drm/gma500/mdfld_dsi_output.c | 5 +++-- drivers/gpu/drm/gma500/mdfld_dsi_output.h | 2 +- drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 2 ++ drivers/gpu/drm/gma500/mdfld_intel_display.c | 5 - drivers/gpu/drm/gma500/mdfld_tmd_vid.c| 2 ++ drivers/gpu/drm/gma500/mid_bios.c | 3 +-- drivers/gpu/drm/gma500/mmu.c | 4 +++- drivers/gpu/drm/gma500/oaktrail_crtc.c| 4 +++- drivers/gpu/drm/gma500/oaktrail_device.c | 7 --- drivers/gpu/drm/gma500/oaktrail_hdmi.c| 6 -- drivers/gpu/drm/gma500/oaktrail_lvds.c| 4 ++-- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c| 1 - drivers/gpu/drm/gma500/power.h| 4 +++- drivers/gpu/drm/gma500/psb_device.c | 4 ++-- drivers/gpu/drm/gma500/psb_drv.c | 26 +- drivers/gpu/drm/gma500/psb_drv.h | 4 ++-- drivers/gpu/drm/gma500/psb_intel_display.c| 3 ++- drivers/gpu/drm/gma500/psb_intel_lvds.c | 3 +-- drivers/gpu/drm/gma500/psb_intel_modes.c | 2 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 10 +- drivers/gpu/drm/gma500/psb_irq.c | 3 ++- drivers/gpu/drm/gma500/psb_irq.h | 2 +- drivers/gpu/drm/gma500/psb_lid.c | 4 ++-- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c| 8 +--- include/drm/gma_drm.h | 25 - 45 files changed, 118 insertions(+), 103 deletions(-) ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110708] this is test error
https://bugs.freedesktop.org/show_bug.cgi?id=110708 Sajid Khan changed: What|Removed |Added Resolution|--- |FIXED Status|NEEDINFO|RESOLVED -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110708] this is test error
https://bugs.freedesktop.org/show_bug.cgi?id=110708 Sajid Khan changed: What|Removed |Added Status|REOPENED|NEEDINFO -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110708] this is test error
https://bugs.freedesktop.org/show_bug.cgi?id=110708 Sajid Khan changed: What|Removed |Added Resolution|FIXED |--- Status|RESOLVED|REOPENED -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110708] this is test error
https://bugs.freedesktop.org/show_bug.cgi?id=110708 Sajid Khan changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110708] this is test error
https://bugs.freedesktop.org/show_bug.cgi?id=110708 Sajid Khan changed: What|Removed |Added Status|NEW |ASSIGNED -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110708] this is test error
https://bugs.freedesktop.org/show_bug.cgi?id=110708 Bug ID: 110708 Summary: this is test error Product: DRI Version: DRI git Hardware: Other OS: Windows (All) Status: NEW Severity: major Priority: medium Component: DRM/other Assignee: dri-devel@lists.freedesktop.org Reporter: sajid.k...@sqamail.com this is test error -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/mediatek: add dsi module reset driver
Reset dsi HW to default when power on. Prevent the setting differet between bootloader and kernel. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 35 ++ 1 file changed, 35 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index b00eb2d2e086..39ccb34a7c7f 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -21,10 +21,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include @@ -146,6 +148,8 @@ #define T_HS_EXIT 7 #define T_HS_ZERO 10 +#define MMSYS_SW_RST_DSI_B BIT(25) + #define NS_TO_CYCLE(n, c)((n) / (c) + (((n) % (c)) ? 1 : 0)) #define MTK_DSI_HOST_IS_READ(type) \ @@ -165,6 +169,8 @@ struct mtk_dsi { struct drm_panel *panel; struct drm_bridge *bridge; struct phy *phy; + struct regmap *mmsys_sw_rst_b; + u32 sw_rst_b; void __iomem *regs; @@ -238,6 +244,16 @@ static void mtk_dsi_disable(struct mtk_dsi *dsi) mtk_dsi_mask(dsi, DSI_CON_CTRL, DSI_EN, 0); } +static void mtk_dsi_reset_all(struct mtk_dsi *dsi) +{ + regmap_update_bits(dsi->mmsys_sw_rst_b, dsi->sw_rst_b, + MMSYS_SW_RST_DSI_B, ~MMSYS_SW_RST_DSI_B); + usleep_range(1000, 1100); + + regmap_update_bits(dsi->mmsys_sw_rst_b, dsi->sw_rst_b, + MMSYS_SW_RST_DSI_B, MMSYS_SW_RST_DSI_B); +} + static void mtk_dsi_reset_engine(struct mtk_dsi *dsi) { mtk_dsi_mask(dsi, DSI_CON_CTRL, DSI_RESET, DSI_RESET); @@ -831,6 +847,8 @@ static int mtk_dsi_create_conn_enc(struct drm_device *drm, struct mtk_dsi *dsi) goto err_encoder_cleanup; } + mtk_dsi_reset_all(dsi); + return 0; err_encoder_cleanup: @@ -1087,6 +1105,7 @@ static int mtk_dsi_probe(struct platform_device *pdev) struct mtk_dsi *dsi; struct device *dev = >dev; struct resource *regs; + struct regmap *regmap; int irq_num; int comp_id; int ret; @@ -1139,6 +1158,22 @@ static int mtk_dsi_probe(struct platform_device *pdev) return ret; } + regmap = syscon_regmap_lookup_by_phandle(dev->of_node, +"mediatek,syscon-dsi"); + ret = of_property_read_u32_index(dev->of_node, "mediatek,syscon-dsi", 1, +>sw_rst_b); + + if (IS_ERR(regmap)) + ret = PTR_ERR(regmap); + + if (ret) { + ret = PTR_ERR(regmap); + dev_err(dev, "Failed to get mmsys registers: %d\n", ret); + return ret; + } + + dsi->mmsys_sw_rst_b = regmap; + comp_id = mtk_ddp_comp_get_id(dev->of_node, MTK_DSI); if (comp_id < 0) { dev_err(dev, "Failed to identify by alias: %d\n", comp_id); -- 2.21.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v1 1/1] drm/bridge: drop drmP.h usage
Drop use of the deprecated drmP.h header file. While touching the list of include files: - Divide include files in blocks of linux/* drm/* etc. Followed the drm style with the most general files first - Sort individual blocks of include files Signed-off-by: Sam Ravnborg Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: David Airlie Cc: Daniel Vetter Cc: Peter Senna Tschudin Cc: Martin Donnelly Cc: Martyn Welch --- The patch is made on top of drm-misc-next. Buildtested using x86,arm,arm64,alpha + more allyesconfig + allmodconfig This is part of the ongoing effort to drop use of drmP.h. Squashed into a single patch as this touched an acceptable low amount of files - and the individual changes are trivial. With this patch drm/bridge/ no longer uses drmP.h. Sam drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 ++-- drivers/gpu/drm/bridge/analogix-anx78xx.c | 8 .../gpu/drm/bridge/analogix/analogix_dp_core.c | 15 --- drivers/gpu/drm/bridge/dumb-vga-dac.c | 2 +- drivers/gpu/drm/bridge/lvds-encoder.c | 10 ++ .../bridge/megachips-stdp-ge-b850v3-fw.c | 3 ++- drivers/gpu/drm/bridge/nxp-ptn3460.c | 3 ++- drivers/gpu/drm/bridge/panel.c | 5 ++--- drivers/gpu/drm/bridge/parade-ps8622.c | 3 ++- drivers/gpu/drm/bridge/sii902x.c | 3 ++- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 17 + drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 5 - drivers/gpu/drm/bridge/tc358764.c | 14 +- drivers/gpu/drm/bridge/thc63lvd1024.c | 10 ++ drivers/gpu/drm/bridge/ti-sn65dsi86.c | 18 ++ drivers/gpu/drm/bridge/ti-tfp410.c | 4 ++-- 16 files changed, 71 insertions(+), 53 deletions(-) diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index ec2ca71e1323..f9fff1b6f245 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -6,17 +6,17 @@ * Licensed under the GPL-2. */ +#include #include #include #include #include #include -#include -#include #include #include #include +#include #include #include diff --git a/drivers/gpu/drm/bridge/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix-anx78xx.c index c09aaf93ae1b..479ce3642a79 100644 --- a/drivers/gpu/drm/bridge/analogix-anx78xx.c +++ b/drivers/gpu/drm/bridge/analogix-anx78xx.c @@ -16,23 +16,23 @@ */ #include #include -#include +#include #include +#include #include #include #include #include #include #include -#include -#include #include +#include -#include #include #include #include #include +#include #include #include "analogix-anx78xx.h" diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 225f5e5dd69b..a0cf70c450d7 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -10,23 +10,24 @@ * option) any later version. */ -#include -#include -#include #include +#include +#include +#include +#include #include #include -#include +#include #include #include -#include -#include #include +#include -#include #include #include +#include #include +#include #include #include diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/bridge/dumb-vga-dac.c index e64736c39a9f..1a3800a58aaf 100644 --- a/drivers/gpu/drm/bridge/dumb-vga-dac.c +++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c @@ -15,9 +15,9 @@ #include #include -#include #include #include +#include #include struct dumb_vga { diff --git a/drivers/gpu/drm/bridge/lvds-encoder.c b/drivers/gpu/drm/bridge/lvds-encoder.c index ae8fc597eb38..6eaaa76970b1 100644 --- a/drivers/gpu/drm/bridge/lvds-encoder.c +++ b/drivers/gpu/drm/bridge/lvds-encoder.c @@ -7,12 +7,14 @@ * the License, or (at your option) any later version. */ -#include -#include -#include - #include +#include +#include #include +#include + +#include +#include struct lvds_encoder { struct drm_bridge bridge; diff --git a/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c b/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c index a01028ec4de6..1644d281558a 100644 --- a/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c +++ b/drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c @@ -34,11 +34,12 @@ #include #include #include + #include #include #include +#include #include -#include #define EDID_EXT_BLOCK_CNT 0x7E diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c b/drivers/gpu/drm/bridge/nxp-ptn3460.c index fb335afea4cf..3f4d4aef19e1 100644 --- a/drivers/gpu/drm/bridge/nxp-ptn3460.c +++ b/drivers/gpu/drm/bridge/nxp-ptn3460.c @@ -20,13 +20,14 @@ #include #include #include +
[PATCH 0/2] fix pwm_mtk_disp suspend/resume issues.
Change in patches: - match pwm_mtk_disp clock when suspend/resume - trigger pwm_mtk_disp reg working after config Jitao Shi (2): pwm: fine tune pwm-mtk-disp clock control flow pwm/mtk_disp: fix update reg issue when chip doesn't have commit drivers/pwm/pwm-mtk-disp.c | 50 +++--- 1 file changed, 19 insertions(+), 31 deletions(-) -- 2.21.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 2/2] pwm/mtk_disp: fix update reg issue when chip doesn't have commit
The setting of disable double buffer will lose when suspend and resume. So config them again in pwm config. Signed-off-by: Jitao Shi --- drivers/pwm/pwm-mtk-disp.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c index 27079acc3e1d..14ef981164d3 100644 --- a/drivers/pwm/pwm-mtk-disp.c +++ b/drivers/pwm/pwm-mtk-disp.c @@ -130,6 +130,13 @@ static int mtk_disp_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, mtk_disp_pwm_update_bits(mdp, mdp->data->commit, mdp->data->commit_mask, 0x0); + } else { + mtk_disp_pwm_update_bits(mdp, mdp->data->bls_debug, +mdp->data->bls_debug_mask, +mdp->data->bls_debug_mask); + mtk_disp_pwm_update_bits(mdp, mdp->data->con0, +mdp->data->con0_sel, +mdp->data->con0_sel); } clk_disable_unprepare(mdp->clk_mm); -- 2.21.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 1/2] pwm: fine tune pwm-mtk-disp clock control flow
Match pwm clock when suspend and resume. Prepare and enable disp_pwm clock when disp_pwm enable. Disable and unprepare disp_pwm clock when disp_pwm disable. Signed-off-by: Jitao Shi --- drivers/pwm/pwm-mtk-disp.c | 43 +++--- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c index 15803c71fe80..27079acc3e1d 100644 --- a/drivers/pwm/pwm-mtk-disp.c +++ b/drivers/pwm/pwm-mtk-disp.c @@ -106,13 +106,13 @@ static int mtk_disp_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, high_width = div64_u64(rate * duty_ns, div); value = period | (high_width << PWM_HIGH_WIDTH_SHIFT); - err = clk_enable(mdp->clk_main); + err = clk_prepare_enable(mdp->clk_main); if (err < 0) return err; - err = clk_enable(mdp->clk_mm); + err = clk_prepare_enable(mdp->clk_mm); if (err < 0) { - clk_disable(mdp->clk_main); + clk_disable_unprepare(mdp->clk_main); return err; } @@ -132,8 +132,8 @@ static int mtk_disp_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, 0x0); } - clk_disable(mdp->clk_mm); - clk_disable(mdp->clk_main); + clk_disable_unprepare(mdp->clk_mm); + clk_disable_unprepare(mdp->clk_main); return 0; } @@ -143,13 +143,13 @@ static int mtk_disp_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) struct mtk_disp_pwm *mdp = to_mtk_disp_pwm(chip); int err; - err = clk_enable(mdp->clk_main); + err = clk_prepare_enable(mdp->clk_main); if (err < 0) return err; - err = clk_enable(mdp->clk_mm); + err = clk_prepare_enable(mdp->clk_mm); if (err < 0) { - clk_disable(mdp->clk_main); + clk_disable_unprepare(mdp->clk_main); return err; } @@ -166,8 +166,8 @@ static void mtk_disp_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) mtk_disp_pwm_update_bits(mdp, DISP_PWM_EN, mdp->data->enable_mask, 0x0); - clk_disable(mdp->clk_mm); - clk_disable(mdp->clk_main); + clk_disable_unprepare(mdp->clk_mm); + clk_disable_unprepare(mdp->clk_main); } static const struct pwm_ops mtk_disp_pwm_ops = { @@ -202,14 +202,6 @@ static int mtk_disp_pwm_probe(struct platform_device *pdev) if (IS_ERR(mdp->clk_mm)) return PTR_ERR(mdp->clk_mm); - ret = clk_prepare(mdp->clk_main); - if (ret < 0) - return ret; - - ret = clk_prepare(mdp->clk_mm); - if (ret < 0) - goto disable_clk_main; - mdp->chip.dev = >dev; mdp->chip.ops = _disp_pwm_ops; mdp->chip.base = -1; @@ -218,7 +210,7 @@ static int mtk_disp_pwm_probe(struct platform_device *pdev) ret = pwmchip_add(>chip); if (ret < 0) { dev_err(>dev, "pwmchip_add() failed: %d\n", ret); - goto disable_clk_mm; + return ret; } platform_set_drvdata(pdev, mdp); @@ -237,24 +229,13 @@ static int mtk_disp_pwm_probe(struct platform_device *pdev) } return 0; - -disable_clk_mm: - clk_unprepare(mdp->clk_mm); -disable_clk_main: - clk_unprepare(mdp->clk_main); - return ret; } static int mtk_disp_pwm_remove(struct platform_device *pdev) { struct mtk_disp_pwm *mdp = platform_get_drvdata(pdev); - int ret; - - ret = pwmchip_remove(>chip); - clk_unprepare(mdp->clk_mm); - clk_unprepare(mdp->clk_main); - return ret; + return pwmchip_remove(>chip); } static const struct mtk_pwm_data mt2701_pwm_data = { -- 2.21.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110701] GPU faults in in Unigine Valley 1.0
https://bugs.freedesktop.org/show_bug.cgi?id=110701 --- Comment #9 from Mariusz Ceier --- (In reply to Yury Zhuravlev from comment #5) > > can you try to build mesa for previous commit? Like > > 6b3343e5d80abf162b45f0d7e977449588824706 > > > > I think we need to change the title of this bug. > > sorry, it's also unstable, but I can't reproduce error easily. Opening firefox private window causes this error every time (built with --enable-webrender and --enable-rust-simd, not sure if it makes difference). -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110701] GPU faults in in Unigine Valley 1.0
https://bugs.freedesktop.org/show_bug.cgi?id=110701 --- Comment #8 from Yury Zhuravlev --- (In reply to Christian Widmer from comment #7) > (In reply to Yury Zhuravlev from comment #6) > > 78e35df52aa2f7d770f929a0866a0faa89c261a9 radeonsi: update buffer descriptors > > in all contexts after buffer invalidation > > That is the commit I identified in comment #1 as being responsible for my > issues. I would not be surprised if reverting that one makes your faults > disappear as well. Unfortunately no, I have this issue even without that commit but not so strong. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #14 from Hameer Abbasi --- I have additional information to report: 5.1.3 fixes this somewhat, but not completely. For example, login is mostly fine, but restarting from the login screen causes crashes. I also agree that things were fine on 5.0.x -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [v3 3/3] drm/mediatek: add mt8183 dpi support
On Tue, 2019-05-07 at 15:41 +0800, CK Hu wrote: > Hi, Jitao: > > On Tue, 2019-04-16 at 13:52 +0800, Jitao Shi wrote: > > I need the commit message. Even though the code is easy to understand, > words for this patch is still necessary. > > Regards, > CK > I'll fine tune the commit message next version. Best Regards Jitao > > Signed-off-by: Jitao Shi > > --- > > drivers/gpu/drm/mediatek/mtk_dpi.c | 19 +++ > > 1 file changed, 19 insertions(+) > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c > > b/drivers/gpu/drm/mediatek/mtk_dpi.c > > index 66405159141a..fbb087218775 100644 > > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c > > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c > > @@ -681,6 +681,16 @@ static unsigned int mt2701_calculate_factor(int clock) > > return 2; > > } > > > > +static unsigned int mt8183_calculate_factor(int clock) > > +{ > > + if (clock <= 27000) > > + return 8; > > + else if (clock <= 167000) > > + return 4; > > + else > > + return 2; > > +} > > + > > static const struct mtk_dpi_conf mt8173_conf = { > > .cal_factor = mt8173_calculate_factor, > > .reg_h_fre_con = 0xe0, > > @@ -692,6 +702,12 @@ static const struct mtk_dpi_conf mt2701_conf = { > > .edge_sel_en = true, > > }; > > > > +static const struct mtk_dpi_conf mt8183_conf = { > > + .cal_factor = mt8183_calculate_factor, > > + .reg_h_fre_con = 0xe0, > > + .dual_edge = true, > > +}; > > + > > static int mtk_dpi_probe(struct platform_device *pdev) > > { > > struct device *dev = >dev; > > @@ -787,6 +803,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = { > > { .compatible = "mediatek,mt8173-dpi", > > .data = _conf, > > }, > > + { .compatible = "mediatek,mt8183-dpi", > > + .data = _conf, > > + }, > > { }, > > }; > > > > ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [v2 1/5] drm/mediatek: move mipi_dsi_host_register to probe
On Tue, 2019-05-07 at 17:52 +0800, CK Hu wrote: > Hi, Jitao: > > On Tue, 2019-04-16 at 14:04 +0800, Jitao Shi wrote: > > DSI panel driver need attach function which is inculde in > > mipi_dsi_host_ops. > > > > If mipi_dsi_host_register is not in probe, dsi panel will > > probe fail or more delay. > > I think this patch just prevent delay, not to prevent dsi panel probe > fail. In [1], you mention mipi_dsi_attach() is called in > panel_simple_dsi_probe(), but panel_simple_dsi_probe() is trigger by > mipi_dsi_host_register(), so the probe would success. > > [1] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/panel/panel-simple.c?h=v5.0-rc6#n2987 > > Yes, this just prevent delay. > > > > So move the mipi_dsi_host_register to probe from bind. > > > > Signed-off-by: Jitao Shi > > --- > > drivers/gpu/drm/mediatek/mtk_dsi.c | 50 ++ > > 1 file changed, 30 insertions(+), 20 deletions(-) > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c > > b/drivers/gpu/drm/mediatek/mtk_dsi.c > > index b00eb2d2e086..6c4ac37f983d 100644 > > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > > @@ -1045,12 +1045,6 @@ static int mtk_dsi_bind(struct device *dev, struct > > device *master, void *data) > > return ret; > > } > > > > - ret = mipi_dsi_host_register(>host); > > - if (ret < 0) { > > - dev_err(dev, "failed to register DSI host: %d\n", ret); > > - goto err_ddp_comp_unregister; > > - } > > - > > ret = mtk_dsi_create_conn_enc(drm, dsi); > > if (ret) { > > DRM_ERROR("Encoder create failed with %d\n", ret); > > @@ -1060,8 +1054,6 @@ static int mtk_dsi_bind(struct device *dev, struct > > device *master, void *data) > > return 0; > > > > err_unregister: > > - mipi_dsi_host_unregister(>host); > > -err_ddp_comp_unregister: > > mtk_ddp_comp_unregister(drm, >ddp_comp); > > return ret; > > } > > @@ -1097,31 +1089,37 @@ static int mtk_dsi_probe(struct platform_device > > *pdev) > > > > dsi->host.ops = _dsi_ops; > > dsi->host.dev = dev; > > + dsi->dev = dev; > > Why do this? > > Regards, > CK > There are some error message require this poweron(). > > + ret = mipi_dsi_host_register(>host); > > + if (ret < 0) { > > + dev_err(dev, "failed to register DSI host: %d\n", ret); > > + return ret; > > + } > > > > ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0, > > >panel, >bridge); > > if (ret) > > - return ret; > > + goto err_unregister_host; > > > > dsi->engine_clk = devm_clk_get(dev, "engine"); > > if (IS_ERR(dsi->engine_clk)) { > > ret = PTR_ERR(dsi->engine_clk); > > dev_err(dev, "Failed to get engine clock: %d\n", ret); > > - return ret; > > + goto err_unregister_host; > > } > > > > dsi->digital_clk = devm_clk_get(dev, "digital"); > > if (IS_ERR(dsi->digital_clk)) { > > ret = PTR_ERR(dsi->digital_clk); > > dev_err(dev, "Failed to get digital clock: %d\n", ret); > > - return ret; > > + goto err_unregister_host; > > } > > > > dsi->hs_clk = devm_clk_get(dev, "hs"); > > if (IS_ERR(dsi->hs_clk)) { > > ret = PTR_ERR(dsi->hs_clk); > > dev_err(dev, "Failed to get hs clock: %d\n", ret); > > - return ret; > > + goto err_unregister_host; > > } > > > > regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > > ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 110674] Crashes / Resets From AMDGPU / Radeon VII
https://bugs.freedesktop.org/show_bug.cgi?id=110674 --- Comment #13 from Chris Hodapp --- So! It turns out that things are stable with 5.0.X kernels (despite there still being some amdgpu errors in the kernel log). It's slow going because the search space is so big but I'm trying to figure out where in the commit history things actually broke. -- You are receiving this mail because: You are the assignee for the bug.___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [v2 2/5] drm/mediatek: CMDQ reg address of mt8173 is different with mt2701
On Wed, 2019-05-08 at 10:39 +0800, CK Hu wrote: > On Tue, 2019-04-16 at 14:04 +0800, Jitao Shi wrote: > > Config the different CMDQ reg address in driver data. > > > For MT8173, you change reg_cmd_off from 0x180 to 0x200, so this patch is > a bug fix. You should add a 'Fixes' tag. > > > Signed-off-by: Jitao Shi > > --- > > drivers/gpu/drm/mediatek/mtk_dsi.c | 39 +++--- > > 1 file changed, 30 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c > > b/drivers/gpu/drm/mediatek/mtk_dsi.c > > index 6c4ac37f983d..573e6bec6d36 100644 > > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > > @@ -131,7 +131,6 @@ > > #define VM_CMD_EN BIT(0) > > #define TS_VFP_EN BIT(5) > > > > -#define DSI_CMDQ0 0x180 > > #define CONFIG (0xff << 0) > > #define SHORT_PACKET 0 > > #define LONG_PACKET2 > > @@ -156,6 +155,10 @@ > > > > struct phy; > > > > +struct mtk_dsi_driver_data { > > + const u32 reg_cmdq_off; > > +}; > > + > > struct mtk_dsi { > > struct mtk_ddp_comp ddp_comp; > > struct device *dev; > > @@ -182,6 +185,7 @@ struct mtk_dsi { > > bool enabled; > > u32 irq_data; > > wait_queue_head_t irq_wait_queue; > > + struct mtk_dsi_driver_data *driver_data; > > }; > > > > static inline struct mtk_dsi *encoder_to_dsi(struct drm_encoder *e) > > @@ -934,6 +938,7 @@ static void mtk_dsi_cmdq(struct mtk_dsi *dsi, const > > struct mipi_dsi_msg *msg) > > const char *tx_buf = msg->tx_buf; > > u8 config, cmdq_size, cmdq_off, type = msg->type; > > u32 reg_val, cmdq_mask, i; > > + u32 reg_cmdq_off = dsi->driver_data->reg_cmdq_off; > > > > if (MTK_DSI_HOST_IS_READ(type)) > > config = BTA; > > @@ -953,9 +958,11 @@ static void mtk_dsi_cmdq(struct mtk_dsi *dsi, const > > struct mipi_dsi_msg *msg) > > } > > > > for (i = 0; i < msg->tx_len; i++) > > - writeb(tx_buf[i], dsi->regs + DSI_CMDQ0 + cmdq_off + i); > > + mtk_dsi_mask(dsi, (reg_cmdq_off + cmdq_off + i) & (~0x3U), > > +(0xffUL << (((i + cmdq_off) & 3U) * 8U)), > > +tx_buf[i] << (((i + cmdq_off) & 3U) * 8U)); > > You say you would follow Nicolas' suggestion here. > If i replace mtk_dsi_mask with writeb, i can't get right value from registers. I don't know why this. > > > > - mtk_dsi_mask(dsi, DSI_CMDQ0, cmdq_mask, reg_val); > > + mtk_dsi_mask(dsi, reg_cmdq_off, cmdq_mask, reg_val); > > mtk_dsi_mask(dsi, DSI_CMDQ_SIZE, CMDQ_SIZE, cmdq_size); > > } > > > > @@ -1074,10 +1081,27 @@ static const struct component_ops > > mtk_dsi_component_ops = { > > .unbind = mtk_dsi_unbind, > > }; > > > > +static const struct mtk_dsi_driver_data mt8173_dsi_driver_data = { > > + .reg_cmdq_off = 0x200, > > +}; > > + > > +static const struct mtk_dsi_driver_data mt2701_dsi_driver_data = { > > + .reg_cmdq_off = 0x180, > > +}; > > + > > +static const struct of_device_id mtk_dsi_of_match[] = { > > + { .compatible = "mediatek,mt2701-dsi", > > + .data = _dsi_driver_data }, > > + { .compatible = "mediatek,mt8173-dsi", > > + .data = _dsi_driver_data }, > > + { }, > > +}; > > + > > static int mtk_dsi_probe(struct platform_device *pdev) > > { > > struct mtk_dsi *dsi; > > struct device *dev = >dev; > > + const struct of_device_id *of_id; > > struct resource *regs; > > int irq_num; > > int comp_id; > > @@ -1101,6 +1125,9 @@ static int mtk_dsi_probe(struct platform_device *pdev) > > if (ret) > > goto err_unregister_host; > > > > + of_id = of_match_device(mtk_dsi_of_match, >dev); > > + dsi->driver_data = of_id->data; > > Maybe use of_device_get_match_data() is a more simple way. You could > refer to [1]. > > [1] > https://elixir.bootlin.com/linux/v5.1/source/drivers/gpu/drm/mediatek/mtk_disp_ovl.c#L300 > > Regards, > CK > I'll fix it next version. > > + > > dsi->engine_clk = devm_clk_get(dev, "engine"); > > if (IS_ERR(dsi->engine_clk)) { > > ret = PTR_ERR(dsi->engine_clk); > > @@ -1193,12 +1220,6 @@ static int mtk_dsi_remove(struct platform_device > > *pdev) > > return 0; > > } > > > > -static const struct of_device_id mtk_dsi_of_match[] = { > > - { .compatible = "mediatek,mt2701-dsi" }, > > - { .compatible = "mediatek,mt8173-dsi" }, > > - { }, > > -}; > > - > > struct platform_driver mtk_dsi_driver = { > > .probe = mtk_dsi_probe, > > .remove = mtk_dsi_remove, > > ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[v3 4/7] drm/mediatek: add frame size control
Our new DSI chip has frame size control. So add the driver data to control for different chips. Signed-off-by: Jitao Shi Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_dsi.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index fd367985c7fd..13c34b854a25 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -78,6 +78,7 @@ #define DSI_VBP_NL 0x24 #define DSI_VFP_NL 0x28 #define DSI_VACT_NL0x2C +#define DSI_SIZE_CON 0x38 #define DSI_HSA_WC 0x50 #define DSI_HBP_WC 0x54 #define DSI_HFP_WC 0x58 @@ -162,6 +163,7 @@ struct phy; struct mtk_dsi_driver_data { const u32 reg_cmdq_off; bool has_shadow_ctl; + bool has_size_ctl; }; struct mtk_dsi { @@ -430,6 +432,9 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi) writel(vm->vfront_porch, dsi->regs + DSI_VFP_NL); writel(vm->vactive, dsi->regs + DSI_VACT_NL); + if (dsi->driver_data->has_size_ctl) + writel(vm->vactive << 16 | vm->hactive, dsi->regs + DSI_SIZE_CON); + horizontal_sync_active_byte = (vm->hsync_len * dsi_tmp_buf_bpp - 10); if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) -- 2.21.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[v3 1/7] drm/mediatek: move mipi_dsi_host_register to probe
DSI panel driver need attach function which is inculde in mipi_dsi_host_ops. If mipi_dsi_host_register is not in probe, dsi panel will probe fail or more delay. So move the mipi_dsi_host_register to probe from bind. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 50 ++ 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index b00eb2d2e086..6c4ac37f983d 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -1045,12 +1045,6 @@ static int mtk_dsi_bind(struct device *dev, struct device *master, void *data) return ret; } - ret = mipi_dsi_host_register(>host); - if (ret < 0) { - dev_err(dev, "failed to register DSI host: %d\n", ret); - goto err_ddp_comp_unregister; - } - ret = mtk_dsi_create_conn_enc(drm, dsi); if (ret) { DRM_ERROR("Encoder create failed with %d\n", ret); @@ -1060,8 +1054,6 @@ static int mtk_dsi_bind(struct device *dev, struct device *master, void *data) return 0; err_unregister: - mipi_dsi_host_unregister(>host); -err_ddp_comp_unregister: mtk_ddp_comp_unregister(drm, >ddp_comp); return ret; } @@ -1097,31 +1089,37 @@ static int mtk_dsi_probe(struct platform_device *pdev) dsi->host.ops = _dsi_ops; dsi->host.dev = dev; + dsi->dev = dev; + ret = mipi_dsi_host_register(>host); + if (ret < 0) { + dev_err(dev, "failed to register DSI host: %d\n", ret); + return ret; + } ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0, >panel, >bridge); if (ret) - return ret; + goto err_unregister_host; dsi->engine_clk = devm_clk_get(dev, "engine"); if (IS_ERR(dsi->engine_clk)) { ret = PTR_ERR(dsi->engine_clk); dev_err(dev, "Failed to get engine clock: %d\n", ret); - return ret; + goto err_unregister_host; } dsi->digital_clk = devm_clk_get(dev, "digital"); if (IS_ERR(dsi->digital_clk)) { ret = PTR_ERR(dsi->digital_clk); dev_err(dev, "Failed to get digital clock: %d\n", ret); - return ret; + goto err_unregister_host; } dsi->hs_clk = devm_clk_get(dev, "hs"); if (IS_ERR(dsi->hs_clk)) { ret = PTR_ERR(dsi->hs_clk); dev_err(dev, "Failed to get hs clock: %d\n", ret); - return ret; + goto err_unregister_host; } regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -1129,33 +1127,35 @@ static int mtk_dsi_probe(struct platform_device *pdev) if (IS_ERR(dsi->regs)) { ret = PTR_ERR(dsi->regs); dev_err(dev, "Failed to ioremap memory: %d\n", ret); - return ret; + goto err_unregister_host; } dsi->phy = devm_phy_get(dev, "dphy"); if (IS_ERR(dsi->phy)) { ret = PTR_ERR(dsi->phy); dev_err(dev, "Failed to get MIPI-DPHY: %d\n", ret); - return ret; + goto err_unregister_host; } comp_id = mtk_ddp_comp_get_id(dev->of_node, MTK_DSI); if (comp_id < 0) { dev_err(dev, "Failed to identify by alias: %d\n", comp_id); - return comp_id; + ret = comp_id; + goto err_unregister_host; } ret = mtk_ddp_comp_init(dev, dev->of_node, >ddp_comp, comp_id, _dsi_funcs); if (ret) { dev_err(dev, "Failed to initialize component: %d\n", ret); - return ret; + goto err_unregister_host; } irq_num = platform_get_irq(pdev, 0); if (irq_num < 0) { - dev_err(>dev, "failed to request dsi irq resource\n"); - return -EPROBE_DEFER; + dev_err(>dev, "failed to get dsi irq_num: %d\n", irq_num); + ret = irq_num; + goto err_unregister_host; } irq_set_status_flags(irq_num, IRQ_TYPE_LEVEL_LOW); @@ -1163,14 +1163,24 @@ static int mtk_dsi_probe(struct platform_device *pdev) IRQF_TRIGGER_LOW, dev_name(>dev), dsi); if (ret) { dev_err(>dev, "failed to request mediatek dsi irq\n"); - return -EPROBE_DEFER; + goto err_unregister_host; } init_waitqueue_head(>irq_wait_queue); platform_set_drvdata(pdev, dsi); - return component_add(>dev, _dsi_component_ops); + ret = component_add(>dev, _dsi_component_ops); + if (ret) { + dev_err(>dev, "failed to add component: %d\n", ret); +
[v3 0/7] Support dsi for mt8183
Changes since v2: - change the video timing calc method - fine the dsi and mipitx init sequence - fine tune commit msg Changes since v1: - separate frame size and reg commit control independent patches. - fix some return values in probe - remove DSI_CMDW0 in "CMDQ reg address of mt8173 is different with mt2701" Jitao Shi (7): drm/mediatek: move mipi_dsi_host_register to probe drm/mediatek: fixes CMDQ reg address of mt8173 is different with mt2701 drm/mediatek: add dsi reg commit disable control drm/mediatek: add frame size control drm/mediatek: add mt8183 dsi driver support drm/mediatek: change the dsi phytiming calculate method drm: mediatek: adjust dsi and mipi_tx probe sequence drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +- drivers/gpu/drm/mediatek/mtk_dsi.c | 219 ++--- 2 files changed, 163 insertions(+), 58 deletions(-) -- 2.21.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[v3 2/7] drm/mediatek: fixes CMDQ reg address of mt8173 is different with mt2701
Config the different CMDQ reg address in driver data. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 6c4ac37f983d..a48db056df6c 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -131,7 +131,6 @@ #define VM_CMD_EN BIT(0) #define TS_VFP_EN BIT(5) -#define DSI_CMDQ0 0x180 #define CONFIG (0xff << 0) #define SHORT_PACKET 0 #define LONG_PACKET2 @@ -156,6 +155,10 @@ struct phy; +struct mtk_dsi_driver_data { + const u32 reg_cmdq_off; +}; + struct mtk_dsi { struct mtk_ddp_comp ddp_comp; struct device *dev; @@ -182,6 +185,7 @@ struct mtk_dsi { bool enabled; u32 irq_data; wait_queue_head_t irq_wait_queue; + const struct mtk_dsi_driver_data *driver_data; }; static inline struct mtk_dsi *encoder_to_dsi(struct drm_encoder *e) @@ -934,6 +938,7 @@ static void mtk_dsi_cmdq(struct mtk_dsi *dsi, const struct mipi_dsi_msg *msg) const char *tx_buf = msg->tx_buf; u8 config, cmdq_size, cmdq_off, type = msg->type; u32 reg_val, cmdq_mask, i; + u32 reg_cmdq_off = dsi->driver_data->reg_cmdq_off; if (MTK_DSI_HOST_IS_READ(type)) config = BTA; @@ -953,9 +958,11 @@ static void mtk_dsi_cmdq(struct mtk_dsi *dsi, const struct mipi_dsi_msg *msg) } for (i = 0; i < msg->tx_len; i++) - writeb(tx_buf[i], dsi->regs + DSI_CMDQ0 + cmdq_off + i); + mtk_dsi_mask(dsi, (reg_cmdq_off + cmdq_off + i) & (~0x3U), +(0xffUL << (((i + cmdq_off) & 3U) * 8U)), +tx_buf[i] << (((i + cmdq_off) & 3U) * 8U)); - mtk_dsi_mask(dsi, DSI_CMDQ0, cmdq_mask, reg_val); + mtk_dsi_mask(dsi, reg_cmdq_off, cmdq_mask, reg_val); mtk_dsi_mask(dsi, DSI_CMDQ_SIZE, CMDQ_SIZE, cmdq_size); } @@ -1101,6 +1108,8 @@ static int mtk_dsi_probe(struct platform_device *pdev) if (ret) goto err_unregister_host; + dsi->driver_data = of_device_get_match_data(dev); + dsi->engine_clk = devm_clk_get(dev, "engine"); if (IS_ERR(dsi->engine_clk)) { ret = PTR_ERR(dsi->engine_clk); @@ -1193,9 +1202,19 @@ static int mtk_dsi_remove(struct platform_device *pdev) return 0; } +static const struct mtk_dsi_driver_data mt8173_dsi_driver_data = { + .reg_cmdq_off = 0x200, +}; + +static const struct mtk_dsi_driver_data mt2701_dsi_driver_data = { + .reg_cmdq_off = 0x180, +}; + static const struct of_device_id mtk_dsi_of_match[] = { - { .compatible = "mediatek,mt2701-dsi" }, - { .compatible = "mediatek,mt8173-dsi" }, + { .compatible = "mediatek,mt2701-dsi", + .data = _dsi_driver_data }, + { .compatible = "mediatek,mt8173-dsi", + .data = _dsi_driver_data }, { }, }; -- 2.21.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[v3 6/7] drm/mediatek: change the dsi phytiming calculate method
Change the method of frame rate calc which can get more accurate frame rate. data rate = pixel_clock * bit_per_pixel / lanes Adjust hfp_wc to adapt the additional phy_data if MIPI_DSI_MODE_VIDEO_BURST hfp_wc = hfp * bpp - data_phy_cycles * lanes - 12 - 6; else hfp_wc = hfp * bpp - data_phy_cycles * lanes - 12; Note: //(2: 1 for sync, 1 for phy idle) data_phy_cycles = T_hs_exit + T_lpx + T_hs_prepare + T_hs_zero + 2; bpp: bit per pixel Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 119 + 1 file changed, 86 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 1165ff944889..3f51b2000c68 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -158,6 +158,25 @@ (type == MIPI_DSI_GENERIC_READ_REQUEST_2_PARAM) || \ (type == MIPI_DSI_DCS_READ)) +struct mtk_phy_timing { + u32 lpx; + u32 da_hs_prepare; + u32 da_hs_zero; + u32 da_hs_trail; + + u32 ta_go; + u32 ta_sure; + u32 ta_get; + u32 da_hs_exit; + + u32 clk_hs_zero; + u32 clk_hs_trail; + + u32 clk_hs_prepare; + u32 clk_hs_post; + u32 clk_hs_exit; +}; + struct phy; struct mtk_dsi_driver_data { @@ -182,12 +201,13 @@ struct mtk_dsi { struct clk *digital_clk; struct clk *hs_clk; - u32 data_rate; + u64 data_rate; unsigned long mode_flags; enum mipi_dsi_pixel_format format; unsigned int lanes; struct videomode vm; + struct mtk_phy_timing phy_timing; int refcount; bool enabled; u32 irq_data; @@ -221,17 +241,39 @@ static void mtk_dsi_phy_timconfig(struct mtk_dsi *dsi) { u32 timcon0, timcon1, timcon2, timcon3; u32 ui, cycle_time; + struct mtk_phy_timing *timing = >phy_timing; + + ui = 10 / dsi->data_rate; + cycle_time = 80 / dsi->data_rate; + + timing->lpx = NS_TO_CYCLE(60, cycle_time); + timing->da_hs_prepare = NS_TO_CYCLE((40 + 5 * ui), cycle_time); + timing->da_hs_zero = NS_TO_CYCLE((110 + 6 * ui), cycle_time); + timing->da_hs_trail = NS_TO_CYCLE(((0x4 * ui) + 80), cycle_time); + + if (timing->da_hs_zero > timing->da_hs_prepare) + timing->da_hs_zero -= timing->da_hs_prepare; + + timing->ta_go = 4 * timing->lpx; + timing->ta_sure = 3 * timing->lpx / 2; + timing->ta_get = 5 * timing->lpx; + timing->da_hs_exit = 2 * timing->lpx; + + timing->clk_hs_zero = NS_TO_CYCLE(0x150, cycle_time); + timing->clk_hs_trail = NS_TO_CYCLE(0x64, cycle_time) + 0xa; - ui = 1000 / dsi->data_rate + 0x01; - cycle_time = 8000 / dsi->data_rate + 0x01; + timing->clk_hs_prepare = NS_TO_CYCLE(0x40, cycle_time); + timing->clk_hs_post = NS_TO_CYCLE(80 + 52 * ui, cycle_time); + timing->clk_hs_exit = 2 * timing->lpx; - timcon0 = T_LPX | T_HS_PREP << 8 | T_HS_ZERO << 16 | T_HS_TRAIL << 24; - timcon1 = 4 * T_LPX | (3 * T_LPX / 2) << 8 | 5 * T_LPX << 16 | - T_HS_EXIT << 24; - timcon2 = ((NS_TO_CYCLE(0x64, cycle_time) + 0xa) << 24) | - (NS_TO_CYCLE(0x150, cycle_time) << 16); - timcon3 = NS_TO_CYCLE(0x40, cycle_time) | (2 * T_LPX) << 16 | - NS_TO_CYCLE(80 + 52 * ui, cycle_time) << 8; + timcon0 = timing->lpx | timing->da_hs_prepare << 8 | + timing->da_hs_zero << 16 | timing->da_hs_trail << 24; + timcon1 = timing->ta_go | timing->ta_sure << 8 | + timing->ta_get << 16 | timing->da_hs_exit << 24; + timcon2 = 1 << 8 | timing->clk_hs_zero << 16 | + timing->clk_hs_trail << 24; + timcon3 = timing->clk_hs_prepare | timing->clk_hs_post << 8 | + timing->clk_hs_exit << 16; writel(timcon0, dsi->regs + DSI_PHY_TIMECON0); writel(timcon1, dsi->regs + DSI_PHY_TIMECON1); @@ -418,7 +460,8 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi) u32 horizontal_sync_active_byte; u32 horizontal_backporch_byte; u32 horizontal_frontporch_byte; - u32 dsi_tmp_buf_bpp; + u32 dsi_tmp_buf_bpp, data_phy_cycles; + struct mtk_phy_timing *timing = >phy_timing; struct videomode *vm = >vm; @@ -433,7 +476,8 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi) writel(vm->vactive, dsi->regs + DSI_VACT_NL); if (dsi->driver_data->has_size_ctl) - writel(vm->vactive << 16 | vm->hactive, dsi->regs + DSI_SIZE_CON); + writel(vm->vactive << 16 | vm->hactive, + dsi->regs + DSI_SIZE_CON); horizontal_sync_active_byte = (vm->hsync_len * dsi_tmp_buf_bpp - 10); @@ -444,7 +488,34 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi) horizontal_backporch_byte = ((vm->hback_porch +
[v3 3/7] drm/mediatek: add dsi reg commit disable control
New DSI IP has shadow register and working reg. The register values are writen to shadow register. And then trigger with commit reg, the register values will be moved working register. This fucntion is defualt on. But this driver doesn't use this function. So add the disable control. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dsi.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index a48db056df6c..fd367985c7fd 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -131,6 +131,10 @@ #define VM_CMD_EN BIT(0) #define TS_VFP_EN BIT(5) +#define DSI_SHADOW_DEBUG 0x190U +#define FORCE_COMMIT BIT(0) +#define BYPASS_SHADOW BIT(1) + #define CONFIG (0xff << 0) #define SHORT_PACKET 0 #define LONG_PACKET2 @@ -157,6 +161,7 @@ struct phy; struct mtk_dsi_driver_data { const u32 reg_cmdq_off; + bool has_shadow_ctl; }; struct mtk_dsi { @@ -594,6 +599,11 @@ static int mtk_dsi_poweron(struct mtk_dsi *dsi) } mtk_dsi_enable(dsi); + + if (dsi->driver_data->has_shadow_ctl) + writel(FORCE_COMMIT | BYPASS_SHADOW, + dsi->regs + DSI_SHADOW_DEBUG); + mtk_dsi_reset_engine(dsi); mtk_dsi_phy_timconfig(dsi); -- 2.21.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel