[Bug 87059] Graphical glitches r9290
https://bugs.freedesktop.org/show_bug.cgi?id=87059 --- Comment #2 from smoki --- I just got that game too, but can't reproduce this on Kabini - 3.18 kernel, mesa git 043b7946, llvm 3.6~svn223349 So Jarkko i think more information is needed, so which card you use, kernel, mesa, llvm version... Also you might mention game version, because it is currently new game and frequently updated. -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141207/d48feb69/attachment.html>
[PATCH V2] drm/exynos: Add DECON driver
Hi Pankaj, On Mon, Dec 1, 2014 at 1:36 PM, Pankaj Dubey wrote: > Hi Ajay, > > On 28 November 2014 at 16:45, Ajay Kumar wrote: >> This series is based on exynos-drm-next branch of Inki Dae's tree at: >> git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git >> >> DECON(Display and Enhancement Controller) is the new IP >> in exynos7 SOC for generating video signals using pixel data. >> >> DECON driver can be used to drive 2 different interfaces on Exynos7: >> DECON-INT(video controller) and DECON-EXT(Mixer for HDMI) >> >> The existing FIMD driver code was used as a template to create >> DECON driver. Only DECON-INT is supported as of now, and >> DECON-EXT support will be added later. >> >> Signed-off-by: Akshu Agrawal >> Signed-off-by: Ajay Kumar >> --- >> Changes since V1: >> -- Address comments from Pankaj and do few cleanups. >> > > Thanks, but still I can see this needs modification, please see my comments: > >> .../devicetree/bindings/video/exynos7-decon.txt| 67 ++ >> drivers/gpu/drm/exynos/Kconfig | 13 +- >> drivers/gpu/drm/exynos/Makefile|1 + >> drivers/gpu/drm/exynos/exynos7_drm_decon.c | 1037 >> >> drivers/gpu/drm/exynos/exynos_drm_drv.c|4 + >> drivers/gpu/drm/exynos/exynos_drm_drv.h|1 + >> include/video/exynos7_decon.h | 346 +++ >> 7 files changed, 1466 insertions(+), 3 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/video/exynos7-decon.txt >> create mode 100644 drivers/gpu/drm/exynos/exynos7_drm_decon.c >> create mode 100644 include/video/exynos7_decon.h >> > > [snip] > >> +static int decon_mgr_initialize(struct exynos_drm_manager *mgr, >> + struct drm_device *drm_dev) >> +{ >> + struct decon_context *ctx = mgr_to_decon(mgr); >> + struct exynos_drm_private *priv = drm_dev->dev_private; >> + int ret; >> + >> + mgr->drm_dev = drm_dev; >> + mgr->pipe = ctx->pipe = priv->pipe++; >> + > > Do we really need 'pipe' in exynos_drm_manager and decon_context both? Will fix this. >> + /* attach this sub driver to iommu mapping if supported. */ >> + if (is_drm_iommu_supported(mgr->drm_dev)) { > > [snip] > >> +static void decon_win_mode_set(struct exynos_drm_manager *mgr, >> + struct exynos_drm_overlay *overlay) >> +{ >> + struct decon_context *ctx = mgr_to_decon(mgr); >> + struct decon_win_data *win_data; >> + int win, padding; >> + >> + if (!overlay) { >> + DRM_ERROR("overlay is NULL\n"); >> + return; >> + } >> + >> + win = overlay->zpos; >> + if (win == DEFAULT_ZPOS) >> + win = ctx->default_win; >> + >> + if (win < 0 || win >= WINDOWS_NR) >> + return; >> + >> + >> + win_data = &ctx->win_data[win]; >> + > > As I mentioned in V1, since these 5 lines are getting repeating better > we move it in one static function. It will help in reducing code > footprint. I tried this, the code readability is gone. I think its better to leave this as it is. > > [snip] > >> + >> +/** >> + * shadow_protect_win() - disable updating values from shadow registers at >> vsync >> + * >> + * @win: window to protect registers for >> + * @protect: 1 to protect (disable updates) >> + */ >> +static void decon_shadow_protect_win(struct decon_context *ctx, >> + int win, bool >> protect) >> +{ >> + u32 reg, bits, val; >> + >> + reg = SHADOWCON; > > How about using SHADOWCON directly instead of using local variable? Ok. >> + bits = SHADOWCON_WINx_PROTECT(win); >> + >> + val = readl(ctx->regs + reg); >> + if (protect) >> + val |= bits; >> + else >> + val &= ~bits; >> + writel(val, ctx->regs + reg); >> +} >> + >> +static void decon_win_commit(struct exynos_drm_manager *mgr, int zpos) >> +{ >> + struct decon_context *ctx = mgr_to_decon(mgr); >> + struct decon_win_data *win_data; >> + int win = zpos; >> + unsigned long val, alpha, blendeq; >> + unsigned int last_x; >> + unsigned int last_y; >> + >> + if (ctx->suspended) >> + return; >> + >> + if (win == DEFAULT_ZPOS) >> + win = ctx->default_win; >> + >> + if (win < 0 || win >= WINDOWS_NR) >> + return; >> + >> + win_data = &ctx->win_data[win]; >> + >> + /* If suspended, enable this on resume */ >> + if (ctx->suspended) { >> + win_data->resume = true; >> + return; >> + } >> + >> + /* > > [snip] > >> +static int decon_probe(struct platform_device *pdev) >> +{ >> + struct device *dev = &pdev->dev; >> + struct decon_context *ctx; >> + struct resource *res; >> + int ret = -EINVAL; >> + >> + if (!dev->of_nod
[Bug 87071] LLVM triggered Diagnostic Handler: unsupported call to function S2KItSaltedSHA1Generator in gpg
https://bugs.freedesktop.org/show_bug.cgi?id=87071 Bug ID: 87071 Summary: LLVM triggered Diagnostic Handler: unsupported call to function S2KItSaltedSHA1Generator in gpg Product: Mesa Version: 10.3 Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/r600 Assignee: dri-devel at lists.freedesktop.org Reporter: devurandom at gmx.net Mesa 10.3.4 / LLVM 3.5.0 / libclc 0.0.1_pre20141027 seems to be unable to compile the OpenCL function S2KItSaltedSHA1Generator from current John-The-Ripper Git [1]. The function is too long to quote here, but the signature is: inline void S2KItSaltedSHA1Generator(__global const uchar *password, int password_length, __global const uchar *salt, int count, __global uchar *key, int length) My hardware as reported by JTR is: # /usr/sbin/john -list=opencl-devices Platform #0 name: Default Platform version: OpenCL 1.1 MESA 10.3.4 Device #0 (0) name: AMD REDWOOD Device vendor: X.Org Device type:GPU (LE) Device version: OpenCL 1.1 MESA 10.3.4 Driver version: 10.3.4 Native vector widths: char 16, short 8, int 4, long 2 Preferred vector width: char 16, short 8, int 4, long 2 Global Memory: 1024.0 MB Local Memory: 32.0 KB (Local) Max memory alloc. size: 256.2 MB Max clock (MHz):700 Max Work Group Size:256 Parallel compute cores: 5 [1] https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/src/opencl/gpg_kernel.cl#L369 -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141207/33e0d98f/attachment.html>
[Bug 87071] LLVM triggered Diagnostic Handler: unsupported call to function S2KItSaltedSHA1Generator in gpg
https://bugs.freedesktop.org/show_bug.cgi?id=87071 --- Comment #1 from Dennis Schridde --- P.S: John's complete output is: # /usr/sbin/john --format=gpg-opencl [â¦] Device 0: AMD REDWOOD Build log: � Local worksize (LWS) 64, Global worksize (GWS) 8192 Loaded 1 password hash (gpg-opencl, OpenPGP / GnuPG Secret Key [SHA1 OpenCL]) Will run 2 OpenMP threads LLVM triggered Diagnostic Handler: unsupported call to function S2KItSaltedSHA1Generator in gpg Segmentation fault -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141207/1f6b6ca9/attachment-0001.html>
[PATCH 1/2] drm/exynos: fimd: Remove drm_dev and pipe members from fimd_context
ctx->drm_dev is unnecessary since it can be easily accessed via ctx->manager->drm_dev. Even the pipe variable inside fimd_context is redundant. Cleaning up the same. Signed-off-by: Ajay Kumar --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index e5810d1..157f4dd 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -159,7 +159,6 @@ struct fimd_win_data { struct fimd_context { struct exynos_drm_manager manager; struct device *dev; - struct drm_device *drm_dev; struct clk *bus_clk; struct clk *lcd_clk; void __iomem*regs; @@ -174,7 +173,6 @@ struct fimd_context { u32 i80ifcon; booli80_if; boolsuspended; - int pipe; wait_queue_head_t wait_vsync_queue; atomic_twait_vsync_event; atomic_twin_updated; @@ -298,17 +296,17 @@ static int fimd_mgr_initialize(struct exynos_drm_manager *mgr, struct exynos_drm_private *priv; priv = drm_dev->dev_private; - mgr->drm_dev = ctx->drm_dev = drm_dev; - mgr->pipe = ctx->pipe = priv->pipe++; + mgr->drm_dev = drm_dev; + mgr->pipe = priv->pipe++; /* attach this sub driver to iommu mapping if supported. */ - if (is_drm_iommu_supported(ctx->drm_dev)) { + if (is_drm_iommu_supported(mgr->drm_dev)) { /* * If any channel is already active, iommu will throw * a PAGE FAULT when enabled. So clear any channel if enabled. */ fimd_clear_channel(mgr); - drm_iommu_attach_device(ctx->drm_dev, ctx->dev); + drm_iommu_attach_device(mgr->drm_dev, ctx->dev); } return 0; @@ -319,8 +317,8 @@ static void fimd_mgr_remove(struct exynos_drm_manager *mgr) struct fimd_context *ctx = mgr_to_fimd(mgr); /* detach this sub driver from iommu mapping if supported. */ - if (is_drm_iommu_supported(ctx->drm_dev)) - drm_iommu_detach_device(ctx->drm_dev, ctx->dev); + if (is_drm_iommu_supported(mgr->drm_dev)) + drm_iommu_detach_device(mgr->drm_dev, ctx->dev); } static u32 fimd_calc_clkdiv(struct fimd_context *ctx, @@ -1001,7 +999,7 @@ static void fimd_te_handler(struct exynos_drm_manager *mgr) struct fimd_context *ctx = mgr_to_fimd(mgr); /* Checks the crtc is detached already from encoder */ - if (ctx->pipe < 0 || !ctx->drm_dev) + if (mgr->pipe < 0 || !mgr->drm_dev) return; /* @@ -1018,7 +1016,7 @@ static void fimd_te_handler(struct exynos_drm_manager *mgr) } if (test_bit(0, &ctx->irq_flags)) - drm_handle_vblank(ctx->drm_dev, ctx->pipe); + drm_handle_vblank(mgr->drm_dev, mgr->pipe); } static struct exynos_drm_manager_ops fimd_manager_ops = { @@ -1047,17 +1045,19 @@ static irqreturn_t fimd_irq_handler(int irq, void *dev_id) writel(clear_bit, ctx->regs + VIDINTCON1); /* check the crtc is detached already from encoder */ - if (ctx->pipe < 0 || !ctx->drm_dev) + if (ctx->manager.pipe < 0 || !ctx->manager.drm_dev) goto out; if (ctx->i80_if) { - exynos_drm_crtc_finish_pageflip(ctx->drm_dev, ctx->pipe); + exynos_drm_crtc_finish_pageflip(ctx->manager.drm_dev, + ctx->manager.pipe); /* Exits triggering mode */ atomic_set(&ctx->triggering, 0); } else { - drm_handle_vblank(ctx->drm_dev, ctx->pipe); - exynos_drm_crtc_finish_pageflip(ctx->drm_dev, ctx->pipe); + drm_handle_vblank(ctx->manager.drm_dev, ctx->manager.pipe); + exynos_drm_crtc_finish_pageflip(ctx->manager.drm_dev, + ctx->manager.pipe); /* set wait vsync event to zero and wake up queue. */ if (atomic_read(&ctx->wait_vsync_event)) { -- 1.7.9.5
[PATCH 2/2] drm/exynos: fimd: check error status for drm_iommu_attach_device
check error status for drm_iommu_attach_device() and make sure it propagates till the caller. Signed-off-by: Ajay Kumar --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 157f4dd..a53d35b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -294,6 +294,8 @@ static int fimd_mgr_initialize(struct exynos_drm_manager *mgr, { struct fimd_context *ctx = mgr_to_fimd(mgr); struct exynos_drm_private *priv; + int ret; + priv = drm_dev->dev_private; mgr->drm_dev = drm_dev; @@ -306,7 +308,12 @@ static int fimd_mgr_initialize(struct exynos_drm_manager *mgr, * a PAGE FAULT when enabled. So clear any channel if enabled. */ fimd_clear_channel(mgr); - drm_iommu_attach_device(mgr->drm_dev, ctx->dev); + + ret = drm_iommu_attach_device(mgr->drm_dev, ctx->dev); + if (ret) { + DRM_ERROR("drm_iommu_attach failed.\n"); + return ret; + } } return 0; @@ -1074,8 +1081,14 @@ static int fimd_bind(struct device *dev, struct device *master, void *data) { struct fimd_context *ctx = dev_get_drvdata(dev); struct drm_device *drm_dev = data; + int ret; + + ret = fimd_mgr_initialize(&ctx->manager, drm_dev); + if (ret) { + DRM_ERROR("fimd_mgr_initialize failed.\n"); + return ret; + } - fimd_mgr_initialize(&ctx->manager, drm_dev); exynos_drm_crtc_create(&ctx->manager); if (ctx->display) exynos_drm_create_enc_conn(drm_dev, ctx->display); -- 1.7.9.5
[PATCH V3] drm/exynos: Add DECON driver
This series is based on exynos-drm-next branch of Inki Dae's tree at: git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git DECON(Display and Enhancement Controller) is the new IP in exynos7 SOC for generating video signals using pixel data. DECON driver can be used to drive 2 different interfaces on Exynos7: DECON-INT(video controller) and DECON-EXT(Mixer for HDMI) The existing FIMD driver code was used as a template to create DECON driver. Only DECON-INT is supported as of now, and DECON-EXT support will be added later. Signed-off-by: Akshu Agrawal Signed-off-by: Ajay Kumar --- Changes since V1: -- Address comments from Pankaj and do few cleanups. Changes since V2: -- Address more comments from Pankaj and cleanup. .../devicetree/bindings/video/exynos7-decon.txt| 67 ++ drivers/gpu/drm/exynos/Kconfig | 13 +- drivers/gpu/drm/exynos/Makefile|1 + drivers/gpu/drm/exynos/exynos7_drm_decon.c | 1042 drivers/gpu/drm/exynos/exynos_drm_drv.c|4 + drivers/gpu/drm/exynos/exynos_drm_drv.h|1 + include/video/exynos7_decon.h | 346 +++ 7 files changed, 1471 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/exynos7-decon.txt create mode 100644 drivers/gpu/drm/exynos/exynos7_drm_decon.c create mode 100644 include/video/exynos7_decon.h diff --git a/Documentation/devicetree/bindings/video/exynos7-decon.txt b/Documentation/devicetree/bindings/video/exynos7-decon.txt new file mode 100644 index 000..14db519 --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos7-decon.txt @@ -0,0 +1,67 @@ +Device-Tree bindings for Samsung Exynos7 SoC display controller (DECON) + +DECON (Display and Enhancement Controller) is the Display Controller for the +Exynos7 series of SoCs which transfers the image data from a video memory +buffer to an external LCD interface. + +Required properties: +- compatible: value should be "samsung,exynos7-decon"; + +- reg: physical base address and length of the DECON registers set. + +- interrupt-parent: should be the phandle of the decon controller's + parent interrupt controller. + +- interrupts: should contain a list of all DECON IP block interrupts in the +order: FIFO Level, VSYNC, LCD_SYSTEM. The interrupt specifier +format depends on the interrupt controller used. + +- interrupt-names: should contain the interrupt names: "fifo", "vsync", + "lcd_sys", in the same order as they were listed in the interrupts +property. + +- pinctrl-0: pin control group to be used for this controller. + +- pinctrl-names: must contain a "default" entry. + +- clocks: must include clock specifiers corresponding to entries in the + clock-names property. + +- clock-names: list of clock names sorted in the same order as the clocks + property. Must contain "pclk_decon0", "aclk_decon0", + "decon0_eclk", "decon0_vclk". + +Optional Properties: +- samsung,power-domain: a phandle to DECON power domain node. +- display-timings: timing settings for FIMD, as described in document [1]. + Can be used in case timings cannot be provided otherwise + or to override timings provided by the panel. + +[1]: Documentation/devicetree/bindings/video/display-timing.txt + +Example: + +SoC specific DT entry: + + decon at 1393 { + compatible = "samsung,exynos7-decon"; + interrupt-parent = <&combiner>; + reg = <0x1393 0x1000>; + interrupt-names = "lcd_sys", "vsync", "fifo"; + interrupts = <0 188 0>, <0 189 0>, <0 190 0>; + clocks = <&clock_disp PCLK_DECON_INT>, +<&clock_disp ACLK_DECON_INT>, +<&clock_disp SCLK_DECON_INT_ECLK>, +<&clock_disp SCLK_DECON_INT_EXTCLKPLL>; + clock-names = "pclk_decon0", "aclk_decon0", "decon0_eclk", + "decon0_vclk"; + status = "disabled"; + }; + +Board specific DT entry: + + decon at 1393 { + pinctrl-0 = <&lcd_clk &pwm1_out>; + pinctrl-names = "default"; + status = "okay"; + }; diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 7f9f6f9..d3434cb 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -32,9 +32,16 @@ config DRM_EXYNOS_FIMD help Choose this option if you want to use Exynos FIMD for DRM. +config DRM_EXYNOS_DECON + bool "Exynos DRM DECON" + depends on DRM_EXYNOS + select FB_MODE_HELPERS + help + Choose this option if you want to use Exynos DECON for DRM. + config DRM_EXYNOS_DPI bool "EXYNOS DRM parallel output support" - depends on DRM_EXYNOS_FIMD +
[PATCH] gpu: drm: gma500: tc35876x-dsi-lvds.c: Remove unused function
Remove the function tc35876x_exit() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c | 10 -- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.h |1 - 2 files changed, 11 deletions(-) diff --git a/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c b/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c index 771ff66..3def842 100644 --- a/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c +++ b/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c @@ -817,13 +817,3 @@ void tc35876x_init(struct drm_device *dev) tc35876x_brightness_init(dev); } - -void tc35876x_exit(void) -{ - pr_debug("%s\n", __func__); - - i2c_del_driver(&tc35876x_bridge_i2c_driver); - - if (cmi_lcd_i2c_client) - i2c_del_driver(&cmi_lcd_i2c_driver); -} diff --git a/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.h b/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.h index b14b7f9..cf9d6bb 100644 --- a/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.h +++ b/drivers/gpu/drm/gma500/tc35876x-dsi-lvds.h @@ -31,7 +31,6 @@ void tc35876x_brightness_control(struct drm_device *dev, int level); void tc35876x_toshiba_bridge_panel_off(struct drm_device *dev); void tc35876x_toshiba_bridge_panel_on(struct drm_device *dev); void tc35876x_init(struct drm_device *dev); -void tc35876x_exit(void); extern const struct panel_funcs mdfld_tc35876x_funcs; -- 1.7.10.4
[Bug 73378] [drm:radeon_uvd_send_upll_ctlreq] *ERROR* Timeout setting UVD clocks!
https://bugs.freedesktop.org/show_bug.cgi?id=73378 --- Comment #11 from equeim at gmail.com --- I have the same issue with Radeon R9 280X. This happens only on cold boot. I've tried various kernels (3.14, 3.15, 3.17) without success. -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141207/6b6a76da/attachment.html>
[PATCH] tgsi/lowering: add support to lower TXP (v2)
From: Rob Clark v2: actually do perspective divide for RECT/SHADOWRECT Signed-off-by: Rob Clark Reviewed-by: Ilia Mirkin --- src/gallium/auxiliary/tgsi/tgsi_lowering.c | 46 -- src/gallium/auxiliary/tgsi/tgsi_lowering.h | 3 ++ 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_lowering.c b/src/gallium/auxiliary/tgsi/tgsi_lowering.c index b6b18db..dee6c41 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_lowering.c +++ b/src/gallium/auxiliary/tgsi/tgsi_lowering.c @@ -1031,7 +1031,10 @@ transform_samp(struct tgsi_transform_context *tctx, struct tgsi_full_instruction new_inst; /* mask is clamped coords, pmask is all coords (for projection): */ unsigned mask = 0, pmask = 0, smask; + unsigned tex = inst->Texture.Texture; unsigned opcode = inst->Instruction.Opcode; + bool lower_txp = (opcode == TGSI_OPCODE_TXP) && + (ctx->config->lower_TXP & (1 << tex)); if (opcode == TGSI_OPCODE_TXB2) { samp = &inst->Src[2]; @@ -1043,14 +1046,14 @@ transform_samp(struct tgsi_transform_context *tctx, smask = 1 << samp->Register.Index; /* check if we actually need to lower this one: */ - if (!(ctx->saturate & smask)) + if (!(ctx->saturate & smask) && !lower_txp) return -1; /* figure out which coordinates need saturating: * - RECT textures should not get saturated * - array index coords should not get saturated */ - switch (inst->Texture.Texture) { + switch (tex) { case TGSI_TEXTURE_3D: case TGSI_TEXTURE_CUBE: case TGSI_TEXTURE_CUBE_ARRAY: @@ -1081,16 +1084,19 @@ transform_samp(struct tgsi_transform_context *tctx, pmask |= TGSI_WRITEMASK_X; break; - /* TODO: I think we should ignore these? - case TGSI_TEXTURE_RECT: - case TGSI_TEXTURE_SHADOWRECT: - */ + case TGSI_TEXTURE_RECT: + case TGSI_TEXTURE_SHADOWRECT: + /* we don't saturate, but in case of lower_txp we + * still need to do the perspective divide: + */ + pmask = TGSI_WRITEMASK_XY; + break; } /* sanity check.. driver could be asking to saturate a non- * existent coordinate component: */ - if (!mask) + if (!mask && !lower_txp) return -1; /* MOV tmpA, src0 */ @@ -1126,8 +1132,10 @@ transform_samp(struct tgsi_transform_context *tctx, } /* MOV_SAT tmpA., tmpA */ - create_mov(tctx, &ctx->tmp[A].dst, &ctx->tmp[A].src, mask, - TGSI_SAT_ZERO_ONE); + if (mask) { + create_mov(tctx, &ctx->tmp[A].dst, &ctx->tmp[A].src, mask, + TGSI_SAT_ZERO_ONE); + } /* modify the texture samp instruction to take fixed up coord: */ new_inst = *inst; @@ -1462,6 +1470,7 @@ tgsi_transform_lowering(const struct tgsi_lowering_config *config, OPCS(DPH) || OPCS(DP2) || OPCS(DP2A) || + OPCS(TXP) || ctx.two_side_colors || ctx.saturate)) return NULL; @@ -1529,12 +1538,19 @@ tgsi_transform_lowering(const struct tgsi_lowering_config *config, newlen += DP2A_GROW * OPCS(DP2A); numtmp = MAX2(numtmp, DOTP_TMP); } - if (ctx.saturate) { - int n = info->opcode_count[TGSI_OPCODE_TEX] + - info->opcode_count[TGSI_OPCODE_TXP] + - info->opcode_count[TGSI_OPCODE_TXB] + - info->opcode_count[TGSI_OPCODE_TXB2] + - info->opcode_count[TGSI_OPCODE_TXL]; + if (ctx.saturate || config->lower_TXP) { + int n = 0; + + if (ctx.saturate) { + n = info->opcode_count[TGSI_OPCODE_TEX] + +info->opcode_count[TGSI_OPCODE_TXP] + +info->opcode_count[TGSI_OPCODE_TXB] + +info->opcode_count[TGSI_OPCODE_TXB2] + +info->opcode_count[TGSI_OPCODE_TXL]; + } else if (config->lower_TXP) { + n = info->opcode_count[TGSI_OPCODE_TXP]; + } + newlen += SAMP_GROW * n; numtmp = MAX2(numtmp, SAMP_TMP); } diff --git a/src/gallium/auxiliary/tgsi/tgsi_lowering.h b/src/gallium/auxiliary/tgsi/tgsi_lowering.h index 55e1507..52c204f 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_lowering.h +++ b/src/gallium/auxiliary/tgsi/tgsi_lowering.h @@ -69,6 +69,9 @@ struct tgsi_lowering_config unsigned lower_DP2:1; unsigned lower_DP2A:1; + /* bitmask of (1 << TGSI_TEXTURE_type): */ + unsigned lower_TXP; + /* To emulate certain texture wrap modes, this can be used * to saturate the specified tex coord to [0.0, 1.0]. The * bits are according to sampler #, ie. if, for example: -- 1.9.3
[Bug 87059] Graphical glitches r9290
https://bugs.freedesktop.org/show_bug.cgi?id=87059 --- Comment #3 from Jarkko K --- Can you provide me info how to get this info? Linux 3.18.0-031800rc7-generic DISTRIB_DESCRIPTION="Linux Mint 17 Qiana" [Properties] "opengl.version"="3.0 Mesa 10.5.0-devel (git-d8da6de 2014-12-06 trusty-oibaf-ppa)" -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141207/f869e1e0/attachment.html>
[Bug 87059] Graphical glitches r9290
https://bugs.freedesktop.org/show_bug.cgi?id=87059 --- Comment #4 from Jarkko K --- I think game version is 1.1.3 Also I noticed on second run that Some of those black boxes go away temporary and come back on next second. -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141207/2f0934c9/attachment.html>
[Bug 85564] Dead Island rendering issues
https://bugs.freedesktop.org/show_bug.cgi?id=85564 --- Comment #5 from Sven Arvidsson --- Does rendering improve if you add this to drirc? -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141207/1e320299/attachment.html>
[PATCH 0/20] fix misspelling of current function in string
These patches replace what appears to be a reference to the name of the current function but is misspelled in some way by either the name of the function itself, or by %s and then __func__ in an argument list. // // sudo apt-get install python-pip // sudo pip install python-Levenshtein // spatch requires the argument --in-place virtual after_start @initialize:ocaml@ @@ let extensible_functions = ref ([] : string list) let restarted = ref false let restart _ = restarted := true; let it = new iteration() in it#add_virtual_rule After_start; Printf.eprintf "restarting\n"; it#register() @initialize:python@ @@ import re from Levenshtein import distance mindist = 1 // 1 to find only misspellings maxdist = 2 ignore_leading = True // - @r0@ constant char [] c; identifier f; @@ f(...,c,...) @script:ocaml@ c << r0.c; f << r0.f; @@ (if not !restarted then restart()); match Str.split_delim (Str.regexp "%") c with _::_::_ -> if not (List.mem f !extensible_functions) then extensible_functions := f :: !extensible_functions | _ -> () // - @r depends on after_start@ constant char [] c; position p; identifier f; @@ f(...,c at p,...) @script:python flt@ c << r.c; p << r.p; matched; @@ func = p[0].current_element wpattern = "[a-zA-Z_][a-zA-Z0-9_]*" if ignore_leading: func = func.strip("_") wpattern = "[a-zA-Z][a-zA-Z0-9_]*" lf = len(func) cocci.include_match(False) // ignore extremely short function names if lf > 3: words = [w for w in re.findall(wpattern, c) if abs(len(w) - lf) <= maxdist] for w in words: d = distance(w, func) if mindist <= d and d <= maxdist: coccinelle.matched = w cocci.include_match(True) //print "%s:%d:%s():%d: %s" % (p[0].file, int(p[0].line), func, d, c) break @script:ocaml r2@ c << r.c; f << r.f; matched << flt.matched; fixed; @@ let pieces = Str.split_delim (Str.regexp_string matched) c in match pieces with [before;after] -> let preceeding = List.length(Str.split (Str.regexp_string "%") before) > 1 in if preceeding then Coccilib.include_match false else if List.mem f !extensible_functions then fixed := before ^ "%s" ^ after else Coccilib.include_match false | _ -> Coccilib.include_match false @changed1@ constant char [] r.c; identifier r2.fixed; position r.p; identifier r.f; @@ f(..., -c at p +fixed,__func__ ,...) // --- @s depends on after_start@ constant char [] c; position p; identifier f; @@ f(...,c at p,...) @script:python flt2@ c << s.c; p << s.p; matched; @@ func = p[0].current_element wpattern = "[a-zA-Z_][a-zA-Z0-9_]*" if ignore_leading: func = func.strip("_") wpattern = "[a-zA-Z][a-zA-Z0-9_]*" lf = len(func) cocci.include_match(False) // ignore extremely short function names if lf > 3: words = [w for w in re.findall(wpattern, c) if abs(len(w) - lf) <= maxdist] for w in words: d = distance(w, func) if mindist <= d and d <= maxdist: coccinelle.matched = w cocci.include_match(True) //print "%s:%d:%s():%d: %s" % (p[0].file, int(p[0].line), func, d, c) break @script:ocaml s2@ c << s.c; f << s.f; p << s.p; matched << flt2.matched; fixed; @@ let ce = (List.hd p).current_element in let pieces = Str.split_delim (Str.regexp_string matched) c in match pieces with [before;after] -> let preceeding = List.length(Str.split (Str.regexp_string "%") before) > 1 in if preceeding then Coccilib.include_match false else if List.mem f !extensible_functions then Coccilib.include_match false else fixed := before ^ ce ^ after | _ -> Coccilib.include_match false @changed2@ constant char [] s.c; identifier s2.fixed; position s.p; identifier s.f; @@ f(..., -c at p +fixed ,...) //
[PATCH] gpu: drm: i915: intel_dsi_pll.c: Remove unused function
Remove the function dsi_rr_formula() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/gpu/drm/i915/intel_dsi_pll.c | 83 +- 1 file changed, 1 insertion(+), 82 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dsi_pll.c b/drivers/gpu/drm/i915/intel_dsi_pll.c index fa7a6ca..20086e8 100644 --- a/drivers/gpu/drm/i915/intel_dsi_pll.c +++ b/drivers/gpu/drm/i915/intel_dsi_pll.c @@ -50,88 +50,7 @@ static const u32 lfsr_converts[] = { 71, 35 /* 91 - 92 */ }; -#ifdef DSI_CLK_FROM_RR - -static u32 dsi_rr_formula(const struct drm_display_mode *mode, - int pixel_format, int video_mode_format, - int lane_count, bool eotp) -{ - u32 bpp; - u32 hactive, vactive, hfp, hsync, hbp, vfp, vsync, vbp; - u32 hsync_bytes, hbp_bytes, hactive_bytes, hfp_bytes; - u32 bytes_per_line, bytes_per_frame; - u32 num_frames; - u32 bytes_per_x_frames, bytes_per_x_frames_x_lanes; - u32 dsi_bit_clock_hz; - u32 dsi_clk; - - switch (pixel_format) { - default: - case VID_MODE_FORMAT_RGB888: - case VID_MODE_FORMAT_RGB666_LOOSE: - bpp = 24; - break; - case VID_MODE_FORMAT_RGB666: - bpp = 18; - break; - case VID_MODE_FORMAT_RGB565: - bpp = 16; - break; - } - - hactive = mode->hdisplay; - vactive = mode->vdisplay; - hfp = mode->hsync_start - mode->hdisplay; - hsync = mode->hsync_end - mode->hsync_start; - hbp = mode->htotal - mode->hsync_end; - - vfp = mode->vsync_start - mode->vdisplay; - vsync = mode->vsync_end - mode->vsync_start; - vbp = mode->vtotal - mode->vsync_end; - - hsync_bytes = DIV_ROUND_UP(hsync * bpp, 8); - hbp_bytes = DIV_ROUND_UP(hbp * bpp, 8); - hactive_bytes = DIV_ROUND_UP(hactive * bpp, 8); - hfp_bytes = DIV_ROUND_UP(hfp * bpp, 8); - - bytes_per_line = DSI_HSS_PACKET_SIZE + hsync_bytes + - DSI_HSA_PACKET_EXTRA_SIZE + DSI_HSE_PACKET_SIZE + - hbp_bytes + DSI_HBP_PACKET_EXTRA_SIZE + - hactive_bytes + DSI_HACTIVE_PACKET_EXTRA_SIZE + - hfp_bytes + DSI_HFP_PACKET_EXTRA_SIZE; - - /* -* XXX: Need to accurately calculate LP to HS transition timeout and add -* it to bytes_per_line/bytes_per_frame. -*/ - - if (eotp && video_mode_format == VIDEO_MODE_BURST) - bytes_per_line += DSI_EOTP_PACKET_SIZE; - - bytes_per_frame = vsync * bytes_per_line + vbp * bytes_per_line + - vactive * bytes_per_line + vfp * bytes_per_line; - - if (eotp && - (video_mode_format == VIDEO_MODE_NON_BURST_WITH_SYNC_PULSE || -video_mode_format == VIDEO_MODE_NON_BURST_WITH_SYNC_EVENTS)) - bytes_per_frame += DSI_EOTP_PACKET_SIZE; - - num_frames = drm_mode_vrefresh(mode); - bytes_per_x_frames = num_frames * bytes_per_frame; - - bytes_per_x_frames_x_lanes = bytes_per_x_frames / lane_count; - - /* the dsi clock is divided by 2 in the hardware to get dsi ddr clock */ - dsi_bit_clock_hz = bytes_per_x_frames_x_lanes * 8; - dsi_clk = dsi_bit_clock_hz / 1000; - - if (eotp && video_mode_format == VIDEO_MODE_BURST) - dsi_clk *= 2; - - return dsi_clk; -} - -#else +#ifndef DSI_CLK_FROM_RR /* Get DSI clock from pixel clock */ static u32 dsi_clk_from_pclk(u32 pclk, int pixel_format, int lane_count) -- 1.7.10.4
[PATCH 7/20] drm/i915: fix misspelling of current function in string
Replace a misspelled function name by %s and then __func__. This was done using Coccinelle, including the use of Levenshtein distance, as proposed by Rasmus Villemoes. Signed-off-by: Julia Lawall --- The semantic patch is difficult to summarize, but is available in the cover letter of this patch series. The message is sort of ambiguous, but I assume that it is intended to refer to the function in which the problem is detected. drivers/gpu/drm/i915/i915_gem.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index d2ba315..fa21d1c 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4335,7 +4335,7 @@ i915_gem_unpin_ioctl(struct drm_device *dev, void *data, } if (obj->pin_filp != file) { - DRM_DEBUG("Not pinned by caller in i915_gem_pin_ioctl(): %d\n", + DRM_DEBUG("Not pinned by caller in %s(): %d\n", __func__, args->handle); ret = -EINVAL; goto out;
[PATCH] gpu: drm: i915: intel_dp.c: Remove unused function
Remove the function intel_dp_set_drrs_state() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/gpu/drm/i915/intel_dp.c | 89 -- drivers/gpu/drm/i915/intel_drv.h |1 - 2 files changed, 90 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 5ad45bf..6df948b 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4810,95 +4810,6 @@ intel_dp_init_panel_power_sequencer_registers(struct drm_device *dev, I915_READ(pp_div_reg)); } -void intel_dp_set_drrs_state(struct drm_device *dev, int refresh_rate) -{ - struct drm_i915_private *dev_priv = dev->dev_private; - struct intel_encoder *encoder; - struct intel_dp *intel_dp = NULL; - struct intel_crtc_config *config = NULL; - struct intel_crtc *intel_crtc = NULL; - struct intel_connector *intel_connector = dev_priv->drrs.connector; - u32 reg, val; - enum edp_drrs_refresh_rate_type index = DRRS_HIGH_RR; - - if (refresh_rate <= 0) { - DRM_DEBUG_KMS("Refresh rate should be positive non-zero.\n"); - return; - } - - if (intel_connector == NULL) { - DRM_DEBUG_KMS("DRRS supported for eDP only.\n"); - return; - } - - /* -* FIXME: This needs proper synchronization with psr state. But really -* hard to tell without seeing the user of this function of this code. -* Check locking and ordering once that lands. -*/ - if (INTEL_INFO(dev)->gen < 8 && intel_edp_is_psr_enabled(dev)) { - DRM_DEBUG_KMS("DRRS is disabled as PSR is enabled\n"); - return; - } - - encoder = intel_attached_encoder(&intel_connector->base); - intel_dp = enc_to_intel_dp(&encoder->base); - intel_crtc = encoder->new_crtc; - - if (!intel_crtc) { - DRM_DEBUG_KMS("DRRS: intel_crtc not initialized\n"); - return; - } - - config = &intel_crtc->config; - - if (intel_dp->drrs_state.type < SEAMLESS_DRRS_SUPPORT) { - DRM_DEBUG_KMS("Only Seamless DRRS supported.\n"); - return; - } - - if (intel_connector->panel.downclock_mode->vrefresh == refresh_rate) - index = DRRS_LOW_RR; - - if (index == intel_dp->drrs_state.refresh_rate_type) { - DRM_DEBUG_KMS( - "DRRS requested for previously set RR...ignoring\n"); - return; - } - - if (!intel_crtc->active) { - DRM_DEBUG_KMS("eDP encoder disabled. CRTC not Active\n"); - return; - } - - if (INTEL_INFO(dev)->gen > 6 && INTEL_INFO(dev)->gen < 8) { - reg = PIPECONF(intel_crtc->config.cpu_transcoder); - val = I915_READ(reg); - if (index > DRRS_HIGH_RR) { - val |= PIPECONF_EDP_RR_MODE_SWITCH; - intel_dp_set_m_n(intel_crtc); - } else { - val &= ~PIPECONF_EDP_RR_MODE_SWITCH; - } - I915_WRITE(reg, val); - } - - /* -* mutex taken to ensure that there is no race between differnt -* drrs calls trying to update refresh rate. This scenario may occur -* in future when idleness detection based DRRS in kernel and -* possible calls from user space to set differnt RR are made. -*/ - - mutex_lock(&intel_dp->drrs_state.mutex); - - intel_dp->drrs_state.refresh_rate_type = index; - - mutex_unlock(&intel_dp->drrs_state.mutex); - - DRM_DEBUG_KMS("eDP Refresh Rate set to : %dHz\n", refresh_rate); -} - static struct drm_display_mode * intel_dp_drrs_init(struct intel_digital_port *intel_dig_port, struct intel_connector *intel_connector, diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index ba71522..6ad239d 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -941,7 +941,6 @@ void intel_edp_panel_on(struct intel_dp *intel_dp); void intel_edp_panel_off(struct intel_dp *intel_dp); void intel_edp_psr_enable(struct intel_dp *intel_dp); void intel_edp_psr_disable(struct intel_dp *intel_dp); -void intel_dp_set_drrs_state(struct drm_device *dev, int refresh_rate); void intel_edp_psr_invalidate(struct drm_device *dev, unsigned frontbuffer_bits); void intel_edp_psr_flush(struct drm_device *dev, -- 1.7.10.4
[PATCH] gpu: drm: i915: intel_sideband.c: Remove some unused functions
Removes some functions that are not used anywhere: vlv_flisdsi_read() vlv_gps_core_write() vlv_gps_core_read() vlv_ccu_write() vlv_ccu_read() vlv_gpio_nc_read() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/gpu/drm/i915/i915_drv.h |6 - drivers/gpu/drm/i915/intel_sideband.c | 44 - 2 files changed, 50 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 16a6f6d..d248957 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2849,23 +2849,17 @@ int sandybridge_pcode_write(struct drm_i915_private *dev_priv, u8 mbox, u32 val) u32 vlv_punit_read(struct drm_i915_private *dev_priv, u8 addr); void vlv_punit_write(struct drm_i915_private *dev_priv, u8 addr, u32 val); u32 vlv_nc_read(struct drm_i915_private *dev_priv, u8 addr); -u32 vlv_gpio_nc_read(struct drm_i915_private *dev_priv, u32 reg); void vlv_gpio_nc_write(struct drm_i915_private *dev_priv, u32 reg, u32 val); u32 vlv_cck_read(struct drm_i915_private *dev_priv, u32 reg); void vlv_cck_write(struct drm_i915_private *dev_priv, u32 reg, u32 val); -u32 vlv_ccu_read(struct drm_i915_private *dev_priv, u32 reg); -void vlv_ccu_write(struct drm_i915_private *dev_priv, u32 reg, u32 val); u32 vlv_bunit_read(struct drm_i915_private *dev_priv, u32 reg); void vlv_bunit_write(struct drm_i915_private *dev_priv, u32 reg, u32 val); -u32 vlv_gps_core_read(struct drm_i915_private *dev_priv, u32 reg); -void vlv_gps_core_write(struct drm_i915_private *dev_priv, u32 reg, u32 val); u32 vlv_dpio_read(struct drm_i915_private *dev_priv, enum pipe pipe, int reg); void vlv_dpio_write(struct drm_i915_private *dev_priv, enum pipe pipe, int reg, u32 val); u32 intel_sbi_read(struct drm_i915_private *dev_priv, u16 reg, enum intel_sbi_destination destination); void intel_sbi_write(struct drm_i915_private *dev_priv, u16 reg, u32 value, enum intel_sbi_destination destination); -u32 vlv_flisdsi_read(struct drm_i915_private *dev_priv, u32 reg); void vlv_flisdsi_write(struct drm_i915_private *dev_priv, u32 reg, u32 val); int vlv_gpu_freq(struct drm_i915_private *dev_priv, int val); diff --git a/drivers/gpu/drm/i915/intel_sideband.c b/drivers/gpu/drm/i915/intel_sideband.c index 01d841e..5939171 100644 --- a/drivers/gpu/drm/i915/intel_sideband.c +++ b/drivers/gpu/drm/i915/intel_sideband.c @@ -129,14 +129,6 @@ u32 vlv_nc_read(struct drm_i915_private *dev_priv, u8 addr) return val; } -u32 vlv_gpio_nc_read(struct drm_i915_private *dev_priv, u32 reg) -{ - u32 val = 0; - vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_GPIO_NC, - SB_CRRDDA_NP, reg, &val); - return val; -} - void vlv_gpio_nc_write(struct drm_i915_private *dev_priv, u32 reg, u32 val) { vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_GPIO_NC, @@ -157,34 +149,6 @@ void vlv_cck_write(struct drm_i915_private *dev_priv, u32 reg, u32 val) SB_CRWRDA_NP, reg, &val); } -u32 vlv_ccu_read(struct drm_i915_private *dev_priv, u32 reg) -{ - u32 val = 0; - vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_CCU, - SB_CRRDDA_NP, reg, &val); - return val; -} - -void vlv_ccu_write(struct drm_i915_private *dev_priv, u32 reg, u32 val) -{ - vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_CCU, - SB_CRWRDA_NP, reg, &val); -} - -u32 vlv_gps_core_read(struct drm_i915_private *dev_priv, u32 reg) -{ - u32 val = 0; - vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_GPS_CORE, - SB_CRRDDA_NP, reg, &val); - return val; -} - -void vlv_gps_core_write(struct drm_i915_private *dev_priv, u32 reg, u32 val) -{ - vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_GPS_CORE, - SB_CRWRDA_NP, reg, &val); -} - u32 vlv_dpio_read(struct drm_i915_private *dev_priv, enum pipe pipe, int reg) { u32 val = 0; @@ -267,14 +231,6 @@ void intel_sbi_write(struct drm_i915_private *dev_priv, u16 reg, u32 value, } } -u32 vlv_flisdsi_read(struct drm_i915_private *dev_priv, u32 reg) -{ - u32 val = 0; - vlv_sideband_rw(dev_priv, DPIO_DEVFN, IOSF_PORT_FLISDSI, SB_CRRDDA_NP, - reg, &val); - return val; -} - void vlv_flisdsi_write(struct drm_i915_private *dev_priv, u32 reg, u32 val) { vlv_sideband_rw(dev_priv, DPIO_DEVFN, IOSF_PORT_FLISDSI, SB_CRWRDA_NP, -- 1.7.10.4
[PATCH] gpu: drm: i915: intel_display.c: Remove unused function
Remove the function intel_output_name() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/gpu/drm/i915/intel_display.c | 22 -- drivers/gpu/drm/i915/intel_drv.h |1 - 2 files changed, 23 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f0a1a56..14c47cf 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -12258,28 +12258,6 @@ static bool has_edp_a(struct drm_device *dev) return true; } -const char *intel_output_name(int output) -{ - static const char *names[] = { - [INTEL_OUTPUT_UNUSED] = "Unused", - [INTEL_OUTPUT_ANALOG] = "Analog", - [INTEL_OUTPUT_DVO] = "DVO", - [INTEL_OUTPUT_SDVO] = "SDVO", - [INTEL_OUTPUT_LVDS] = "LVDS", - [INTEL_OUTPUT_TVOUT] = "TV", - [INTEL_OUTPUT_HDMI] = "HDMI", - [INTEL_OUTPUT_DISPLAYPORT] = "DisplayPort", - [INTEL_OUTPUT_EDP] = "eDP", - [INTEL_OUTPUT_DSI] = "DSI", - [INTEL_OUTPUT_UNKNOWN] = "Unknown", - }; - - if (output < 0 || output >= ARRAY_SIZE(names) || !names[output]) - return "Invalid"; - - return names[output]; -} - static bool intel_crt_present(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index ba71522..7dde496 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -793,7 +793,6 @@ void intel_ddi_clock_get(struct intel_encoder *encoder, void intel_ddi_set_vc_payload_alloc(struct drm_crtc *crtc, bool state); /* intel_display.c */ -const char *intel_output_name(int output); bool intel_has_pending_fb_unpin(struct drm_device *dev); int intel_pch_rawclk(struct drm_device *dev); void intel_mark_busy(struct drm_device *dev); -- 1.7.10.4
[PATCH 17/20] drm/i2c: tda998x: fix misspelling of current function in string
Replace a misspelled function name by %s and then __func__. This was done using Coccinelle, including the use of Levenshtein distance, as proposed by Rasmus Villemoes. Signed-off-by: Julia Lawall --- The semantic patch is difficult to summarize, but is available in the cover letter of this patch series. drivers/gpu/drm/i2c/tda998x_drv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index d476279..14acac8 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -385,7 +385,7 @@ set_page(struct tda998x_priv *priv, uint16_t reg) }; int ret = i2c_master_send(client, buf, sizeof(buf)); if (ret < 0) { - dev_err(&client->dev, "setpage %04x err %d\n", + dev_err(&client->dev, "%s %04x err %d\n", __func__, reg, ret); return ret; }
[PATCH 20/20] drm/radeon: fix misspelling of current function in string
Replace a misspelled function name by %s and then __func__. This was done using Coccinelle, including the use of Levenshtein distance, as proposed by Rasmus Villemoes. Signed-off-by: Julia Lawall --- The semantic patch is difficult to summarize, but is available in the cover letter of this patch series. drivers/gpu/drm/radeon/cik.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index 6dcde37..24d5e43 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -7367,34 +7367,38 @@ int cik_irq_set(struct radeon_device *rdev) } if (atomic_read(&rdev->irq.ring_int[CAYMAN_RING_TYPE_CP1_INDEX])) { struct radeon_ring *ring = &rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX]; - DRM_DEBUG("si_irq_set: sw int cp1\n"); + DRM_DEBUG("%s: sw int cp1\n", __func__); if (ring->me == 1) { switch (ring->pipe) { case 0: cp_m1p0 |= TIME_STAMP_INT_ENABLE; break; default: - DRM_DEBUG("si_irq_set: sw int cp1 invalid pipe %d\n", ring->pipe); + DRM_DEBUG("%s: sw int cp1 invalid pipe %d\n", + __func__, ring->pipe); break; } } else { - DRM_DEBUG("si_irq_set: sw int cp1 invalid me %d\n", ring->me); + DRM_DEBUG("%s: sw int cp1 invalid me %d\n", __func__, + ring->me); } } if (atomic_read(&rdev->irq.ring_int[CAYMAN_RING_TYPE_CP2_INDEX])) { struct radeon_ring *ring = &rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX]; - DRM_DEBUG("si_irq_set: sw int cp2\n"); + DRM_DEBUG("%s: sw int cp2\n", __func__); if (ring->me == 1) { switch (ring->pipe) { case 0: cp_m1p0 |= TIME_STAMP_INT_ENABLE; break; default: - DRM_DEBUG("si_irq_set: sw int cp2 invalid pipe %d\n", ring->pipe); + DRM_DEBUG("%s: sw int cp2 invalid pipe %d\n", + __func__, ring->pipe); break; } } else { - DRM_DEBUG("si_irq_set: sw int cp2 invalid me %d\n", ring->me); + DRM_DEBUG("%s: sw int cp2 invalid me %d\n", __func__, + ring->me); } }
[PATCH] drm/i915: Fix comparison bug
->stolen->start has type unsigned long; relying on the difference (effectively cast to int) for sorting is wrong. Signed-off-by: Rasmus Villemoes --- drivers/gpu/drm/i915/i915_debugfs.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 063b44817e08..adfb863bb580 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -236,7 +236,11 @@ static int obj_rank_by_stolen(void *priv, struct drm_i915_gem_object *b = container_of(B, struct drm_i915_gem_object, obj_exec_link); - return a->stolen->start - b->stolen->start; + if (a->stolen->start < b->stolen->start) + return -1; + if (a->stolen->start > b->stolen->start) + return 1; + return 0; } static int i915_gem_stolen_list_info(struct seq_file *m, void *data) -- 2.1.3
[PATCH] gpu: drm: i915: intel_dsi_cmd.c: Remove unused function
Remove the function dsi_hs_mode_enable() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/gpu/drm/i915/intel_dsi_cmd.c | 21 - drivers/gpu/drm/i915/intel_dsi_cmd.h |2 -- 2 files changed, 23 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dsi_cmd.c b/drivers/gpu/drm/i915/intel_dsi_cmd.c index f4767fd..71addcc 100644 --- a/drivers/gpu/drm/i915/intel_dsi_cmd.c +++ b/drivers/gpu/drm/i915/intel_dsi_cmd.c @@ -103,27 +103,6 @@ enum dsi_type { DSI_GENERIC, }; -/* enable or disable command mode hs transmissions */ -void dsi_hs_mode_enable(struct intel_dsi *intel_dsi, bool enable) -{ - struct drm_encoder *encoder = &intel_dsi->base.base; - struct drm_device *dev = encoder->dev; - struct drm_i915_private *dev_priv = dev->dev_private; - struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); - enum pipe pipe = intel_crtc->pipe; - u32 temp; - u32 mask = DBI_FIFO_EMPTY; - - if (wait_for((I915_READ(MIPI_GEN_FIFO_STAT(pipe)) & mask) == mask, 50)) - DRM_ERROR("Timeout waiting for DBI FIFO empty\n"); - - temp = I915_READ(MIPI_HS_LP_DBI_ENABLE(pipe)); - temp &= DBI_HS_LP_MODE_MASK; - I915_WRITE(MIPI_HS_LP_DBI_ENABLE(pipe), enable ? DBI_HS_MODE : DBI_LP_MODE); - - intel_dsi->hs = enable; -} - static int dsi_vc_send_short(struct intel_dsi *intel_dsi, int channel, u8 data_type, u16 data) { diff --git a/drivers/gpu/drm/i915/intel_dsi_cmd.h b/drivers/gpu/drm/i915/intel_dsi_cmd.h index 46aa1ac..7ad54c0 100644 --- a/drivers/gpu/drm/i915/intel_dsi_cmd.h +++ b/drivers/gpu/drm/i915/intel_dsi_cmd.h @@ -36,8 +36,6 @@ #define DPI_LP_MODE_EN false #define DPI_HS_MODE_EN true -void dsi_hs_mode_enable(struct intel_dsi *intel_dsi, bool enable); - int dsi_vc_dcs_write(struct intel_dsi *intel_dsi, int channel, const u8 *data, int len); -- 1.7.10.4
WARNING: /usr/projects/linux/linux/drivers/gpu/drm/i915/intel_pm.c:6585 intel_display_power_put+0x4b/0x116 [i915]()
This is an update to a problem which I reported several months ago (see below). The symptoms have changed a bit since then, but they've stablized since 3.17 and 3.18-rcX, and while annoying, it's tolerable, so I've been living with it. What I'm basically seeing now is that any external monitor (either a Dell 30" or Dell 24") will be seen after a reboot or a restart of the X server. But if suspend the laptop, disconnect from the dock, and resume, and then later on, reconnect to the dock, the external monitors are not visible until I kill and restart the X server. Another part of the symptom is when I try to probe for the monitors, using either xrandr or xfce4-display-settings, the system freezes for a second or two, and then when it recovers, if I look in the logs, I see the following warning message, repeated twice: [246289.614639] WARNING: CPU: 0 PID: 29875 at /usr/projects/linux/linux/drivers/gpu/drm/i915/intel_pm.c:6585 intel_display_power_put+0x4b/0x116 [i915]() [246289.614640] Modules linked in: iptable_filter ip_tables x_tables rfcomm ctr ccm binfmt_misc bnep hid_generic usbhid uvcvideo hid videobuf2_vmalloc videobuf2_memops videobuf2_core btusb bluetooth snd_hda_codec_hdmi x86_pkg_temp_thermal intel_powerclamp crc32_pclmul ghash_clmulni_intel pcspkr serio_raw i2c_i801 thinkpad_acpi nvram snd_hda_codec_realtek snd_hda_codec_generic tpm_tis iwlmvm mac80211 i915 drm_kms_helper drm iwlwifi intel_smartconnect intel_gtt snd_hda_intel cfg80211 lpc_ich mfd_core snd_hda_controller snd_hda_codec xhci_pci snd_hwdep xhci_hcd kvm_intel kvm ecryptfs encrypted_keys trusted tpm parport_pc ppdev lp parport autofs4 btrfs xor raid6_pq microcode ehci_pci ehci_hcd e1000e ptp pps_core [246289.614675] CPU: 0 PID: 29875 Comm: Xorg Tainted: GW 3.18.0-rc7-00028-g455e143 #108 [246289.614676] Hardware name: LENOVO 20BECTO1WW/20BECTO1WW, BIOS GMET59WW (2.07 ) 02/12/2014 [246289.614677] 0009 8802048e3a68 815cb640 0006 [246289.614679] 8802048e3aa8 8106de00 8802048e3aa8 [246289.614681] a04a7441 880405610044 88040561 880405438890 [246289.614683] Call Trace: [246289.614689] [] dump_stack+0x4e/0x68 [246289.614692] [] warn_slowpath_common+0x81/0x9b [246289.614702] [] ? intel_display_power_put+0x4b/0x116 [i915] [246289.614704] [] warn_slowpath_null+0x1a/0x1c [246289.614713] [] intel_display_power_put+0x4b/0x116 [i915] [246289.614731] [] modeset_update_crtc_power_domains+0xd8/0x117 [i915] [246289.614746] [] haswell_modeset_global_resources+0xe/0x10 [i915] [246289.614760] [] __intel_set_mode+0x9a5/0x1204 [i915] [246289.614775] [] ? intel_crtc_set_config+0x151/0xa98 [i915] [246289.614789] [] intel_set_mode+0x16/0x2f [i915] [246289.614802] [] intel_crtc_set_config+0x7b2/0xa98 [i915] [246289.614815] [] drm_mode_set_config_internal+0x59/0xe5 [drm] [246289.614823] [] drm_framebuffer_remove+0x8e/0x104 [drm] [246289.614832] [] drm_mode_rmfb+0xdc/0x101 [drm] [246289.614839] [] drm_ioctl+0x38a/0x429 [drm] [246289.614847] [] ? drm_mode_addfb2+0x30/0x30 [drm] [246289.614849] [] ? avc_has_perm+0x35/0x99 [246289.614852] [] ? read_seqcount_begin.constprop.25+0x5a/0x70 [246289.614855] [] do_vfs_ioctl+0x3ab/0x45e [246289.614857] [] ? file_has_perm+0x5d/0x81 [246289.614859] [] ? __audit_syscall_entry+0xcd/0xef [246289.614861] [] SyS_ioctl+0x5a/0x7f [246289.614864] [] system_call_fastpath+0x16/0x1b [246289.614865] ---[ end trace 238ba2a27a19ffce ]--- (The above stack trace came from a 3.17-rc7 based kernel.) Looking at the code, we seem to be triggering on the following WARN_ON in intel_display_power_put: WARN_ON(!power_domains->domain_use_count[domain]); power_domains->domain_use_count[domain]--; This warning does *not* appear after a fresh reboot, logging in, and then running xfce4-display-settings, so I assume that part of the problem is that the internal kernel state is getting corrupted when the laptop is undocked and the display disappears while the laptop is suspend, and the internal state inconsistency / corruption persists even though killing and restarting the X server seems to make things the external display monitor become visible again. This is consistent with the observation that sometimes the laptop will lock up after either (a) resuming with the dock attached or (b) if the external monitor is accidentally powered off (the power button on the dell monitor is way too easy to accidentally hit), and the only way to recover is with a magic sysrq reboot or a forced power cycle. This is a not a regression, and it's been this way for several months (including 3.17.0), but I've been too busy to really try to debug this until now. Hopefully the above is helpful; if there's anything more debugging information I can get, let me know!! - Ted On Tue, Sep 02, 2014 at 12:05:27AM -0400, Theodore Ts'o wrote: > I recently upgraded to v3.17
[PATCH 0/20] fix misspelling of current function in string
On Sun, 2014-12-07 at 20:20 +0100, Julia Lawall wrote: > These patches replace what appears to be a reference to the name of the > current function but is misspelled in some way by either the name of the > function itself, or by %s and then __func__ in an argument list. At least a few of these seem to be function tracing style uses that might as well be deleted instead.
WARNING: /usr/projects/linux/linux/drivers/gpu/drm/i915/intel_pm.c:6585 intel_display_power_put+0x4b/0x116 [i915]()
On Mon, Dec 08, 2014 at 12:32:01PM +1000, Dave Airlie wrote: > > I suspect a lot of the problems are just that xfce isn't sufficiently handling > randr events, and it is getting out of sync, it is like hotplug networking > before NetworkManager etc. Yes, I've seen this on XFCE 4.11 (in Ubuntu), although I haen't seen it in XFCE 4.10 (in Debian). In 4.11, when xfce gets out of sync, xrandr --auto will allow me to enable the display, even when xfce4-display-settings does not. However, on my T540p with the monitors connected via the dock, which is the problem I was describing here, xrandr --auto does *not* fix things up. So I think it's a different problem, since I can see this problem even if I don't use xfce4-display-settings, and just use xrandr directly. - Ted