[radeonsi, regression, bisected] All my Steam games fail to load into the 3D-engine-powered part (SIGPWR and SIGXCPU)
Kai Wasserbäch wrote on 15.11.2014 22:22: > Kai Wasserbäch wrote on 15.11.2014 16:33: >> Is there anything besides a bisect you would need to debug this? > > Ok, I did a bisection, but that time was wasted for sure. My "first bad > commit" > isn't bad at all. Is there any way to improve that experience? I'm really > loathe > to go through the dozen boots again, just to get another broken bisection. Ok, after looking at the changes for radeon I decided to try the HEAD of drm-next-3.19 (c81b99423bd9d3fc35ac8752ca5fb4c50eab063c). That was still good. Armed with this much smaller bisection range, I came up with a result that sounds at least believable: 3cd76f3901e73a4a61d78c4526dcbf6d87c9a928 is the first bad commit commit 3cd76f3901e73a4a61d78c4526dcbf6d87c9a928 Author: Christian König Date: Mon Oct 13 12:41:47 2014 +0200 drm/radeon: update the VM after setting BO address (v2) This way the necessary VM update is kicked off immediately if all BOs involved are in GPU accessible memory. v2: fix vm lock handling Signed-off-by: Christian König Signed-off-by: Alex Deucher :04 04 5bb1cc4497cc2e5b9af3a59170d7a8d5c99fd0a0 3df4996bc1a25f9275b833c778cdc33a30b28838 M drivers CCing Christian, maybe he has an idea, what's up. Let me know, if you need something else, to debug this or if I should file this as a bug. > I noticed, however, that the following line is showing up with be762d181e in > dmesg: > [drm:ci_dpm_init [radeon]] *ERROR* Invalid PCC GPIO!== power state 0 == This seems to be unrelated as it shows up with all the commits from the 3.19 branch, I've tested for this bisection run, even those, that worked. (Might this be, however, related to <https://bugs.freedesktop.org/show_bug.cgi?id=82201>?) Cheers, Kai -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 648 bytes Desc: OpenPGP digital signature URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141116/16a85f91/attachment.sig>
[radeonsi, regression] All my Steam games fail to load into the 3D-engine-powered part (SIGPWR and SIGXCPU)
Andy Furniss wrote on 15.11.2014 23:29: > Kai Wasserbäch wrote: >> Kai Wasserbäch wrote on 15.11.2014 16:33: >>> Is there anything besides a bisect you would need to debug this? >> >> Ok, I did a bisection, but that time was wasted for sure. My "first bad >> commit" >> isn't bad at all. Is there any way to improve that experience? I'm really >> loathe >> to go through the dozen boots again, just to get another broken bisection. > > So you don't have any bads at all on linus kernel? Oh, yes, that was the problem. The bad commit was so obviously not the cause for my issue and way down in Linus merge land, that I was sure that git bisect must have skipped a bit too much somewhere (or I made a mistake with some record). > Of course it's possible our issues aren't the same anyway. Looking at the backtrace you've posted, I would say so. Your bug seems to happen somewhere else. In any case, I managed to hunt my commit down. Cheers, Kai -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 648 bytes Desc: OpenPGP digital signature URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141116/d278f2b9/attachment.sig>
[PATCH 5/7] drm/exynos: fimd: modify I80 i/f interrupt relevant routine
Hi Inki, On 11/14/2014 10:36 AM, Inki Dae wrote: > On 2014ë 10ì 01ì¼ 15:19, YoungJun Cho wrote: >> For the I80 interface, the video interrupt pending register(VIDINTCON1) >> should be handled in fimd_irq_handler() and the video interrupt control >> register(VIDINTCON0) should be handled in fimd_enable_vblank() and >> fimd_disable_vblank() like RGB interface. >> So this patch moves each set / unset routines into proper positions. >> And adds triggering unset routine in fimd_trigger() to exit from it >> because there is a case like set config which requires triggering >> but vblank is not enabled. > > Reasonable but how about separating this patch into two patches. One is > set/unset properly the registers relevant to interrupt, and other? > > It seems that your patch includes some codes not relevant to above > description. And below is my comment. > > Thanks, > Inki Dae > >> >> Signed-off-by: YoungJun Cho >> Acked-by: Inki Dae >> Acked-by: Kyungmin Park >> --- >> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 60 >> ++-- >> 1 file changed, 34 insertions(+), 26 deletions(-) >> >> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c >> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c >> index f062335..c949099 100644 >> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c >> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c >> @@ -463,12 +463,19 @@ static int fimd_enable_vblank(struct >> exynos_drm_manager *mgr) >> val = readl(ctx->regs + VIDINTCON0); >> >> val |= VIDINTCON0_INT_ENABLE; >> -val |= VIDINTCON0_INT_FRAME; >> >> -val &= ~VIDINTCON0_FRAMESEL0_MASK; >> -val |= VIDINTCON0_FRAMESEL0_VSYNC; >> -val &= ~VIDINTCON0_FRAMESEL1_MASK; >> -val |= VIDINTCON0_FRAMESEL1_NONE; >> +if (ctx->i80_if) { >> +val |= VIDINTCON0_INT_I80IFDONE; >> +val |= VIDINTCON0_INT_SYSMAINCON; >> +val &= ~VIDINTCON0_INT_SYSSUBCON; >> +} else { >> +val |= VIDINTCON0_INT_FRAME; >> + >> +val &= ~VIDINTCON0_FRAMESEL0_MASK; >> +val |= VIDINTCON0_FRAMESEL0_VSYNC; >> +val &= ~VIDINTCON0_FRAMESEL1_MASK; >> +val |= VIDINTCON0_FRAMESEL1_NONE; >> +} >> >> writel(val, ctx->regs + VIDINTCON0); >> } >> @@ -487,9 +494,15 @@ static void fimd_disable_vblank(struct >> exynos_drm_manager *mgr) >> if (test_and_clear_bit(0, &ctx->irq_flags)) { >> val = readl(ctx->regs + VIDINTCON0); >> >> -val &= ~VIDINTCON0_INT_FRAME; >> val &= ~VIDINTCON0_INT_ENABLE; >> >> +if (ctx->i80_if) { >> +val &= ~VIDINTCON0_INT_I80IFDONE; >> +val &= ~VIDINTCON0_INT_SYSMAINCON; >> +val &= ~VIDINTCON0_INT_SYSSUBCON; >> +} else >> +val &= ~VIDINTCON0_INT_FRAME; >> + >> writel(val, ctx->regs + VIDINTCON0); >> } >> } >> @@ -945,16 +958,19 @@ static void fimd_trigger(struct device *dev) >> void *timing_base = ctx->regs + driver_data->timing_base; >> u32 reg; >> >> +/* Enters triggering mode */ >> atomic_set(&ctx->triggering, 1); >> >> -reg = readl(ctx->regs + VIDINTCON0); >> -reg |= (VIDINTCON0_INT_ENABLE | VIDINTCON0_INT_I80IFDONE | >> -VIDINTCON0_INT_SYSMAINCON); >> -writel(reg, ctx->regs + VIDINTCON0); >> - >> reg = readl(timing_base + TRIGCON); >> reg |= (TRGMODE_I80_RGB_ENABLE_I80 | SWTRGCMD_I80_RGB_ENABLE); >> writel(reg, timing_base + TRIGCON); >> + >> +/* >> + * Exits triggering mode if vblank is not enabled yet, because when the >> + * VIDINTCON0 register is not set, it can not exit from triggering mode. >> + */ >> +if (!test_bit(0, &ctx->irq_flags)) >> +atomic_set(&ctx->triggering, 0); > > I think this code would make for other trigger requested while triggering. > I missed this comment. After modifying this patch, the I80 interface works with vblank enable / disable. And there is a case like set config which requires triggering to update frame buffer but vblank is not enabled yet. So this exception routine is required to escape from triggering mode. The connector DPMS is off earlier than CRTC DPMS. So I think the TE interrupt is stopped earlier than vblank is disabled. Thank you. Best regards YJ >> } >> >> static void fimd_te_handler(struct exynos_drm_manager *mgr) >> @@ -966,9 +982,9 @@ static void fimd_te_handler(struct exynos_drm_manager >> *mgr) >> return; >> >> /* >> - * Skips to trigger if in triggering state, because multiple triggering >> - * requests can cause panel reset. >> - */ >> + * Skips triggering if in triggering mode, because multiple triggering >> + * requests can cause panel reset. >> + */ >
[PATCH 2/2] drm/edid: Tighten checksum conditions for CEA blocks
4a638b4e38234233f5c7e6705662fbc0b58d80c2 disabled the checksumming for CEA blocks. If only the checksum is wrong, reading twice should result in identical data, whereas a bad transfer will most likely corrupt diffent bytes. Signed-off-by: Stefan Brüns --- drivers/gpu/drm/drm_edid.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 505960e..9b6b65e 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1200,6 +1200,7 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) { int i, j = 0, valid_extensions = 0; u8 *block, *new; + u8 *saved_block = NULL; bool print_bad_edid = !connector->bad_edid_counter || (drm_debug & DRM_UT_KMS); if ((block = kmalloc(EDID_LENGTH, GFP_KERNEL)) == NULL) @@ -1234,15 +1235,29 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) block = new; for (j = 1; j <= block[0x7e]; j++) { + u8 *ext_block = block + (valid_extensions + 1) * EDID_LENGTH; + u8 csum, last_csum = 0; for (i = 0; i < 4; i++) { - if (drm_do_probe_ddc_edid(adapter, - block + (valid_extensions + 1) * EDID_LENGTH, - j, EDID_LENGTH)) + if (drm_do_probe_ddc_edid(adapter, ext_block, j, EDID_LENGTH)) goto out; - if (drm_edid_block_valid(block + (valid_extensions + 1) * EDID_LENGTH, j, print_bad_edid)) { + if ((csum = drm_edid_block_checksum(ext_block)) == 0) { valid_extensions++; break; + } else if ((ext_block[0] == CEA_EXT) && (csum == last_csum)) { + /* +* Some switches mangle CEA contents without fixing the checksum. +* Accept CEA blocks when two reads return identical data. +*/ + if (!saved_block) + saved_block = kmalloc(EDID_LENGTH, GFP_KERNEL); + if (saved_block && !memcmp(ext_block, saved_block, EDID_LENGTH)) { + valid_extensions++; + break; + } + if (saved_block) + memcpy(saved_block, ext_block, EDID_LENGTH); } + last_csum = csum; } if (i == 4 && print_bad_edid) { @@ -1263,6 +1278,7 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) block = new; } + kfree(saved_block); return block; carp: @@ -1273,6 +1289,7 @@ carp: connector->bad_edid_counter++; out: + kfree(saved_block); kfree(block); return NULL; } -- 1.8.4.5
[PATCH] drm/edid: Check for empty block prior to checksumming
drm_edid_block_valid will dump the whole EDID block. Shorten the log output to a single line stating the block is empty. Signed-off-by: Stefan Brüns --- drivers/gpu/drm/drm_edid.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 3bf9991..0755d01 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1198,12 +1198,17 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) for (i = 0; i < 4; i++) { if (drm_do_probe_ddc_edid(adapter, block, 0, EDID_LENGTH)) goto out; - if (drm_edid_block_valid(block, 0, print_bad_edid)) - break; if (i == 0 && drm_edid_is_zero(block, EDID_LENGTH)) { connector->null_edid_counter++; - goto carp; + if (print_bad_edid) { + dev_warn(connector->dev->dev, "%s: EDID block 0 empty.\n", +connector->name); + } + connector->bad_edid_counter++; + goto out; } + if (drm_edid_block_valid(block, 0, print_bad_edid)) + break; } if (i == 4) goto carp; -- 1.8.4.5
[PATCH 1/2] drm/edid: new drm_edid_block_checksum helper function
Signed-off-by: Stefan Brüns --- drivers/gpu/drm/drm_edid.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 0755d01..505960e 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1184,6 +1184,17 @@ static bool drm_edid_is_zero(u8 *in_edid, int length) return true; } +static u8 +drm_edid_block_checksum(u8 *raw_edid) +{ + int i; + u8 csum = 0; + for (i = 0; i < EDID_LENGTH; i++) + csum += raw_edid[i]; + + return csum; +} + static u8 * drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) { -- 1.8.4.5
[radeonsi, regression, bisected] All my Steam games fail to load into the 3D-engine-powered part (SIGPWR and SIGXCPU)
Kai Wasserbäch wrote: > Kai Wasserbäch wrote on 15.11.2014 22:22: >> Kai Wasserbäch wrote on 15.11.2014 16:33: >>> Is there anything besides a bisect you would need to debug this? >> >> Ok, I did a bisection, but that time was wasted for sure. My "first >> bad commit" isn't bad at all. Is there any way to improve that >> experience? I'm really loathe to go through the dozen boots again, >> just to get another broken bisection. > > Ok, after looking at the changes for radeon I decided to try the HEAD > of drm-next-3.19 (c81b99423bd9d3fc35ac8752ca5fb4c50eab063c). That was > still good. Armed with this much smaller bisection range, I came up > with a result that sounds at least believable: > 3cd76f3901e73a4a61d78c4526dcbf6d87c9a928 is the first bad commit > commit 3cd76f3901e73a4a61d78c4526dcbf6d87c9a928 Author: Christian > König Date: Mon Oct 13 12:41:47 2014 > +0200 > > drm/radeon: update the VM after setting BO address (v2) Yes, that seems to be it for me also - but just to confuse things I've been running with that for several weeks without incident, so something brought in from the recent merges/a new patch doesn't play nicely with it. If you wanted to test you could get back to how drm-next-3.19-wip was last week by git reset --hard 3.18.0-rc2-gc76c717 and you can see it's there with git log about 6/7 commits down.
[Bug 73530] Asus U38N: Black screen with Radeon driver in Linux
https://bugs.freedesktop.org/show_bug.cgi?id=73530 --- Comment #69 from Nicolas Werner --- (In reply to Alex Deucher from comment #65) > *snip* > > In reply to Christian AÃfalg from comment #63) > > I think / guess that I am having the same issues. I've got the same laptop, > > running Arch Linux. Mostly, I've been using the proprietary catalyst driver, > > since I never got the free driver working. The proprietary is working fine. > > > > What is the issue here? You've been playing with timings for the physical > > link to the internal panel? Is it so frickly? What would you need to fix the > > issue? How can I help? > > I suggested that it might be a timing issue, and as per comment 54. > However, link training is successful so that monitor accepts the parameters > that the driver proposed, it just sometimes chooses not to light up. I > would suggest trying to tweak the link training timing as per comment 54, > try disabling ss as per comment 6, and finally, try making some slight > changes to the modeset sequence as per the attached patch. The patch adds a > delay before enabling the video stream and additionally calls the enable > video stream code again in case the monitor didn't quite get the signal the > first time. E.g., > *snip* I also have the same problem. (same notebook, so not surprising) I tried everything you recommended (in comment #65), in order, nothing helps. Any more suggestions? Btw, I'm using OpenSUSE, so Kernel 3.16.6. Also xrandr output is much shorter than the ones posted here, is that normal when you use modeset=0? xrandr -q --verbose xrandr: Failed to get size of gamma for output default Screen 0: minimum 1920 x 1080, current 1920 x 1080, maximum 1920 x 1080 default connected primary 1920x1080+0+0 (0x180) normal (normal) 0mm x 0mm Identifier: 0x17f Timestamp: 7692 Subpixel: unknown Clones: CRTC: 0 CRTCs: 0 Transform: 1.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 filter: 1920x1080 (0x180) 159.667MHz *current h: width 1920 start0 end0 total 1920 skew0 clock 83.16KHz v: height 1080 start0 end0 total 1080 clock 77.00Hz -- 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/20141116/d57d8c28/attachment.html>
[PATCH 1/1 linux-next] drm: remove unnecessary sizeof(u8)
sizeof(u8) is always 1. Signed-off-by: Fabian Frederick --- drivers/gpu/drm/r128/r128_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/r128/r128_state.c b/drivers/gpu/drm/r128/r128_state.c index 575e986..8fd2d9f 100644 --- a/drivers/gpu/drm/r128/r128_state.c +++ b/drivers/gpu/drm/r128/r128_state.c @@ -905,7 +905,7 @@ static int r128_cce_dispatch_write_span(struct drm_device *dev, if (IS_ERR(buffer)) return PTR_ERR(buffer); - mask_size = depth->n * sizeof(u8); + mask_size = depth->n; if (depth->mask) { mask = memdup_user(depth->mask, mask_size); if (IS_ERR(mask)) { @@ -1010,7 +1010,7 @@ static int r128_cce_dispatch_write_pixels(struct drm_device *dev, } if (depth->mask) { - mask_size = depth->n * sizeof(u8); + mask_size = depth->n; mask = memdup_user(depth->mask, mask_size); if (IS_ERR(mask)) { kfree(x); -- 1.9.3
[PATCH 1/2] drm/msm: Register irq handler for each sub-system in mdss
On Fri, Nov 14, 2014 at 5:42 PM, Hai Li wrote: > All the sub-systems in mdss share the same irq. This change provides > the sub-systems with the interfaces to register/unregister their own > irq handlers. > > With this change, struct mdp5_kms does not have to keep the hdmi or > edp context. > So, I think the point of this is to better deal w/ different hw variants which do or do-not have hdmi, edp, dsi, etc.. But, just playing devil's advocate here, it seems like it would be simpler to instead just do something like: if (priv->hdmi && (intr & MDP5_HW_INTR_STATUS_INTR_HDMI)) hdmi_irq(0, priv->hdmi); if (priv->edp && (intr & MDP5_HW_INTR_STATUS_INTR_EDP)) edp_irq(0, priv->edp); ... etc ... It is a little less elegant. But it is also less lines of code. I guess there will be plenty of necessary complexity as we add support for all mdp5 features. So avoiding some unnecessary complexity might be a good thing in the long run. If we really did want to make it more dynamic, we could always extend 'struct mdp_irq' to take both an irq mask and an initiator id, I suppose. I'm not sure if that is overkill. AFAICT we really only have 5 different subsystems to dispatch to (mdp5 itself, and dsi0/dsi1/hdmi/edp), so simply adding some if-not-null checks in mdp5_irq() seems pretty reasonable to me. BR, -R > Signed-off-by: Hai Li > --- > drivers/gpu/drm/msm/hdmi/hdmi.c | 12 +++- > drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c | 107 > ++-- > drivers/gpu/drm/msm/msm_drv.h | 19 +- > 3 files changed, 130 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c > index 9d00dcb..aaf5e2b 100644 > --- a/drivers/gpu/drm/msm/hdmi/hdmi.c > +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c > @@ -39,7 +39,7 @@ void hdmi_set_mode(struct hdmi *hdmi, bool power_on) > power_on ? "Enable" : "Disable", ctrl); > } > > -irqreturn_t hdmi_irq(int irq, void *dev_id) > +static irqreturn_t hdmi_irq(int irq, void *dev_id) > { > struct hdmi *hdmi = dev_id; > > @@ -59,6 +59,9 @@ void hdmi_destroy(struct kref *kref) > struct hdmi *hdmi = container_of(kref, struct hdmi, refcount); > struct hdmi_phy *phy = hdmi->phy; > > + if (hdmi->config->shared_irq) > + msm_shared_irq_unregister(MSM_SUBSYS_HDMI); > + > if (phy) > phy->funcs->destroy(phy); > > @@ -221,6 +224,13 @@ struct hdmi *hdmi_init(struct drm_device *dev, struct > drm_encoder *encoder) > hdmi->irq, ret); > goto fail; > } > + } else { > + ret = msm_shared_irq_register(MSM_SUBSYS_HDMI, hdmi_irq, > hdmi); > + if (ret < 0) { > + dev_err(dev->dev, "failed to register shared IRQ: > %d\n", > + ret); > + goto fail; > + } > } > > encoder->bridge = hdmi->bridge; > diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c > b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c > index f2b985b..2973c1c 100644 > --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c > +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c > @@ -1,4 +1,5 @@ > /* > + * Copyright (c) 2014, The Linux Foundation. All rights reserved. > * Copyright (C) 2013 Red Hat > * Author: Rob Clark > * > @@ -19,6 +20,75 @@ > #include "msm_drv.h" > #include "mdp5_kms.h" > > +struct msm_subsys_shared_irq { > + u32 mask; > + u32 count; > + > + /* Filled by sub system */ > + irqreturn_t (*handler)(int irq, void *dev_id); > + void *data; > +}; > + > +static struct msm_subsys_shared_irq msm_shared_irqs[MSM_SUBSYS_COUNT] = { > + [MSM_SUBSYS_MDP] = {.mask = MDP5_HW_INTR_STATUS_INTR_MDP, > + .count = 0}, > + [MSM_SUBSYS_DSI_0] = {.mask = MDP5_HW_INTR_STATUS_INTR_DSI0, > + .count = 0}, > + [MSM_SUBSYS_DSI_1] = {.mask = MDP5_HW_INTR_STATUS_INTR_DSI1, > + .count = 0}, > + [MSM_SUBSYS_HDMI] = {.mask = MDP5_HW_INTR_STATUS_INTR_HDMI, > + .count = 0}, > + [MSM_SUBSYS_EDP] = {.mask = MDP5_HW_INTR_STATUS_INTR_EDP, > + .count = 0}, > +}; > + > +static irqreturn_t mdp5_irq_mdp(int irq, void *dev_id); > + > +int msm_shared_irq_register(enum msm_sub_system sys_id, > + irqreturn_t (*handler)(int irq, void *dev_id), void *data) > +{ > + if (sys_id >= MSM_SUBSYS_COUNT) { > + DRM_ERROR("Invalid sys_id %d", sys_id); > + return -EINVAL; > + } > + > + if (msm_shared_irqs[sys_id].handler != NULL) { > + DRM_ERROR("sys %d irq already registered", sys_id); > + return -EBUSY; > + } > + > + msm_shared_irqs[sys_id].data = data; > + msm_shared_irqs[sy
[PATCH 2/2] drm/msm: Decouple hdmi driver from mdp driver
On Fri, Nov 14, 2014 at 5:42 PM, Hai Li wrote: > This change is to remove the hdmi structure from mdp kms data structure. > > To do this, the initialization flow is re-arranged. > - hdmi_init is moved from modeset_init to hdmi_bind. > - hdmi_destroy is called by hdmi_unbind and the use of kref is abandoned. > - A new interface hdmi_set_encoder is introduced to establish the links >between hdmi connector, encoder and bridge. > this looks like it is going to conflict somewhat with: http://cgit.freedesktop.org/~robclark/linux/commit/?h=msm-next&id=3b3a2964a37887ced36261b4b5622ab6137a860c I had already refactored the hdmi init to better handle probe-defer (and move all the devm_get's into hdmi_bind()). It is somewhat similar to what you are doing here.. hdmi_init() is called at hdmi_bind() time, and then hdmi_modeset_init() is called at toplevel drm device modeset_init() time to construct the kms modeset object (connector/bridge) and connect up with encoder. I didn't remove the kref yet, although it probably could/should be removed. It doesn't really protect us if the hdmi device is removed before the toplevel drm device (since all the devm resources would be dropped). But AFAIU the component framework stuff should protect us from that. The kref is just left over from before component framework because I forgot to remove it ;-) BR, -R > Signed-off-by: Hai Li > --- > drivers/gpu/drm/msm/hdmi/hdmi.c | 61 > +++ > drivers/gpu/drm/msm/hdmi/hdmi.h | 14 --- > drivers/gpu/drm/msm/hdmi/hdmi_bridge.c| 3 +- > drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 6 +-- > drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 14 --- > drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 38 ++- > drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 2 - > drivers/gpu/drm/msm/msm_drv.c | 9 - > drivers/gpu/drm/msm/msm_drv.h | 6 ++- > 9 files changed, 88 insertions(+), 65 deletions(-) > > diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c > index aaf5e2b..2d2551f 100644 > --- a/drivers/gpu/drm/msm/hdmi/hdmi.c > +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c > @@ -1,4 +1,5 @@ > /* > + * Copyright (c) 2014, The Linux Foundation. All rights reserved. > * Copyright (C) 2013 Red Hat > * Author: Rob Clark > * > @@ -17,6 +18,29 @@ > > #include "hdmi.h" > > +int hdmi_set_encoder(struct platform_device *pdev, > + struct drm_encoder *encoder) > +{ > + struct hdmi *hdmi = platform_get_drvdata(pdev); > + > + if (!encoder && !hdmi->encoder) { > + pr_err("%s:wrong encoder > status,encoder=%p,hdmi->encoder=%p\n", > + __func__, encoder, hdmi->encoder); > + return -EINVAL; > + } > + > + /* Each connector has only one available encoder for now. */ > + hdmi->connector->encoder_ids[0] = 0; > + hdmi->connector->encoder = NULL; > + if (encoder) { > + drm_mode_connector_attach_encoder(hdmi->connector, encoder); > + encoder->bridge = hdmi->bridge; > + } > + hdmi->encoder = encoder; > + > + return 0; > +} > + > void hdmi_set_mode(struct hdmi *hdmi, bool power_on) > { > uint32_t ctrl = 0; > @@ -54,10 +78,15 @@ static irqreturn_t hdmi_irq(int irq, void *dev_id) > return IRQ_HANDLED; > } > > -void hdmi_destroy(struct kref *kref) > +static void hdmi_destroy(struct platform_device *pdev) > { > - struct hdmi *hdmi = container_of(kref, struct hdmi, refcount); > - struct hdmi_phy *phy = hdmi->phy; > + struct hdmi *hdmi = platform_get_drvdata(pdev); > + struct hdmi_phy *phy; > + > + if (!hdmi) > + return; > + > + phy = hdmi->phy; > > if (hdmi->config->shared_irq) > msm_shared_irq_unregister(MSM_SUBSYS_HDMI); > @@ -68,15 +97,14 @@ void hdmi_destroy(struct kref *kref) > if (hdmi->i2c) > hdmi_i2c_destroy(hdmi->i2c); > > - platform_set_drvdata(hdmi->pdev, NULL); > + platform_set_drvdata(pdev, NULL); > } > > /* initialize connector */ > -struct hdmi *hdmi_init(struct drm_device *dev, struct drm_encoder *encoder) > +static int hdmi_init(struct platform_device *pdev, struct drm_device *dev) > { > struct hdmi *hdmi = NULL; > struct msm_drm_private *priv = dev->dev_private; > - struct platform_device *pdev = priv->hdmi_pdev; > struct hdmi_platform_config *config; > int i, ret; > > @@ -94,12 +122,11 @@ struct hdmi *hdmi_init(struct drm_device *dev, struct > drm_encoder *encoder) > goto fail; > } > > - kref_init(&hdmi->refcount); > + platform_set_drvdata(pdev, hdmi); > > hdmi->dev = dev; > hdmi->pdev = pdev; > hdmi->config = config; > - hdmi->encoder = encoder; > > hdmi_audio_infoframe_init(&hdmi->audio.infoframe); > > @@ -233,14 +260,10
[GIT PULL] drm: Miscellaneous fixes for v3.19-rc1
On Thu, Nov 13, 2014 at 01:50:33PM +0100, Thierry Reding wrote: > Hi Dave, > > Sorry for the dupe, sending with the list in Cc this time. > > The following changes since commit f114040e3ea6e07372334ade75d1ee0775c355e1: > > Linux 3.18-rc1 (2014-10-19 18:08:38 -0700) > > are available in the git repository at: > > git://people.freedesktop.org/~tagr/linux tags/drm/fixes/for-3.19-rc1 > > for you to fetch changes up to 37d74578d819b1798dd2cff724438e345d118980: > > video/hdmi: Relicense header under MIT license (2014-11-13 10:44:42 +0100) > > Thanks, > Thierry > > > drm: Miscellaneous fixes for v3.19-rc1 > > This is a small collection of fixes that I've been carrying around for a > while now. Many of these have been posted and reviewed or acked. The few > that haven't I deemed too trivial to bother. > > > Thierry Reding (8): > drm: Use size_t for blob property sizes > drm: Use const data when creating blob properties > drm/gem: Fix typo in kerneldoc > drm/prime: Use unsigned type for number of pages > drm: Implement drm_get_pci_dev() dummy for !PCI > drm: Make drm_mode_create_tv_properties() signature consistent > drm/gma500: mdfld: Reuse video/mipi_display.h > video/hdmi: Relicense header under MIT license Obligatory process bikeshed: Most of these patches doen't seem to have shown up on dri-devel nor gotten review. Yeah it's just simple stuff here but imo we have a well-working review culture around in the drm community, so reposting the entire pile and pinging the usual suspects on #dri-devel isn't a lot of fuzz really. In my opinion doing the review dance even for simple stuff is a great way to build up a working review culture - barriers are much lower for newbies to do a bit of review if the patch is fairly trivial. And for drm features written by Intel folks I try hard to get review or at least feedback from non-Intel people here. Of course that should go both ways and I'd be happy to chase down people from my team to do some review when needed. Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
[pull] drm/msm: msm-next for 3.19
Hi Dave, Main pull for 3.19. I may have another pull in a few days with some mdp5 bits (and hopefully mdp5 atomic), but I figured there was no need to hold up what we have already. Main highlights so far: 1) a4xx gpu support (userspace gallium bits on mesa master) 2) mdp4/hdmi/core bits for atomic helpers. Still missing mdp5 conversion, main hold up there is current hard-coded mixer setup isn't clever enough to deal with disabling primary plane while crtc active. 3) various other misc cleanup/fixes/etc.. The following changes since commit ca5a71de4852e3eeba53a326ddf260b7b2e117b1: Merge tag 'drm/gem-cma/for-3.19-rc1' of git://people.freedesktop.org/~tagr/linux into drm-next (2014-11-15 09:50:21 +1000) are available in the git repository at: git://people.freedesktop.org/~robclark/linux msm-next for you to fetch changes up to 23bd62fd419755b439152915f4df8ff26346f2b7: drm/msm: a4xx support for msm-drm (2014-11-16 14:27:40 -0500) Aravind Ganesan (2): drm/msm: Handle register offset differences between a3xx and a4xx drm/msm: a4xx support for msm-drm Daniel Thompson (2): drm/msm: Allow exported dma-bufs to be mapped drm/msm: Fix fbdev for 16- and 24-bit modes. Rob Clark (17): drm/msm: select REGULATOR drm/msm/adreno: slight init order cleanup drm/msm: update generated headers drm/msm/hdmi: refactor bind/init drm/msm/mdp4: drop private primary ptr drm/msm/mdp5: drop private primary ptr drm/msm/mdp4: don't care about fb in crtc drm/msm/mdp4: drop attached planes table drm/msm/mdp5: drop attached planes table drm/msm: small fence cleanup drm/msm: remove unused compile-test stub drm/msm: fb prepare/cleanup drm/msm: bit of fb error checking drm/msm: atomic core bits drm/msm/hdmi: atomic drm/msm/mdp4: atomic drm/msm: small mmap offset cleanups drivers/gpu/drm/msm/Kconfig|1 + drivers/gpu/drm/msm/Makefile |2 + drivers/gpu/drm/msm/adreno/a2xx.xml.h | 26 +- drivers/gpu/drm/msm/adreno/a3xx.xml.h | 247 ++- drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 91 + drivers/gpu/drm/msm/adreno/a4xx.xml.h | 2144 drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 604 ++ drivers/gpu/drm/msm/adreno/a4xx_gpu.h | 34 + drivers/gpu/drm/msm/adreno/adreno_common.xml.h | 17 +- drivers/gpu/drm/msm/adreno/adreno_device.c | 13 + drivers/gpu/drm/msm/adreno/adreno_gpu.c| 31 +- drivers/gpu/drm/msm/adreno/adreno_gpu.h| 126 ++ drivers/gpu/drm/msm/adreno/adreno_pm4.xml.h| 75 +- drivers/gpu/drm/msm/dsi/dsi.xml.h |8 +- drivers/gpu/drm/msm/dsi/mmss_cc.xml.h |8 +- drivers/gpu/drm/msm/dsi/sfpb.xml.h |8 +- drivers/gpu/drm/msm/hdmi/hdmi.c| 99 +- drivers/gpu/drm/msm/hdmi/hdmi.xml.h|8 +- drivers/gpu/drm/msm/hdmi/hdmi_connector.c |3 + drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c |2 +- drivers/gpu/drm/msm/hdmi/qfprom.xml.h |8 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4.xml.h|8 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 266 +-- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c| 17 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h| 10 - drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c |3 + drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | 120 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5.xml.h| 10 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 46 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c|3 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c| 11 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h|2 - drivers/gpu/drm/msm/msm_atomic.c | 163 ++ drivers/gpu/drm/msm/msm_drv.c | 25 + drivers/gpu/drm/msm/msm_drv.h | 34 +- drivers/gpu/drm/msm/msm_fb.c | 43 +- drivers/gpu/drm/msm/msm_fbdev.c|3 - drivers/gpu/drm/msm/msm_gem.c | 40 +- drivers/gpu/drm/msm/msm_gem.h | 13 + drivers/gpu/drm/msm/msm_gem_prime.c| 13 + drivers/gpu/drm/msm/msm_kms.h |5 + 41 files changed, 3893 insertions(+), 497 deletions(-) create mode 100644 drivers/gpu/drm/msm/adreno/a4xx.xml.h create mode 100644 drivers/gpu/drm/msm/adreno/a4xx_gpu.c create mode 100644 drivers/gpu/drm/msm/adreno/a4xx_gpu.h create mode 100644 drivers/gpu/drm/msm/msm_atomic.c
[Bug 86357] [RadeonSI] GPU lockup with mesa 10.3.3 / kernel 3.17.2
https://bugs.freedesktop.org/show_bug.cgi?id=86357 Bug ID: 86357 Summary: [RadeonSI] GPU lockup with mesa 10.3.3 / kernel 3.17.2 Product: Mesa Version: 10.3 Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel at lists.freedesktop.org Reporter: madcatx at atlas.cz Created attachment 109569 --> https://bugs.freedesktop.org/attachment.cgi?id=109569&action=edit journalctl crash info, contains both dmesg and Xorg logs After a recent update of my Fedora 21 box I've experienced this crash twice. The entire desktop except for mouse freezes and I cannot even VT switch to console. If the keypress gets registered I end up with a powered down display and a switch back to X results in a completely corrupted screen. If I don't try a VT switch I can still move the mouse but other than that the machine appears dead. It eventually stops responding to ping and the only way out is a hard reboot. I have been using this machine for quite a while and I haven't experienced this before until yesterday. I checked the yum logs but there doesn't seem to be anything directly related to the graphics except maybe for this: Updated xkeyboard-config-2.13-2.fc21.noarch @updates-testing Update 2.13-3.fc21.noarch @updates-testing Updated xorg-x11-font-utils-1:7.5-23.fc21.x86_64 @updates-testing Update 1:7.5-25.fc21.x86_64 @updates-testing Updated xorg-x11-fonts-Type1-7.5-11.fc21.noarch @updates-testing Update 7.5-14.fc21.noarch @updates-testing Updated xorg-x11-server-utils-7.7-9.fc21.x86_64 @updates-testing Update7.7-10.fc21.x86_64 @updates-testing Updated xorg-x11-xkb-utils-7.7-10.fc21.x86_64 @fedora Relevant packages installed: xorg-x11-drv-ati - 7.5.0-1.fc21 xorg-x11-server-Xorg.x86_64 - 1.16.1-1.fc21 kernel.x86_64 - 3.17.2-300.fc21 Custom-built mesa 10.3.3 with "Fix v5" from "BUG 60879" applied My card is a 7730 LE, PID:VID 1002:aab0 X and kernel apparently caught and logged the problem, relevant journalctl output is attached. It usually takes a few hours for this to happen, the only thing the two crashes I've had so far have in common is a Flash video playing in the background when the system froze. -- 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/20141116/93ab0878/attachment.html>