Re: [Intel-gfx] [PULL] drm-intel-next
On Tue, Jun 12, 2018 at 9:59 AM, Jani Nikula wrote: > On Tue, 12 Jun 2018, Dave Airlie wrote: >> On 12 June 2018 at 02:27, Rodrigo Vivi wrote: >>> Hi Dave, >>> >>> This is the first round targeting 4.19. >>> >> Does this tree feed into linux-next already? >> >> Since we shouldn't have new stuff for linux-next feeding into it until >> after rc1. > > I think we'll feed it to linux-next only after merge window closes > i.e. rc1. > >> I won't be pulling this until after rc1 anyways. > > Seems fair; this doesn't conflict with tagging manageable sized batches > in dinq like Rodrigo has done here. So we're good. The scripts don't require to send out a pull request when only tagging, I guess this pull here was just a fumble? -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PULL] drm-intel-next
On Tue, Jun 12, 2018 at 9:59 AM, Jani Nikula wrote: > On Tue, 12 Jun 2018, Dave Airlie wrote: >> On 12 June 2018 at 02:27, Rodrigo Vivi wrote: >>> Hi Dave, >>> >>> This is the first round targeting 4.19. >>> >> Does this tree feed into linux-next already? >> >> Since we shouldn't have new stuff for linux-next feeding into it until >> after rc1. > > I think we'll feed it to linux-next only after merge window closes > i.e. rc1. dim indeed takes care of that, but only if the drm-intel-fixes/next-fixes branches are handled correctly. Which is why fast-forwarding them according to the documentation is paramount, for otherwise we upset everyone using linux-next :-) -Daniel > >> I won't be pulling this until after rc1 anyways. > > Seems fair; this doesn't conflict with tagging manageable sized batches > in dinq like Rodrigo has done here. So we're good. > > BR, > Jani. > > -- > Jani Nikula, Intel Open Source Graphics Center -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/psr: Adds psrwake options for all platforms (rev3)
== Series Details == Series: drm/i915/psr: Adds psrwake options for all platforms (rev3) URL : https://patchwork.freedesktop.org/series/44601/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4331_full -> Patchwork_9345_full = == Summary - WARNING == Minor unknown changes coming with Patchwork_9345_full need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9345_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9345_full: === IGT changes === Warnings igt@gem_tiled_blits@interruptible: shard-glk: SKIP -> PASS == Known issues == Here are the changes found in Patchwork_9345_full that come from known issues: === IGT changes === Issues hit igt@drv_selftest@live_gtt: shard-apl: PASS -> INCOMPLETE (fdo#103927) igt@drv_selftest@live_hangcheck: shard-glk: NOTRUN -> DMESG-FAIL (fdo#106947) igt@kms_cursor_crc@cursor-64x64-suspend: shard-snb: PASS -> DMESG-WARN (fdo#102365) igt@kms_cursor_legacy@cursora-vs-flipa-toggle: shard-glk: PASS -> DMESG-WARN (fdo#105763) igt@kms_flip_tiling@flip-y-tiled: shard-glk: PASS -> FAIL (fdo#104724, fdo#103822) igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a: shard-apl: PASS -> FAIL (fdo#103375) igt@kms_setmode@basic: shard-kbl: PASS -> FAIL (fdo#99912) Possible fixes igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic: shard-glk: FAIL (fdo#106509) -> PASS igt@kms_flip@2x-plain-flip-fb-recreate-interruptible: shard-glk: FAIL (fdo#100368) -> PASS igt@kms_flip_tiling@flip-to-x-tiled: shard-glk: FAIL (fdo#104724, fdo#103822) -> PASS igt@kms_flip_tiling@flip-to-y-tiled: shard-glk: FAIL (fdo#104724) -> PASS igt@perf@polling: shard-hsw: FAIL (fdo#102252) -> PASS Warnings igt@drv_selftest@live_gtt: shard-glk: INCOMPLETE (k.org#198133, fdo#103359) -> FAIL (fdo#105347) fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252 fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365 fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359 fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375 fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822 fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927 fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724 fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347 fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763 fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509 fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947 fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912 k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * Linux: CI_DRM_4331 -> Patchwork_9345 CI_DRM_4331: e47233f783ee68a864c2a10216735aca62d642da @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4522: 077c6f7c3786334c5e5c34888ab446fdb4347331 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9345: 71a6e6f9fe0e541daf1a181cb6debc8086d1fa84 @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9345/shards.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915: Only show debug for state changes when banning
Since we trigger 10,000s of hangs and resets during selftesting, we emit many, many thousands of lines of useless debug messages. Reduce the frequency by only logging a change in state of a guilty context. Fixes: 14921f3cef85 ("drm/i915: Fix context ban and hang accounting for client") Signed-off-by: Chris Wilson Cc: Mika Kuoppala --- drivers/gpu/drm/i915/i915_gem.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 5155e458b11e..dd9b678959e4 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2976,16 +2976,16 @@ static void i915_gem_context_mark_guilty(struct i915_gem_context *ctx) score = atomic_add_return(CONTEXT_SCORE_GUILTY, &ctx->ban_score); banned = score >= CONTEXT_SCORE_BAN_THRESHOLD; - DRM_DEBUG_DRIVER("context %s: guilty %d, score %u, ban %s\n", -ctx->name, atomic_read(&ctx->guilty_count), -score, yesno(banned && bannable)); - /* Cool contexts don't accumulate client ban score */ if (!bannable) return; - if (banned) + if (banned) { + DRM_DEBUG_DRIVER("context %s: guilty %d, score %u, banned\n", +ctx->name, atomic_read(&ctx->guilty_count), +score); i915_gem_context_set_banned(ctx); + } if (!IS_ERR_OR_NULL(ctx->file_priv)) i915_gem_client_mark_guilty(ctx->file_priv, ctx); -- 2.17.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v7 3/6] mfd: cros-ec: Increase maximum mkbp event size
On Fri, 01 Jun 2018, Neil Armstrong wrote: > Having a 16 byte mkbp event size makes it possible to send CEC > messages from the EC to the AP directly inside the mkbp event > instead of first doing a notification and then a read. > > Signed-off-by: Stefan Adolfsson > Signed-off-by: Neil Armstrong > Tested-by: Enric Balletbo i Serra > --- > drivers/platform/chrome/cros_ec_proto.c | 40 > + > include/linux/mfd/cros_ec.h | 2 +- > include/linux/mfd/cros_ec_commands.h| 19 > 3 files changed, 51 insertions(+), 10 deletions(-) > > diff --git a/drivers/platform/chrome/cros_ec_proto.c > b/drivers/platform/chrome/cros_ec_proto.c > index e7bbdf9..c4f6c44 100644 > --- a/drivers/platform/chrome/cros_ec_proto.c > +++ b/drivers/platform/chrome/cros_ec_proto.c > @@ -504,10 +504,31 @@ int cros_ec_cmd_xfer_status(struct cros_ec_device > *ec_dev, > } > EXPORT_SYMBOL(cros_ec_cmd_xfer_status); > > +static int get_next_event_xfer(struct cros_ec_device *ec_dev, > +struct cros_ec_command *msg, > +int version, uint32_t size) > +{ > + int ret; > + > + msg->version = version; > + msg->command = EC_CMD_GET_NEXT_EVENT; > + msg->insize = size; > + msg->outsize = 0; > + > + ret = cros_ec_cmd_xfer(ec_dev, msg); > + if (ret > 0) { > + ec_dev->event_size = ret - 1; > + memcpy(&ec_dev->event_data, msg->data, ec_dev->event_size); > + } > + > + return ret; > +} > + > static int get_next_event(struct cros_ec_device *ec_dev) > { > u8 buffer[sizeof(struct cros_ec_command) + sizeof(ec_dev->event_data)]; > struct cros_ec_command *msg = (struct cros_ec_command *)&buffer; > + static int cmd_version = 1; > int ret; > > if (ec_dev->suspended) { > @@ -515,18 +536,19 @@ static int get_next_event(struct cros_ec_device *ec_dev) > return -EHOSTDOWN; > } > > - msg->version = 0; > - msg->command = EC_CMD_GET_NEXT_EVENT; > - msg->insize = sizeof(ec_dev->event_data); > - msg->outsize = 0; > + if (cmd_version == 1) { > + ret = get_next_event_xfer(ec_dev, msg, cmd_version, > + sizeof(struct ec_response_get_next_event_v1)); > + if (ret < 0 || msg->result != EC_RES_INVALID_VERSION) > + return ret; > > - ret = cros_ec_cmd_xfer(ec_dev, msg); > - if (ret > 0) { > - ec_dev->event_size = ret - 1; > - memcpy(&ec_dev->event_data, msg->data, > -sizeof(ec_dev->event_data)); > + /* Fallback to version 0 for future send attempts */ > + cmd_version = 0; > } > > + ret = get_next_event_xfer(ec_dev, msg, cmd_version, > + sizeof(struct ec_response_get_next_event)); > + > return ret; > } > > diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h > index f36125e..32caef3 100644 > --- a/include/linux/mfd/cros_ec.h > +++ b/include/linux/mfd/cros_ec.h > @@ -147,7 +147,7 @@ struct cros_ec_device { > bool mkbp_event_supported; > struct blocking_notifier_head event_notifier; > > - struct ec_response_get_next_event event_data; > + struct ec_response_get_next_event_v1 event_data; > int event_size; > u32 host_event_wake_mask; > }; > diff --git a/include/linux/mfd/cros_ec_commands.h > b/include/linux/mfd/cros_ec_commands.h > index f2edd99..cc0768e 100644 > --- a/include/linux/mfd/cros_ec_commands.h > +++ b/include/linux/mfd/cros_ec_commands.h > @@ -2093,12 +2093,31 @@ union ec_response_get_next_data { > uint32_t sysrq; > } __packed; > > +union ec_response_get_next_data_v1 { > + uint8_t key_matrix[16]; > + > + /* Unaligned */ That's funny! > + uint32_t host_event; > + > + uint32_t buttons; > + uint32_t switches; > + uint32_t sysrq; > + uint32_t cec_events; > + uint8_tcec_message[16]; Since there are some whitespace alignment issues in here. > +} __packed; How come these guys have kerneldoc headers? > struct ec_response_get_next_event { > uint8_t event_type; > /* Followed by event data if any */ > union ec_response_get_next_data data; > } __packed; > > +struct ec_response_get_next_event_v1 { > + uint8_t event_type; > + /* Followed by event data if any */ > + union ec_response_get_next_data_v1 data; > +} __packed; > + > /* Bit indices for buttons and switches.*/ > /* Buttons */ > #define EC_MKBP_POWER_BUTTON 0 -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v7 4/6] mfd: cros-ec: Introduce CEC commands and events definitions.
On Fri, 01 Jun 2018, Neil Armstrong wrote: > The EC can expose a CEC bus, this patch adds the CEC related definitions > needed by the cros-ec-cec driver. > > Signed-off-by: Neil Armstrong > Tested-by: Enric Balletbo i Serra > Reviewed-by: Hans Verkuil > --- > include/linux/mfd/cros_ec_commands.h | 81 > > 1 file changed, 81 insertions(+) For my own reference: Acked-for-MFD-by: Lee Jones -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 04/14] drm/sti: Remove pointless casts
2018-06-15 18:49 GMT+02:00 Ville Syrjala : > From: Ville Syrjälä > > There's no point in the cast for accessing the base class. Just > take the address of the struct instead. > > Cc: Benjamin Gaignard > Cc: Vincent Abriou > Signed-off-by: Ville Syrjälä Acked-by: Benjamin Gaignard Thanks. > --- > drivers/gpu/drm/sti/sti_tvout.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c > index ea4a3b87fa55..7d495307fe79 100644 > --- a/drivers/gpu/drm/sti/sti_tvout.c > +++ b/drivers/gpu/drm/sti/sti_tvout.c > @@ -665,7 +665,7 @@ sti_tvout_create_dvo_encoder(struct drm_device *dev, > > encoder->tvout = tvout; > > - drm_encoder = (struct drm_encoder *)encoder; > + drm_encoder = &encoder->encoder; > > drm_encoder->possible_crtcs = ENCODER_CRTC_MASK; > drm_encoder->possible_clones = 1 << 0; > @@ -718,7 +718,7 @@ static struct drm_encoder > *sti_tvout_create_hda_encoder(struct drm_device *dev, > > encoder->tvout = tvout; > > - drm_encoder = (struct drm_encoder *) encoder; > + drm_encoder = &encoder->encoder; > > drm_encoder->possible_crtcs = ENCODER_CRTC_MASK; > drm_encoder->possible_clones = 1 << 0; > @@ -767,7 +767,7 @@ static struct drm_encoder > *sti_tvout_create_hdmi_encoder(struct drm_device *dev, > > encoder->tvout = tvout; > > - drm_encoder = (struct drm_encoder *) encoder; > + drm_encoder = &encoder->encoder; > > drm_encoder->possible_crtcs = ENCODER_CRTC_MASK; > drm_encoder->possible_clones = 1 << 1; > -- > 2.16.4 > -- Benjamin Gaignard Graphic Study Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/2] drm/i915/icl: Fix MG PLL setup when refclk is 38.4MHz
> -Original Message- > From: Deak, Imre > Sent: Friday, June 15, 2018 8:09 PM > To: intel-gfx@lists.freedesktop.org > Cc: Kulkarni, Vandita ; Zanoni, Paulo R > ; Ausmus, James > Subject: [PATCH 1/2] drm/i915/icl: Fix MG PLL setup when refclk is > 38.4MHz > > Atm we're zeroing out fields in MG_PLL_BIAS and > MG_PLL_TDC_COLDST_BIAS if refclk is 38.4MHz, whereas the spec tells us > to preserve them. > Although the calculated values mostly match the register defaults even for > the 38.4MHz case, there are some differences wrt. what BIOS programs (I > noticed at least differences in the MG_PLL_BIAS/IREFTRIM and > MG_PLL_BIAS/BIASCAL_EN fields). In the lack of further info on how to > program these fields, just do what the spec says and preserve the BIOS > state. > > v2: > - Preserve the BIOS programmed reg fields instead of programming them. > > Cc: Vandita Kulkarni > Cc: Paulo Zanoni > Cc: James Ausmus > Signed-off-by: Imre Deak > Reviewed-by: James Ausmus (v1) > --- > drivers/gpu/drm/i915/intel_dpll_mgr.c | 63 > +-- > drivers/gpu/drm/i915/intel_dpll_mgr.h | 2 ++ > 2 files changed, 47 insertions(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c > b/drivers/gpu/drm/i915/intel_dpll_mgr.c > index 132fe63e042a..d4c7bacbe83e 100644 > --- a/drivers/gpu/drm/i915/intel_dpll_mgr.c > +++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c > @@ -2812,25 +2812,31 @@ static bool icl_calc_mg_pll_state(struct > intel_crtc_state *crtc_state, > MG_PLL_SSC_FLLEN | > MG_PLL_SSC_STEPSIZE(ssc_stepsize); > > - pll_state->mg_pll_tdc_coldst_bias = > MG_PLL_TDC_COLDST_COLDSTART; > + pll_state->mg_pll_tdc_coldst_bias = > MG_PLL_TDC_COLDST_COLDSTART | > + > MG_PLL_TDC_COLDST_IREFINT_EN | > + > MG_PLL_TDC_COLDST_REFBIAS_START_PULSE_W(iref_pulse_w) | > + MG_PLL_TDC_TDCOVCCORR_EN | > + MG_PLL_TDC_TDCSEL(3); > > - if (refclk_khz != 38400) { > - pll_state->mg_pll_tdc_coldst_bias |= > - MG_PLL_TDC_COLDST_IREFINT_EN | > - > MG_PLL_TDC_COLDST_REFBIAS_START_PULSE_W(iref_pulse_w) | > - MG_PLL_TDC_COLDST_COLDSTART | > - MG_PLL_TDC_TDCOVCCORR_EN | > - MG_PLL_TDC_TDCSEL(3); > + pll_state->mg_pll_bias = MG_PLL_BIAS_BIAS_GB_SEL(3) | > + MG_PLL_BIAS_INIT_DCOAMP(0x3F) | > + MG_PLL_BIAS_BIAS_BONUS(10) | > + MG_PLL_BIAS_BIASCAL_EN | > + MG_PLL_BIAS_CTRIM(12) | > + MG_PLL_BIAS_VREF_RDAC(4) | > + MG_PLL_BIAS_IREFTRIM(iref_trim); > > - pll_state->mg_pll_bias = MG_PLL_BIAS_BIAS_GB_SEL(3) | > - MG_PLL_BIAS_INIT_DCOAMP(0x3F) > | > - MG_PLL_BIAS_BIAS_BONUS(10) | > - MG_PLL_BIAS_BIASCAL_EN | > - MG_PLL_BIAS_CTRIM(12) | > - MG_PLL_BIAS_VREF_RDAC(4) | > - MG_PLL_BIAS_IREFTRIM(iref_trim); > + if (refclk_khz == 38400) { > + pll_state->mg_pll_tdc_coldst_bias_mask = > MG_PLL_TDC_COLDST_COLDSTART; > + pll_state->mg_pll_bias_mask = 0; > + } else { > + pll_state->mg_pll_tdc_coldst_bias_mask = -1U; > + pll_state->mg_pll_bias_mask = -1U; > } > > + pll_state->mg_pll_tdc_coldst_bias &= pll_state- > >mg_pll_tdc_coldst_bias_mask; > + pll_state->mg_pll_bias &= pll_state->mg_pll_bias_mask; > + > return true; > } > > @@ -2948,9 +2954,21 @@ static bool icl_pll_get_hw_state(struct > drm_i915_private *dev_priv, > hw_state->mg_pll_lf = I915_READ(MG_PLL_LF(port)); > hw_state->mg_pll_frac_lock = > I915_READ(MG_PLL_FRAC_LOCK(port)); > hw_state->mg_pll_ssc = I915_READ(MG_PLL_SSC(port)); > + > hw_state->mg_pll_bias = I915_READ(MG_PLL_BIAS(port)); > hw_state->mg_pll_tdc_coldst_bias = > I915_READ(MG_PLL_TDC_COLDST_BIAS(port)); > + > + if (dev_priv->cdclk.hw.ref == 38400) { > + hw_state->mg_pll_tdc_coldst_bias_mask = > MG_PLL_TDC_COLDST_COLDSTART; > + hw_state->mg_pll_bias_mask = 0; > + } else { > + hw_state->mg_pll_tdc_coldst_bias_mask = -1U; > + hw_state->mg_pll_bias_mask = -1U; > + } > + > + hw_state->mg_pll_tdc_coldst_bias &= hw_state- > >mg_pll_tdc_coldst_bias_mask; > + hw_state->mg_pll_bias &= hw_state->mg_pll_bias_mask; > break; > default: > MISSING_CASE(id); > @@ -2978,6 +2996,7 @@ static void icl_mg_pll_write(struct > drm_i91
Re: [Intel-gfx] [PATCH 05/14] drm/sti: Try to fix up the tvout possible clones
2018-06-15 18:49 GMT+02:00 Ville Syrjala : > From: Ville Syrjälä > > The current possible_clones setup doesn't look sensible. I'm assuming > the 0 and 1 are supposed to refer to the indexes of the hdmi and hda > encoders? So it kinda looks like we want hda+hdmi cloning, but then > dvo also claims to be cloneable with hdmi, but hdmi won't recipricate. All cloning combinaisons are possible: hdmi+hda, hda+dvo, hdmi+dvo. The correct solution should be: possible_clones = drm_encoder_mask(tvout->hdmi) | drm_encoder_mask(tvout->hda) | drm_encoder_mask(tvout->dvo); Thanks, Benjamin > > So let's assume we just want hdmi+hda and nothing more and populate the > possible_clones to match. The docs say the encoder itself should always > be included in the possible_clones bitmask so we'll throw it in there > as well. For hda we'll leave possible_clones==0 and we'll add a global > fallback for that case to add the encoder itself to the bitmask since > that makes life easier for most drivers. > > Cc: Benjamin Gaignard > Cc: Vincent Abriou > Signed-off-by: Ville Syrjälä > --- > drivers/gpu/drm/sti/sti_tvout.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c > index 7d495307fe79..2359c111c7ed 100644 > --- a/drivers/gpu/drm/sti/sti_tvout.c > +++ b/drivers/gpu/drm/sti/sti_tvout.c > @@ -668,7 +668,6 @@ sti_tvout_create_dvo_encoder(struct drm_device *dev, > drm_encoder = &encoder->encoder; > > drm_encoder->possible_crtcs = ENCODER_CRTC_MASK; > - drm_encoder->possible_clones = 1 << 0; > > drm_encoder_init(dev, drm_encoder, > &sti_tvout_encoder_funcs, DRM_MODE_ENCODER_LVDS, > @@ -721,7 +720,6 @@ static struct drm_encoder > *sti_tvout_create_hda_encoder(struct drm_device *dev, > drm_encoder = &encoder->encoder; > > drm_encoder->possible_crtcs = ENCODER_CRTC_MASK; > - drm_encoder->possible_clones = 1 << 0; > > drm_encoder_init(dev, drm_encoder, > &sti_tvout_encoder_funcs, DRM_MODE_ENCODER_DAC, NULL); > @@ -770,7 +768,6 @@ static struct drm_encoder > *sti_tvout_create_hdmi_encoder(struct drm_device *dev, > drm_encoder = &encoder->encoder; > > drm_encoder->possible_crtcs = ENCODER_CRTC_MASK; > - drm_encoder->possible_clones = 1 << 1; > > drm_encoder_init(dev, drm_encoder, > &sti_tvout_encoder_funcs, DRM_MODE_ENCODER_TMDS, > NULL); > @@ -786,6 +783,12 @@ static void sti_tvout_create_encoders(struct drm_device > *dev, > tvout->hdmi = sti_tvout_create_hdmi_encoder(dev, tvout); > tvout->hda = sti_tvout_create_hda_encoder(dev, tvout); > tvout->dvo = sti_tvout_create_dvo_encoder(dev, tvout); > + > + /* FIXME what's the correct thing here? */ > + tvout->hdmi->possible_clones = > + drm_encoder_mask(tvout->hdmi) | drm_encoder_mask(tvout->hda); > + tvout->hda->possible_clones = > + drm_encoder_mask(tvout->hdmi) | drm_encoder_mask(tvout->hda); > } > > static void sti_tvout_destroy_encoders(struct sti_tvout *tvout) > -- > 2.16.4 > -- Benjamin Gaignard Graphic Study Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [RFC] drm/i915: Fix assert_plane() warning on bootup with external display
On Sun, 17 Jun 2018, Azhar Shaikh wrote: > On KBL, WHL RVPs, booting up with an external display connected, triggers > below warning. This warning is not seen during hotplug. > > [3.615226] [ cut here ] > [3.619829] plane 1A assertion failure (expected on, current off) > [3.632039] WARNING: CPU: 2 PID: 354 at > drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb > [3.633920] iwlwifi :00:14.3: loaded firmware version 38.c0e03d94.0 > op_mode iwlmvm > [3.647157] Modules linked in: iwlwifi cfg80211 btusb btrtl btbcm btintel > bluetooth ecdh_generic > [3.647163] CPU: 2 PID: 354 Comm: frecon Not tainted > 4.17.0-rc7-50176-g655af12d39c2 #3 > [3.647165] Hardware name: Intel Corporation CoffeeLake Client > Platform/WhiskeyLake U DDR4 ERB, BIOS CNLSFWR1.R00.X140.B00.1804040304 > 04/04/2018 > [3.684509] RIP: 0010:assert_plane+0x71/0xbb > [3.764451] Call Trace: > [3.766888] intel_atomic_commit_tail+0xa97/0xb77 > [3.771569] intel_atomic_commit+0x26a/0x279 > [3.771572] drm_atomic_helper_set_config+0x5c/0x76 > [3.780670] __drm_mode_set_config_internal+0x66/0x109 > [3.780672] drm_mode_setcrtc+0x4c9/0x5cc > [3.780674] ? drm_mode_getcrtc+0x162/0x162 > [3.789774] ? drm_mode_getcrtc+0x162/0x162 > [3.798108] drm_ioctl_kernel+0x8d/0xe4 > [3.801926] drm_ioctl+0x27d/0x368 > [3.805311] ? drm_mode_getcrtc+0x162/0x162 > [3.805314] ? selinux_file_ioctl+0x14e/0x199 > [3.805317] vfs_ioctl+0x21/0x2f > [3.813812] do_vfs_ioctl+0x491/0x4b4 > [3.813813] ? security_file_ioctl+0x37/0x4b > [3.813816] ksys_ioctl+0x55/0x75 > [3.820672] __x64_sys_ioctl+0x1a/0x1e > [3.820674] do_syscall_64+0x51/0x5f > [3.820678] entry_SYSCALL_64_after_hwframe+0x44/0xa9 > [3.828221] RIP: 0033:0x7b5e04953967 > [3.835504] RSP: 002b:7fff2eafb6f8 EFLAGS: 0246 ORIG_RAX: > 0010 > [3.835505] RAX: ffda RBX: 0002 RCX: > 7b5e04953967 > [3.835505] RDX: 7fff2eafb730 RSI: c06864a2 RDI: > 000f > [3.835506] RBP: 7fff2eafb720 R08: R09: > > [3.835507] R10: 0070 R11: 0246 R12: > 000f > [3.879988] R13: 56bc9dd7d210 R14: 7fff2eafb730 R15: > c06864a2 > [3.887081] Code: 48 c7 c7 06 71 a5 be 84 c0 48 c7 c2 06 fd a3 be 48 89 f9 > 48 0f 44 ca 84 db 48 0f 45 d7 48 c7 c7 df d3 a4 be 31 c0 e8 af a0 c0 ff <0f> > 0b eb 2b 48 c7 c7 06 fd a3 be 84 c0 48 c7 c2 06 71 a5 be 48 > [3.905845] WARNING: CPU: 2 PID: 354 at > drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb > [3.920964] ---[ end trace dac692f4ac46391a ]--- > > The warning is seen when mode_setcrtc() is called for pipeB > during bootup and before we get a mode_setcrtc() for pipeA, > while doing update_crtcs() in intel_atomic_commit_tail(). > Now since, plane1A is still active after commit, update_crtcs() > is done for pipeA and eventually update_plane() for plane1A. > > intel_plane_state->ctl for plane1A is not updated since set_modecrtc() is > called for pipeB. So intel_plane_state->ctl for plane 1A will be 0x0. > So doing an update_plane() for plane1A, will result in clearing > PLANE_CTL_ENABLE bit, and hence the warning. > > To fix this warning, prior to updating the PLANE_CTL register with > intel_plane_state->ctl value, read PLANE_CTL register, OR it with > intel_plane_state->ctl and then write it to PLANE_CTL register > instead of just relying on intel_plane_state->ctl value. > > Signed-off-by: Azhar Shaikh > --- > drivers/gpu/drm/i915/intel_sprite.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_sprite.c > b/drivers/gpu/drm/i915/intel_sprite.c > index 344c0e709b19..b491b1fbdea1 100644 > --- a/drivers/gpu/drm/i915/intel_sprite.c > +++ b/drivers/gpu/drm/i915/intel_sprite.c > @@ -254,6 +254,7 @@ void intel_pipe_update_end(struct intel_crtc_state > *new_crtc_state) > uint32_t src_w = drm_rect_width(&plane_state->base.src) >> 16; > uint32_t src_h = drm_rect_height(&plane_state->base.src) >> 16; > unsigned long irqflags; > + u32 val; > > /* Sizes are 0 based */ > src_w--; > @@ -322,6 +323,8 @@ void intel_pipe_update_end(struct intel_crtc_state > *new_crtc_state) > I915_WRITE_FW(PLANE_POS(pipe, plane_id), (crtc_y << 16) | > crtc_x); > } > > + val = I915_READ_FW(PLANE_CTL(pipe, plane_id)); > + plane_ctl |= val; You get the warning backtrace from our state checker, the purpose of which is to ensure that our software state and hardware state match. This change defeats the purpose of the state checker by relying on the hardware state using a read-modify-write. The states will be out of sync and we won't even know. The real fix, I think at least before I grab another cup of desperately needed coffee, is to fix the state readout during probe
Re: [Intel-gfx] [PATCH v7 3/6] mfd: cros-ec: Increase maximum mkbp event size
Hi Lee, On 18/06/2018 09:44, Lee Jones wrote: > On Fri, 01 Jun 2018, Neil Armstrong wrote: > >> Having a 16 byte mkbp event size makes it possible to send CEC >> messages from the EC to the AP directly inside the mkbp event >> instead of first doing a notification and then a read. >> >> Signed-off-by: Stefan Adolfsson >> Signed-off-by: Neil Armstrong >> Tested-by: Enric Balletbo i Serra >> --- >> drivers/platform/chrome/cros_ec_proto.c | 40 >> + >> include/linux/mfd/cros_ec.h | 2 +- >> include/linux/mfd/cros_ec_commands.h| 19 >> 3 files changed, 51 insertions(+), 10 deletions(-) >> >> diff --git a/drivers/platform/chrome/cros_ec_proto.c >> b/drivers/platform/chrome/cros_ec_proto.c >> index e7bbdf9..c4f6c44 100644 >> --- a/drivers/platform/chrome/cros_ec_proto.c >> +++ b/drivers/platform/chrome/cros_ec_proto.c >> @@ -504,10 +504,31 @@ int cros_ec_cmd_xfer_status(struct cros_ec_device >> *ec_dev, >> } >> EXPORT_SYMBOL(cros_ec_cmd_xfer_status); >> >> +static int get_next_event_xfer(struct cros_ec_device *ec_dev, >> + struct cros_ec_command *msg, >> + int version, uint32_t size) >> +{ >> +int ret; >> + >> +msg->version = version; >> +msg->command = EC_CMD_GET_NEXT_EVENT; >> +msg->insize = size; >> +msg->outsize = 0; >> + >> +ret = cros_ec_cmd_xfer(ec_dev, msg); >> +if (ret > 0) { >> +ec_dev->event_size = ret - 1; >> +memcpy(&ec_dev->event_data, msg->data, ec_dev->event_size); >> +} >> + >> +return ret; >> +} >> + >> static int get_next_event(struct cros_ec_device *ec_dev) >> { >> u8 buffer[sizeof(struct cros_ec_command) + sizeof(ec_dev->event_data)]; >> struct cros_ec_command *msg = (struct cros_ec_command *)&buffer; >> +static int cmd_version = 1; >> int ret; >> >> if (ec_dev->suspended) { >> @@ -515,18 +536,19 @@ static int get_next_event(struct cros_ec_device >> *ec_dev) >> return -EHOSTDOWN; >> } >> >> -msg->version = 0; >> -msg->command = EC_CMD_GET_NEXT_EVENT; >> -msg->insize = sizeof(ec_dev->event_data); >> -msg->outsize = 0; >> +if (cmd_version == 1) { >> +ret = get_next_event_xfer(ec_dev, msg, cmd_version, >> +sizeof(struct ec_response_get_next_event_v1)); >> +if (ret < 0 || msg->result != EC_RES_INVALID_VERSION) >> +return ret; >> >> -ret = cros_ec_cmd_xfer(ec_dev, msg); >> -if (ret > 0) { >> -ec_dev->event_size = ret - 1; >> -memcpy(&ec_dev->event_data, msg->data, >> - sizeof(ec_dev->event_data)); >> +/* Fallback to version 0 for future send attempts */ >> +cmd_version = 0; >> } >> >> +ret = get_next_event_xfer(ec_dev, msg, cmd_version, >> + sizeof(struct ec_response_get_next_event)); >> + >> return ret; >> } >> >> diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h >> index f36125e..32caef3 100644 >> --- a/include/linux/mfd/cros_ec.h >> +++ b/include/linux/mfd/cros_ec.h >> @@ -147,7 +147,7 @@ struct cros_ec_device { >> bool mkbp_event_supported; >> struct blocking_notifier_head event_notifier; >> >> -struct ec_response_get_next_event event_data; >> +struct ec_response_get_next_event_v1 event_data; >> int event_size; >> u32 host_event_wake_mask; >> }; >> diff --git a/include/linux/mfd/cros_ec_commands.h >> b/include/linux/mfd/cros_ec_commands.h >> index f2edd99..cc0768e 100644 >> --- a/include/linux/mfd/cros_ec_commands.h >> +++ b/include/linux/mfd/cros_ec_commands.h >> @@ -2093,12 +2093,31 @@ union ec_response_get_next_data { >> uint32_t sysrq; >> } __packed; >> >> +union ec_response_get_next_data_v1 { >> +uint8_t key_matrix[16]; >> + >> +/* Unaligned */ > > That's funny! > >> +uint32_t host_event; >> + >> +uint32_t buttons; >> +uint32_t switches; >> +uint32_t sysrq; >> +uint32_t cec_events; >> +uint8_tcec_message[16]; > > Since there are some whitespace alignment issues in here. > >> +} __packed; > > How come these guys have kerneldoc headers? Can you explicit what should be changed here ? Thanks, Neil > >> struct ec_response_get_next_event { >> uint8_t event_type; >> /* Followed by event data if any */ >> union ec_response_get_next_data data; >> } __packed; >> >> +struct ec_response_get_next_event_v1 { >> +uint8_t event_type; >> +/* Followed by event data if any */ >> +union ec_response_get_next_data_v1 data; >> +} __packed; >> + >> /* Bit indices for buttons and switches.*/ >> /* Buttons */ >> #define EC_MKBP_POWER_BUTTON0 > ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 0/7] drm/i915: move towards kernel types
Quoting Jani Nikula (2018-06-15 12:08:23) > On Thu, 14 Jun 2018, Rodrigo Vivi wrote: > > On Wed, Jun 13, 2018 at 09:55:38AM +0300, Jani Nikula wrote: > >> On Tue, 12 Jun 2018, Lucas De Marchi wrote: > >> > On Tue, Jun 12, 2018 at 3:15 AM Jani Nikula > >> > wrote: > >> >> > >> >> On Tue, 12 Jun 2018, Tvrtko Ursulin > >> >> wrote: > >> >> > On 12/06/2018 10:19, Jani Nikula wrote: > >> >> >> Semi-RFC. Do we want to do this? Here's a batch of conversions that > >> >> >> shouldn't > >> >> >> conflict much with in-flight patches. > >> >> >> > >> >> >> The trouble with mixed use is that it's inconsistent, and any > >> >> >> remaining C99 > >> >> >> types will encourage their use. We could at least do the low hanging > >> >> >> fruit? > >> >> > > >> >> > Ack from me. Doesn't seem so big to cause much pain. > >> >> > > >> >> > When you say low-hanging fruit, that implies you only dealt with a > >> >> > particular class of occurrences? > >> >> > >> >> I meant the files which don't have massive amounts of C99 types and > >> >> aren't under active development right now. I just wanted to avoid > >> >> trouble for starters. ;) > >> > > >> > If using kernel types is where we want to go (which I agree with), > >> > maybe it would be better to have a single conversion rather than > >> > several small ones as we are doing with dev_priv -> i915? This allows > >> > in-flight-but-not-yet-sent patches to easily keep up with the changes > >> > rather than conflicting every other rebase. > >> > >> I'm thinking we can do a lot of changes without conflicting anything or > >> very little. At least for starters before the sudden ripping off the > >> band-aid. > > > > I'm with Lucas. I'd prefer one single massive move than many small ones. > > Easier for the internal maintenance. We fix it only once and not one per > > day for months and months like dev_priv/i915 case. > > For everything else, I believe smaller patches are easier. For example, > who is going to review the massive change? Halt everything until it's > reviewed and merged? For merge conflicts I think git can do a better job > of managing the rerere with piecemeal changes. Internal is not the only > consideration. I'm somewhere in the middle, but I have to agree changing everything with one patch would be bit too overwhelming for review. Regards, Joonas ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/3] drm/i915: Print prop name/id when rejecting it
On Mon, Jun 11, 2018 at 10:34:03PM +0300, Ville Syrjala wrote: > From: Ville Syrjälä > > Use the '[PROP:id:name]' format I introduced for the core in the driver > debug messages as well. > > Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter I'm wondering whether there's not some kind of macro magic we could do, but unfortunately printf style stuff is really not composable :-/ And our stuff isn't important enough to warant new %p modes either ... -Daniel > --- > drivers/gpu/drm/i915/intel_atomic.c | 6 -- > drivers/gpu/drm/i915/intel_atomic_plane.c | 6 -- > 2 files changed, 8 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_atomic.c > b/drivers/gpu/drm/i915/intel_atomic.c > index 61ddb5871d8a..b04952bacf77 100644 > --- a/drivers/gpu/drm/i915/intel_atomic.c > +++ b/drivers/gpu/drm/i915/intel_atomic.c > @@ -59,7 +59,8 @@ int intel_digital_connector_atomic_get_property(struct > drm_connector *connector, > else if (property == dev_priv->broadcast_rgb_property) > *val = intel_conn_state->broadcast_rgb; > else { > - DRM_DEBUG_ATOMIC("Unknown property %s\n", property->name); > + DRM_DEBUG_ATOMIC("Unknown property [PROP:%d:%s]\n", > + property->base.id, property->name); > return -EINVAL; > } > > @@ -95,7 +96,8 @@ int intel_digital_connector_atomic_set_property(struct > drm_connector *connector, > return 0; > } > > - DRM_DEBUG_ATOMIC("Unknown property %s\n", property->name); > + DRM_DEBUG_ATOMIC("Unknown property [PROP:%d:%s]\n", > + property->base.id, property->name); > return -EINVAL; > } > > diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c > b/drivers/gpu/drm/i915/intel_atomic_plane.c > index e8bf4cc499e1..dcba645cabb8 100644 > --- a/drivers/gpu/drm/i915/intel_atomic_plane.c > +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c > @@ -265,7 +265,8 @@ intel_plane_atomic_get_property(struct drm_plane *plane, > struct drm_property *property, > uint64_t *val) > { > - DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name); > + DRM_DEBUG_KMS("Unknown property [PROP:%d:%s]\n", > + property->base.id, property->name); > return -EINVAL; > } > > @@ -287,6 +288,7 @@ intel_plane_atomic_set_property(struct drm_plane *plane, > struct drm_property *property, > uint64_t val) > { > - DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name); > + DRM_DEBUG_KMS("Unknown property [PROP:%d:%s]\n", > + property->base.id, property->name); > return -EINVAL; > } > -- > 2.16.4 > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2] drm/i915: Dump the ringbuffer of the active request for debugging
Quoting Chris Wilson (2018-06-14 15:21:50) > Sometimes we need to see what instructions we emitted for a request to > try and gather a glimmer of insight into what the GPU is doing when it > stops responding. > > v2: Move ring dumping into its own routine > > Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Regards, Joonas ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Enable provoking vertex fix on Gen9 systems.
Quoting Chris Wilson (2018-06-15 22:06:05) > From: Kenneth Graunke > > The SF and clipper units mishandle the provoking vertex in some cases, > which can cause misrendering with shaders that use flat shaded inputs. > > There are chicken bits in 3D_CHICKEN3 (for SF) and FF_SLICE_CHICKEN > (for the clipper) that work around the issue. These registers are > unfortunately not part of the logical context (even the power context), > and so we must reload them every time we start executing in a context. > > Bugzilla: https://bugs.freedesktop.org/103047 > Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen One note below. > +++ b/drivers/gpu/drm/i915/intel_lrc.c > @@ -1575,11 +1575,21 @@ static u32 *gen9_init_indirectctx_bb(struct > intel_engine_cs *engine, u32 *batch) > /* WaFlushCoherentL3CacheLinesAtContextSwitch:skl,bxt,glk */ > batch = gen8_emit_flush_coherentl3_wa(engine, batch); > > + *batch++ = MI_LOAD_REGISTER_IMM(3); > + > /* WaDisableGatherAtSetShaderCommonSlice:skl,bxt,kbl,glk */ > - *batch++ = MI_LOAD_REGISTER_IMM(1); > *batch++ = i915_mmio_reg_offset(COMMON_SLICE_CHICKEN2); > *batch++ = _MASKED_BIT_DISABLE( > GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE); > + > + /* BSpec: 11391 */ > + *batch++ = i915_mmio_reg_offset(FF_SLICE_CHICKEN); > + *batch++ = > _MASKED_BIT_ENABLE(FF_SLICE_CHICKEN_CL_PROVOKING_VERTEX_FIX); > + > + /* BSpec: 11299 */ > + *batch++ = i915_mmio_reg_offset(_3D_CHICKEN3); > + *batch++ = _MASKED_BIT_ENABLE(_3D_CHICKEN_SF_PROVOKING_VERTEX_FIX); I'm almost betting that somebody will take one of these 3 off without noticing the distant LOAD_REGISTER_IMM(). To perfect this, const table of pairs and use ARRAY_SIZE()? Then we're also one step closer to the const W/A tables... Regards, Joonas ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Only show debug for state changes when banning
Quoting Chris Wilson (2018-06-18 10:31:35) > Since we trigger 10,000s of hangs and resets during selftesting, we emit > many, many thousands of lines of useless debug messages. Reduce the > frequency by only logging a change in state of a guilty context. > > Fixes: 14921f3cef85 ("drm/i915: Fix context ban and hang accounting for > client") > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Regards, Joonas ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2] drm/i915: Fix fallout of fake reset along resume
Quoting Chris Wilson (2018-06-16 23:25:34) > commit b2209e62a450 ("drm/i915/execlists: Reset the CSB head tracking on > reset/sanitization") and commit 1288786b18f7 ("drm/i915: Move GEM sanitize > from resume_early to resume") show the conflicting requirements on the > code. We must reset the GPU before trashing live state on a fast resume > (hibernation debug, or error paths), but we must only reset our state > tracking iff the GPU is reset (or power cycled). This is tricky if we > are disabling GPU reset to simulate broken hardware; we reset our state > tracking but the GPU is left intact and recovers from its stale state. > > v2: Again without the assertion for forcewake, no longer required since > commit b3ee09a4de33 ("drm/i915/ringbuffer: Fix context restore upon reset") > as the contexts are reset from the CS ensuring everything is powered up. > > Fixes: b2209e62a450 ("drm/i915/execlists: Reset the CSB head tracking on > reset/sanitization") > Fixes: 1288786b18f7 ("drm/i915: Move GEM sanitize from resume_early to > resume") > Signed-off-by: Chris Wilson > Cc: Tvrtko Ursulin > Cc: Mika Kuoppala > Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Regards, Joonas ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Enable provoking vertex fix on Gen9 systems.
Quoting Joonas Lahtinen (2018-06-18 10:03:24) > Quoting Chris Wilson (2018-06-15 22:06:05) > > From: Kenneth Graunke > > > > The SF and clipper units mishandle the provoking vertex in some cases, > > which can cause misrendering with shaders that use flat shaded inputs. > > > > There are chicken bits in 3D_CHICKEN3 (for SF) and FF_SLICE_CHICKEN > > (for the clipper) that work around the issue. These registers are > > unfortunately not part of the logical context (even the power context), > > and so we must reload them every time we start executing in a context. > > > > Bugzilla: https://bugs.freedesktop.org/103047 > > Signed-off-by: Chris Wilson > > Reviewed-by: Joonas Lahtinen Thanks, fingers crossed we don't discover a reason why we shouldn't do this for all contexts... Pushed. > One note below. > > > +++ b/drivers/gpu/drm/i915/intel_lrc.c > > @@ -1575,11 +1575,21 @@ static u32 *gen9_init_indirectctx_bb(struct > > intel_engine_cs *engine, u32 *batch) > > /* WaFlushCoherentL3CacheLinesAtContextSwitch:skl,bxt,glk */ > > batch = gen8_emit_flush_coherentl3_wa(engine, batch); > > > > + *batch++ = MI_LOAD_REGISTER_IMM(3); > > + > > /* WaDisableGatherAtSetShaderCommonSlice:skl,bxt,kbl,glk */ > > - *batch++ = MI_LOAD_REGISTER_IMM(1); > > *batch++ = i915_mmio_reg_offset(COMMON_SLICE_CHICKEN2); > > *batch++ = _MASKED_BIT_DISABLE( > > GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE); > > + > > + /* BSpec: 11391 */ > > + *batch++ = i915_mmio_reg_offset(FF_SLICE_CHICKEN); > > + *batch++ = > > _MASKED_BIT_ENABLE(FF_SLICE_CHICKEN_CL_PROVOKING_VERTEX_FIX); > > + > > + /* BSpec: 11299 */ > > + *batch++ = i915_mmio_reg_offset(_3D_CHICKEN3); > > + *batch++ = _MASKED_BIT_ENABLE(_3D_CHICKEN_SF_PROVOKING_VERTEX_FIX); > > I'm almost betting that somebody will take one of these 3 off without > noticing the distant LOAD_REGISTER_IMM(). To perfect this, const table > of pairs and use ARRAY_SIZE()? Then we're also one step closer to the > const W/A tables... I'll be back later to tidy this up. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/2] drm/i915/icl: Fix MG PLL setup when refclk is 38.4MHz
On Mon, Jun 18, 2018 at 11:11:30AM +0300, Kulkarni, Vandita wrote: > > > > -Original Message- > > From: Deak, Imre > > Sent: Friday, June 15, 2018 8:09 PM > > To: intel-gfx@lists.freedesktop.org > > Cc: Kulkarni, Vandita ; Zanoni, Paulo R > > ; Ausmus, James > > Subject: [PATCH 1/2] drm/i915/icl: Fix MG PLL setup when refclk is > > 38.4MHz > > > > Atm we're zeroing out fields in MG_PLL_BIAS and > > MG_PLL_TDC_COLDST_BIAS if refclk is 38.4MHz, whereas the spec tells us > > to preserve them. > > Although the calculated values mostly match the register defaults even for > > the 38.4MHz case, there are some differences wrt. what BIOS programs (I > > noticed at least differences in the MG_PLL_BIAS/IREFTRIM and > > MG_PLL_BIAS/BIASCAL_EN fields). In the lack of further info on how to > > program these fields, just do what the spec says and preserve the BIOS > > state. > > > > v2: > > - Preserve the BIOS programmed reg fields instead of programming them. > > > > Cc: Vandita Kulkarni > > Cc: Paulo Zanoni > > Cc: James Ausmus > > Signed-off-by: Imre Deak > > Reviewed-by: James Ausmus (v1) > > --- > > drivers/gpu/drm/i915/intel_dpll_mgr.c | 63 > > +-- > > drivers/gpu/drm/i915/intel_dpll_mgr.h | 2 ++ > > 2 files changed, 47 insertions(+), 18 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c > > b/drivers/gpu/drm/i915/intel_dpll_mgr.c > > index 132fe63e042a..d4c7bacbe83e 100644 > > --- a/drivers/gpu/drm/i915/intel_dpll_mgr.c > > +++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c > > @@ -2812,25 +2812,31 @@ static bool icl_calc_mg_pll_state(struct > > intel_crtc_state *crtc_state, > > MG_PLL_SSC_FLLEN | > > MG_PLL_SSC_STEPSIZE(ssc_stepsize); > > > > - pll_state->mg_pll_tdc_coldst_bias = > > MG_PLL_TDC_COLDST_COLDSTART; > > + pll_state->mg_pll_tdc_coldst_bias = > > MG_PLL_TDC_COLDST_COLDSTART | > > + > > MG_PLL_TDC_COLDST_IREFINT_EN | > > + > > MG_PLL_TDC_COLDST_REFBIAS_START_PULSE_W(iref_pulse_w) | > > + MG_PLL_TDC_TDCOVCCORR_EN | > > + MG_PLL_TDC_TDCSEL(3); > > > > - if (refclk_khz != 38400) { > > - pll_state->mg_pll_tdc_coldst_bias |= > > - MG_PLL_TDC_COLDST_IREFINT_EN | > > - > > MG_PLL_TDC_COLDST_REFBIAS_START_PULSE_W(iref_pulse_w) | > > - MG_PLL_TDC_COLDST_COLDSTART | > > - MG_PLL_TDC_TDCOVCCORR_EN | > > - MG_PLL_TDC_TDCSEL(3); > > + pll_state->mg_pll_bias = MG_PLL_BIAS_BIAS_GB_SEL(3) | > > +MG_PLL_BIAS_INIT_DCOAMP(0x3F) | > > +MG_PLL_BIAS_BIAS_BONUS(10) | > > +MG_PLL_BIAS_BIASCAL_EN | > > +MG_PLL_BIAS_CTRIM(12) | > > +MG_PLL_BIAS_VREF_RDAC(4) | > > +MG_PLL_BIAS_IREFTRIM(iref_trim); > > > > - pll_state->mg_pll_bias = MG_PLL_BIAS_BIAS_GB_SEL(3) | > > -MG_PLL_BIAS_INIT_DCOAMP(0x3F) > > | > > -MG_PLL_BIAS_BIAS_BONUS(10) | > > -MG_PLL_BIAS_BIASCAL_EN | > > -MG_PLL_BIAS_CTRIM(12) | > > -MG_PLL_BIAS_VREF_RDAC(4) | > > -MG_PLL_BIAS_IREFTRIM(iref_trim); > > + if (refclk_khz == 38400) { > > + pll_state->mg_pll_tdc_coldst_bias_mask = > > MG_PLL_TDC_COLDST_COLDSTART; > > + pll_state->mg_pll_bias_mask = 0; > > + } else { > > + pll_state->mg_pll_tdc_coldst_bias_mask = -1U; > > + pll_state->mg_pll_bias_mask = -1U; > > } > > > > + pll_state->mg_pll_tdc_coldst_bias &= pll_state- > > >mg_pll_tdc_coldst_bias_mask; > > + pll_state->mg_pll_bias &= pll_state->mg_pll_bias_mask; > > + > > return true; > > } > > > > @@ -2948,9 +2954,21 @@ static bool icl_pll_get_hw_state(struct > > drm_i915_private *dev_priv, > > hw_state->mg_pll_lf = I915_READ(MG_PLL_LF(port)); > > hw_state->mg_pll_frac_lock = > > I915_READ(MG_PLL_FRAC_LOCK(port)); > > hw_state->mg_pll_ssc = I915_READ(MG_PLL_SSC(port)); > > + > > hw_state->mg_pll_bias = I915_READ(MG_PLL_BIAS(port)); > > hw_state->mg_pll_tdc_coldst_bias = > > I915_READ(MG_PLL_TDC_COLDST_BIAS(port)); > > + > > + if (dev_priv->cdclk.hw.ref == 38400) { > > + hw_state->mg_pll_tdc_coldst_bias_mask = > > MG_PLL_TDC_COLDST_COLDSTART; > > + hw_state->mg_pll_bias_mask = 0; > > + } else { > > + hw_state->mg_pll_tdc_coldst_bias_mask = -1U; > > + hw_state->mg_pll_bias_mask = -1U; > > + } > > + > > + hw_state->mg_pll_tdc_coldst_bias &= hw_state- > > >mg_pll_tdc_coldst_bias_mask; > > +
Re: [Intel-gfx] [PATCH v2] drm/i915: Fix fallout of fake reset along resume
Quoting Joonas Lahtinen (2018-06-18 10:10:15) > Quoting Chris Wilson (2018-06-16 23:25:34) > > commit b2209e62a450 ("drm/i915/execlists: Reset the CSB head tracking on > > reset/sanitization") and commit 1288786b18f7 ("drm/i915: Move GEM sanitize > > from resume_early to resume") show the conflicting requirements on the > > code. We must reset the GPU before trashing live state on a fast resume > > (hibernation debug, or error paths), but we must only reset our state > > tracking iff the GPU is reset (or power cycled). This is tricky if we > > are disabling GPU reset to simulate broken hardware; we reset our state > > tracking but the GPU is left intact and recovers from its stale state. > > > > v2: Again without the assertion for forcewake, no longer required since > > commit b3ee09a4de33 ("drm/i915/ringbuffer: Fix context restore upon reset") > > as the contexts are reset from the CS ensuring everything is powered up. > > > > Fixes: b2209e62a450 ("drm/i915/execlists: Reset the CSB head tracking on > > reset/sanitization") > > Fixes: 1288786b18f7 ("drm/i915: Move GEM sanitize from resume_early to > > resume") > > Signed-off-by: Chris Wilson > > Cc: Tvrtko Ursulin > > Cc: Mika Kuoppala > > Cc: Joonas Lahtinen > > Reviewed-by: Joonas Lahtinen Sorry for causing the mess in the first place (I had a nagging doubt that there was a conflict, but assumed after a quick look at gem_eio we wouldn't actually hit a warning). Pushed, -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] Oops with i915
On Thu, Jun 07, 2018 at 11:06:33AM +0100, Sudip Mukherjee wrote: > Hi All, > > We are running v4.14.47 kernel and recently in one of our test cycle > we saw the below trace. I know this is not the usual way to raise a > BUG report, but since this was seen only once in one of the automated > test cycle so I donot have anything else apart from this trace. > Is this a known issue? Will appreciate any help in understanding what > the problem might be. > > [ 1176.909543] BUG: unable to handle kernel paging request at 8298fb0a > [ 1176.916565] IP: queued_spin_lock_slowpath+0xfc/0x142 > [ 1176.922111] *pdpt = 3367a001 *pde = > [ 1176.928534] Oops: 0002 [#1] PREEMPT SMP > [ 1177.002434] CPU: 2 PID: 24688 Comm: kworker/u8:4 Tainted: G U O > 4.14.47-20180606-a6b8390e8cc1de032b8314d1a5b193fe9e21f325 #1 > [ 1177.024120] Workqueue: events_unbound intel_atomic_commit_work > [ 1177.030630] task: ef2ee200 task.stack: efbf4000 > [ 1177.035685] EIP: queued_spin_lock_slowpath+0xfc/0x142 > [ 1177.041327] EFLAGS: 00010087 CPU: 2 > [ 1177.045212] EAX: 8298fb0a EBX: 3ba0 ECX: ee82489c EDX: f4656fc0 > [ 1177.052215] ESI: 000c EDI: 0001 EBP: efbf5e88 ESP: efbf5e78 > [ 1177.059217] DS: 007b ES: 007b FS: 00d8 GS: SS: 0068 > [ 1177.065239] CR0: 80050033 CR2: 8298fb0a CR3: 2e8ed320 CR4: 001006f0 > [ 1177.072240] Call Trace: > [ 1177.074973] _raw_spin_lock_irqsave+0x28/0x2d > [ 1177.079840] complete_all+0x12/0x36 > [ 1177.083737] drm_atomic_helper_commit_hw_done+0x3c/0x43 > [ 1177.089576] intel_atomic_commit_tail+0xa5f/0xbd9 > [ 1177.094832] ? wait_woken+0x5a/0x5a > [ 1177.098727] ? wait_woken+0x5a/0x5a > [ 1177.102622] intel_atomic_commit_work+0xb/0xd > [ 1177.107489] ? intel_atomic_commit_work+0xb/0xd > [ 1177.112551] process_one_work+0x109/0x1ee > [ 1177.117029] worker_thread+0x1a4/0x257 > [ 1177.121215] kthread+0xee/0xf3 > [ 1177.124625] ? rescuer_thread+0x207/0x207 > [ 1177.129103] ? kthread_create_on_node+0x1a/0x1a > [ 1177.134165] ret_from_fork+0x2e/0x38 > [ 1177.138156] Code: 12 09 de 89 f0 89 75 f0 c1 e8 10 66 87 41 02 89 c3 c1 e3 > 10 74 51 83 e0 03 c1 eb 12 6b c0 0c 05 c0 1f 7e c1 03 04 9d d8 b1 6c c1 <89> > 10 8b 42 04 85 c0 75 04 f3 90 eb f5 8b 1a 85 db 74 03 0f 0d > [ 1177.159204] EIP: queued_spin_lock_slowpath+0xfc/0x142 SS:ESP: 0068:efbf5e78 > [ 1177.166983] CR2: 8298fb0a A gentile ping on this issue. Can anyone please help me on this. -- Regards Sudip ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915/execlists: Pull the w/a LRI emission into a helper
Having the w/a registers as an open-coded table leaves a trap for the unwary; it would be easy to miss incrementing the LRI counter when adding a new register to the list. Instead, pull the list of registers into a table, so that we only need add new registers to that table rather than try and remember important side-effects of earlier chunks of GPU instructions. Suggested-by: Joonas Lahtinen Signed-off-by: Chris Wilson Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_reg.h | 3 +- drivers/gpu/drm/i915/intel_lrc.c | 60 +++- 2 files changed, 45 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 54ec7ab57ce8..1f928bac2532 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -156,6 +156,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) #define _PHY3(phy, ...) _PICK(phy, __VA_ARGS__) #define _MMIO_PHY3(phy, a, b, c) _MMIO(_PHY3(phy, a, b, c)) +#define __MASKED_FIELD(mask, value) ((mask) << 16 | (value)) #define _MASKED_FIELD(mask, value) ({ \ if (__builtin_constant_p(mask))\ BUILD_BUG_ON_MSG(((mask) & 0x), "Incorrect mask"); \ @@ -164,7 +165,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) if (__builtin_constant_p(mask) && __builtin_constant_p(value)) \ BUILD_BUG_ON_MSG((value) & ~(mask),\ "Incorrect value for mask"); \ - (mask) << 16 | (value); }) + __MASKED_FIELD(mask, value); }) #define _MASKED_BIT_ENABLE(a) ({ typeof(a) _a = (a); _MASKED_FIELD(_a, _a); }) #define _MASKED_BIT_DISABLE(a) (_MASKED_FIELD((a), 0)) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index edb21f331eee..58773071787f 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -1565,29 +1565,55 @@ static u32 *gen8_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch) return batch; } -static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch) -{ - *batch++ = MI_ARB_ON_OFF | MI_ARB_DISABLE; +struct lri { + i915_reg_t reg; + u32 value; +}; - /* WaFlushCoherentL3CacheLinesAtContextSwitch:skl,bxt,glk */ - batch = gen8_emit_flush_coherentl3_wa(engine, batch); +static u32 *emit_lri(u32 *batch, const struct lri *lri, unsigned int count) +{ + GEM_BUG_ON(!count || count > 63); - *batch++ = MI_LOAD_REGISTER_IMM(3); + *batch++ = MI_LOAD_REGISTER_IMM(count); + do { + *batch++ = i915_mmio_reg_offset(lri->reg); + *batch++ = lri->value; + } while (lri++, --count); + *batch++ = MI_NOOP; - /* WaDisableGatherAtSetShaderCommonSlice:skl,bxt,kbl,glk */ - *batch++ = i915_mmio_reg_offset(COMMON_SLICE_CHICKEN2); - *batch++ = _MASKED_BIT_DISABLE( - GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE); + return batch; +} - /* BSpec: 11391 */ - *batch++ = i915_mmio_reg_offset(FF_SLICE_CHICKEN); - *batch++ = _MASKED_BIT_ENABLE(FF_SLICE_CHICKEN_CL_PROVOKING_VERTEX_FIX); +static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch) +{ + static const struct lri lri[] = { + /* WaDisableGatherAtSetShaderCommonSlice:skl,bxt,kbl,glk */ + { + COMMON_SLICE_CHICKEN2, + __MASKED_FIELD(GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE, + 0), + }, + + /* BSpec: 11391 */ + { + FF_SLICE_CHICKEN, + __MASKED_FIELD(FF_SLICE_CHICKEN_CL_PROVOKING_VERTEX_FIX, + FF_SLICE_CHICKEN_CL_PROVOKING_VERTEX_FIX), + }, + + /* BSpec: 11299 */ + { + _3D_CHICKEN3, + __MASKED_FIELD(_3D_CHICKEN_SF_PROVOKING_VERTEX_FIX, + _3D_CHICKEN_SF_PROVOKING_VERTEX_FIX), + } + }; - /* BSpec: 11299 */ - *batch++ = i915_mmio_reg_offset(_3D_CHICKEN3); - *batch++ = _MASKED_BIT_ENABLE(_3D_CHICKEN_SF_PROVOKING_VERTEX_FIX); + *batch++ = MI_ARB_ON_OFF | MI_ARB_DISABLE; - *batch++ = MI_NOOP; + /* WaFlushCoherentL3CacheLinesAtContextSwitch:skl,bxt,glk */ + batch = gen8_emit_flush_coherentl3_wa(engine, batch); + batch = emit_lri(batch, lri, ARRAY_SIZE(lri)); /* WaClearSlmSpaceAtContextSwitch:kbl */ /* Actual scratch location is at 128 bytes offset */ -- 2.17.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH i-g-t] igt/gem_eio: Exercise set-wedging against request submission
Build up a large stockpile of requests, ~500,000, and feed them into the system at 20KHz whilst simultaneously triggering set-wedged in order to try and race i915_gem_set_wedged() against the engine->submit_request() callback. v2: Tweak sleep for flushing timer signals. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Antonio Argenziano --- tests/gem_eio.c | 111 1 file changed, 111 insertions(+) diff --git a/tests/gem_eio.c b/tests/gem_eio.c index 5faf7502b..f0dda8150 100644 --- a/tests/gem_eio.c +++ b/tests/gem_eio.c @@ -34,6 +34,8 @@ #include #include #include +#include +#include #include #include #include @@ -43,6 +45,7 @@ #include "igt.h" #include "igt_device.h" #include "igt_sysfs.h" +#include "i915/gem_ring.h" #include "sw_sync.h" IGT_TEST_DESCRIPTION("Test that specific ioctls report a wedged GPU (EIO)."); @@ -705,6 +708,111 @@ static void test_reset_stress(int fd, unsigned int flags) gem_context_destroy(fd, ctx0); } +static void notify(union sigval arg) +{ + sw_sync_timeline_inc(arg.sival_int, 1); +} + +static void test_set_wedged(int fd) +{ +#define NCTX 4096 + const uint32_t bbe = MI_BATCH_BUFFER_END; + const unsigned int ring_size = gem_measure_ring_inflight(fd, 0, 0) - 1; + struct drm_i915_gem_execbuffer2 execbuf; + struct drm_i915_gem_exec_object2 obj; + int dir = igt_debugfs_dir(fd); + struct itimerspec its; + struct sigevent sev; + uint32_t *contexts; + timer_t timer; + int timeline; + int syncpt; + + igt_require_sw_sync(); + igt_require(gem_has_contexts(fd)); + + contexts = calloc(NCTX, sizeof(*contexts)); + igt_assert(contexts); + + for (int n = 0; n < NCTX; n++) + contexts[n] = context_create_safe(fd); + + memset(&obj, 0, sizeof(obj)); + obj.handle = gem_create(fd, 4096); + gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe)); + + memset(&execbuf, 0, sizeof(execbuf)); + execbuf.buffers_ptr = to_user_pointer(&obj); + execbuf.buffer_count = 1; + execbuf.flags = I915_EXEC_FENCE_IN; + + for (unsigned int nctx = 1; nctx <= NCTX; nctx <<= 1) { + unsigned int nrq = ring_size; + if (!gem_has_execlists(fd)) { + nrq = (ring_size + nctx - 1) / nctx + 1; + nctx = ring_size / nrq + 1; + } + igt_assert(nrq); + igt_assert(nctx); + + timeline = sw_sync_timeline_create(); + + /* Build up a large orderly queue of requests */ + syncpt = 1; + for (int m = 0; m < nrq; m++) { + for (int n = 0; n < nctx; n++) { + execbuf.rsvd1 = contexts[n]; + execbuf.rsvd2 = + sw_sync_timeline_create_fence(timeline, syncpt); + gem_execbuf(fd, &execbuf); + close(execbuf.rsvd2); + + syncpt++; + } + } + igt_debug("Queued %d requests over %d contexts\n", + syncpt, nctx); + + igt_require(i915_reset_control(false)); + + /* Feed each request in at 20KHz */ + memset(&sev, 0, sizeof(sev)); + sev.sigev_notify = SIGEV_THREAD; + sev.sigev_value.sival_int = timeline; + sev.sigev_notify_function = notify; + igt_assert(timer_create(CLOCK_MONOTONIC, &sev, &timer) == 0); + + memset(&its, 0, sizeof(its)); + its.it_interval.tv_sec = 0; + its.it_interval.tv_nsec = 5000; + its.it_value = its.it_interval; + igt_assert(timer_settime(timer, 0, &its, NULL) == 0); + usleep(10); + + igt_debug("Triggering wedge\n"); + igt_sysfs_set(dir, "i915_wedged", "-1"); + + igt_debug("Disabling timer\n"); + timer_delete(timer); + usleep(1);/* timer_delete() doesn't flush pending signals */ + + igt_debug("Cleaning up\n"); + close(timeline); + + sched_yield(); + igt_assert(!gem_bo_busy(fd, obj.handle)); + + igt_assert(i915_reset_control(true)); + trigger_reset(fd); + } + + gem_close(fd, obj.handle); + for (int n = 0; n < NCTX; n++) + gem_context_destroy(fd, contexts[n]); + free(contexts); + close(dir); +} + static int fd = -1; static void @@ -795,4 +903,7 @@ igt_main } } } + + igt_subtest("set-wedged-racing") + test_set_wedged(fd); } -- 2.17.1 ___ Intel-gfx mailing list Intel-gf
[Intel-gfx] [PATCH 2/2] drm/i915/gtt: Full ppgtt everywhere, no excuses
We believe we have all the kinks worked out, even for the early Valleyview devices, for whom we currently disable all ppgtt. References: 62942ed7279d ("drm/i915/vlv: disable PPGTT on early revs v3") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Acked-by: Ville Syrjälä --- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 5ef5176e10fe..dbc55ae234ac 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -173,12 +173,6 @@ int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv, return 0; } - /* Early VLV doesn't have this */ - if (IS_VALLEYVIEW(dev_priv) && dev_priv->drm.pdev->revision < 0xb) { - DRM_DEBUG_DRIVER("disabling PPGTT on pre-B3 step VLV\n"); - return 0; - } - if (has_full_48bit_ppgtt) return 3; -- 2.17.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/2] drm/i915/gtt: Enable full-ppgtt by default everywhere
We should we have all the kinks worked out and full-ppgtt now works reliably on gen7 (Ivybridge, Valleyview/Baytrail and Haswell). If we can let userspace have full control over their own ppgtt, it makes softpinning far more effective, in turn making GPU dispatch far more efficient and more secure (due to better mm segregation). On the other hand, switching over to a different GTT for every client does incur noticeable overhead. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Matthew Auld Reviewed-by: Joonas Lahtinen Cc: Jason Ekstrand Cc: Kenneth Graunke --- This has been run through piglit for ivb/vlv/hsw locally and hsw on kernel's CI, but we would like at least one ack from Mesa as well. If it's possible to run it through the full gamut of your testing, that would be great. -Chris --- drivers/gpu/drm/i915/i915_gem_gtt.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index c6aa761ca085..5ef5176e10fe 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -179,13 +179,11 @@ int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv, return 0; } - if (HAS_LOGICAL_RING_CONTEXTS(dev_priv)) { - if (has_full_48bit_ppgtt) - return 3; + if (has_full_48bit_ppgtt) + return 3; - if (has_full_ppgtt) - return 2; - } + if (has_full_ppgtt) + return 2; return 1; } -- 2.17.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/2] drm/i915/gtt: Enable full-ppgtt by default everywhere
Quoting Chris Wilson (2018-06-18 11:10:23) > We should we have all the kinks worked out and full-ppgtt now works > reliably on gen7 (Ivybridge, Valleyview/Baytrail and Haswell). If we can > let userspace have full control over their own ppgtt, it makes softpinning > far more effective, in turn making GPU dispatch far more efficient and > more secure (due to better mm segregation). On the other hand, switching > over to a different GTT for every client does incur noticeable overhead. > > Signed-off-by: Chris Wilson > Cc: Joonas Lahtinen > Cc: Mika Kuoppala > Cc: Matthew Auld > Reviewed-by: Joonas Lahtinen > Cc: Jason Ekstrand > Cc: Kenneth Graunke > --- > > This has been run through piglit for ivb/vlv/hsw locally and hsw on > kernel's CI, but we would like at least one ack from Mesa as well. If > it's possible to run it through the full gamut of your testing, that > would be great. The patches applies to drm-tip, and requires fixes in drm-tip for at least one GPU hang full-ppgtt caused in piglit. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 1/2] drm/i915/uc: Fetch GuC/HuC firmwares from guc/huc specific init
We're fetching GuC/HuC firmwares directly from uc level during init_early stage but this breaks guc/huc struct isolation and also strict SW-only initialization rule. Move fw fetching to init phase and do it separately per guc/huc struct. v2: don't forget to move wopcm_init - Michele Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Michel Thierry --- drivers/gpu/drm/i915/i915_gem.c | 8 drivers/gpu/drm/i915/intel_guc.c | 7 ++- drivers/gpu/drm/i915/intel_huc.c | 8 drivers/gpu/drm/i915/intel_huc.h | 6 ++ drivers/gpu/drm/i915/intel_uc.c | 37 - 5 files changed, 44 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 822abf4..6a0fa53 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -5456,10 +5456,6 @@ int i915_gem_init(struct drm_i915_private *dev_priv) if (ret) return ret; - ret = intel_wopcm_init(&dev_priv->wopcm); - if (ret) - return ret; - ret = intel_uc_init_misc(dev_priv); if (ret) return ret; @@ -5497,6 +5493,10 @@ int i915_gem_init(struct drm_i915_private *dev_priv) if (ret) goto err_pm; + ret = intel_wopcm_init(&dev_priv->wopcm); + if (ret) + goto err_uc_init; + ret = i915_gem_init_hw(dev_priv); if (ret) goto err_uc_init; diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c index 1aff30b..a63a86f 100644 --- a/drivers/gpu/drm/i915/intel_guc.c +++ b/drivers/gpu/drm/i915/intel_guc.c @@ -167,9 +167,11 @@ int intel_guc_init(struct intel_guc *guc) struct drm_i915_private *dev_priv = guc_to_i915(guc); int ret; + intel_uc_fw_fetch(dev_priv, &guc->fw); + ret = guc_shared_data_create(guc); if (ret) - return ret; + goto err_fetch; GEM_BUG_ON(!guc->shared_data); ret = intel_guc_log_create(&guc->log); @@ -190,6 +192,8 @@ int intel_guc_init(struct intel_guc *guc) intel_guc_log_destroy(&guc->log); err_shared: guc_shared_data_destroy(guc); +err_fetch: + intel_uc_fw_fini(&guc->fw); return ret; } @@ -201,6 +205,7 @@ void intel_guc_fini(struct intel_guc *guc) intel_guc_ads_destroy(guc); intel_guc_log_destroy(&guc->log); guc_shared_data_destroy(guc); + intel_uc_fw_fini(&guc->fw); } static u32 guc_ctl_debug_flags(struct intel_guc *guc) diff --git a/drivers/gpu/drm/i915/intel_huc.c b/drivers/gpu/drm/i915/intel_huc.c index 2912852..8a884d7 100644 --- a/drivers/gpu/drm/i915/intel_huc.c +++ b/drivers/gpu/drm/i915/intel_huc.c @@ -32,6 +32,14 @@ void intel_huc_init_early(struct intel_huc *huc) intel_huc_fw_init_early(huc); } +int intel_huc_init(struct intel_huc *huc) +{ + struct drm_i915_private *i915 = huc_to_i915(huc); + + intel_uc_fw_fetch(i915, &huc->fw); + return 0; +} + /** * intel_huc_auth() - Authenticate HuC uCode * @huc: intel_huc structure diff --git a/drivers/gpu/drm/i915/intel_huc.h b/drivers/gpu/drm/i915/intel_huc.h index aa85490..21e600c 100644 --- a/drivers/gpu/drm/i915/intel_huc.h +++ b/drivers/gpu/drm/i915/intel_huc.h @@ -36,9 +36,15 @@ struct intel_huc { }; void intel_huc_init_early(struct intel_huc *huc); +int intel_huc_init(struct intel_huc *huc); int intel_huc_auth(struct intel_huc *huc); int intel_huc_check_status(struct intel_huc *huc); +static inline void intel_huc_fini(struct intel_huc *huc) +{ + intel_uc_fw_fini(&huc->fw); +} + static inline int intel_huc_sanitize(struct intel_huc *huc) { intel_uc_fw_sanitize(&huc->fw); diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c index 94e8863..ec3c37c 100644 --- a/drivers/gpu/drm/i915/intel_uc.c +++ b/drivers/gpu/drm/i915/intel_uc.c @@ -171,24 +171,11 @@ void intel_uc_init_early(struct drm_i915_private *i915) intel_huc_init_early(huc); sanitize_options_early(i915); - - if (USES_GUC(i915)) - intel_uc_fw_fetch(i915, &guc->fw); - - if (USES_HUC(i915)) - intel_uc_fw_fetch(i915, &huc->fw); } void intel_uc_cleanup_early(struct drm_i915_private *i915) { struct intel_guc *guc = &i915->guc; - struct intel_huc *huc = &i915->huc; - - if (USES_HUC(i915)) - intel_uc_fw_fini(&huc->fw); - - if (USES_GUC(i915)) - intel_uc_fw_fini(&guc->fw); guc_free_load_err_log(guc); } @@ -279,6 +266,7 @@ void intel_uc_fini_misc(struct drm_i915_private *i915) int intel_uc_init(struct drm_i915_private *i915) { struct intel_guc *guc = &i915->guc; + struct intel_huc *huc = &i915->huc; int ret; if (!USES_GUC(i915)) @@ -291,24 +279,36 @@ int intel_uc_init(struct drm_i915_private *i915) if (ret) retu
[Intel-gfx] [PATCH v2 2/2] HAX enable GuC for CI
Signed-off-by: Michal Wajdeczko --- drivers/gpu/drm/i915/i915_params.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h index aebe046..3e4e128 100644 --- a/drivers/gpu/drm/i915/i915_params.h +++ b/drivers/gpu/drm/i915/i915_params.h @@ -47,7 +47,7 @@ param(int, disable_power_well, -1) \ param(int, enable_ips, 1) \ param(int, invert_brightness, 0) \ - param(int, enable_guc, 0) \ + param(int, enable_guc, -1) \ param(int, guc_log_level, -1) \ param(char *, guc_firmware_path, NULL) \ param(char *, huc_firmware_path, NULL) \ -- 1.9.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/guc: Print CTL params passed to Guc
On Sat, 16 Jun 2018 01:30:09 +0200, Patchwork wrote: == Series Details == Series: drm/i915/guc: Print CTL params passed to Guc URL : https://patchwork.freedesktop.org/series/44834/ State : failure == Summary == = CI Bug Log - changes from CI_DRM_4325_full -> Patchwork_9327_full = == Summary - FAILURE == Serious unknown changes coming with Patchwork_9327_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9327_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9327_full: === IGT changes === Possible regressions igt@drv_selftest@live_hangcheck: shard-kbl: PASS -> DMESG-FAIL Warnings igt@drv_selftest@live_execlists: shard-apl: SKIP -> PASS +1 igt@gem_exec_schedule@deep-render: shard-kbl: SKIP -> PASS it must be unrelated, as due to below config this change was nop ;) # CONFIG_DRM_I915_DEBUG_GUC is not set == Known issues == Here are the changes found in Patchwork_9327_full that come from known issues: === IGT changes === Issues hit igt@drv_suspend@shrink: shard-snb: PASS -> INCOMPLETE (fdo#105411) igt@gem_exec_big: shard-hsw: PASS -> INCOMPLETE (fdo#103540) igt@kms_flip@2x-flip-vs-expired-vblank-interruptible: shard-glk: PASS -> FAIL (fdo#105189) igt@kms_flip@2x-plain-flip-ts-check-interruptible: shard-hsw: PASS -> FAIL (fdo#103928) igt@kms_flip_tiling@flip-y-tiled: shard-glk: PASS -> FAIL (fdo#104724) igt@kms_setmode@basic: shard-apl: PASS -> FAIL (fdo#99912) Possible fixes igt@drv_selftest@live_hangcheck: shard-apl: DMESG-FAIL -> PASS igt@kms_atomic_transition@1x-modeset-transitions-nonblocking: shard-glk: FAIL (fdo#105703) -> PASS igt@kms_flip@flip-vs-expired-vblank-interruptible: shard-glk: FAIL (fdo#105363) -> PASS igt@kms_setmode@basic: shard-kbl: FAIL (fdo#99912) -> PASS Warnings igt@drv_selftest@live_gtt: shard-glk: FAIL (fdo#105347) -> INCOMPLETE (fdo#103359, k.org#198133) fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359 fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540 fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928 fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724 fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189 fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347 fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363 fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411 fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703 fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912 k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * Linux: CI_DRM_4325 -> Patchwork_9327 CI_DRM_4325: 4275ebe85ad179007c49b7bcf78d340b7681871e @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4520: 91f5d4665b07f073c78abd3cd4b8e0e347dbf638 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9327: fd446e2e7ecc404cb033f64bc40ab0aa06106cd7 @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9327/shards.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/guc: Print CTL params passed to Guc
On Fri, Jun 15, 2018 at 02:10:56PM +, Michal Wajdeczko wrote: > While debugging we may want to examine params passed to GuC. > Print them all if config I915_DEBUG_GUC is enabled. > > Signed-off-by: Michal Wajdeczko > Cc: Daniele Ceraolo Spurio > Cc: Michel Thierry > --- > drivers/gpu/drm/i915/intel_guc.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_guc.c > b/drivers/gpu/drm/i915/intel_guc.c > index 1aff30b..f84fbde 100644 > --- a/drivers/gpu/drm/i915/intel_guc.c > +++ b/drivers/gpu/drm/i915/intel_guc.c > @@ -327,6 +327,11 @@ void intel_guc_init_params(struct intel_guc *guc) > params[GUC_CTL_DEBUG] = guc_ctl_debug_flags(guc); > params[GUC_CTL_CTXINFO] = guc_ctl_ctxinfo_flags(guc); > > +#ifdef CONFIG_DRM_I915_DEBUG_GUC > + for (i = 0; i < GUC_CTL_MAX_DWORDS; i++) > + DRM_DEBUG_DRIVER("param[%2d] = %#x\n", i, params[i]); > +#endif > + It's not even called if we're not using GuC, please drop the ifdef. We don't want to sprinkle #ifdefs for GuC debug all over the place, and if we do care about differentiation between GuC related stuff, we should probably create a separate printer (like for GuC CT). -Michał > /* >* All SOFT_SCRATCH registers are in FORCEWAKE_BLITTER domain and >* they are power context saved so it's ok to release forcewake > -- > 1.9.1 > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/execlists: Pull the w/a LRI emission into a helper
Quoting Chris Wilson (2018-06-18 12:41:50) > Having the w/a registers as an open-coded table leaves a trap for the > unwary; it would be easy to miss incrementing the LRI counter when > adding a new register to the list. Instead, pull the list of registers > into a table, so that we only need add new registers to that table > rather than try and remember important side-effects of earlier chunks of > GPU instructions. > > Suggested-by: Joonas Lahtinen > Signed-off-by: Chris Wilson > Cc: Joonas Lahtinen Not related to this patch, but the lack of OOB check for batch makes one itch a little bit. Reviewed-by: Joonas Lahtinen Regards, Joonas ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 5/5] drm/i915: Replace drm_dev_unref with drm_dev_put
This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/i915/selftests/huge_pages.c| 2 +- drivers/gpu/drm/i915/selftests/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_evict.c| 2 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 2 +- drivers/gpu/drm/i915/selftests/i915_request.c | 2 +- drivers/gpu/drm/i915/selftests/i915_vma.c | 2 +- drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/selftests/huge_pages.c b/drivers/gpu/drm/i915/selftests/huge_pages.c index fbe4324116d7..b5e87fcdcdae 100644 --- a/drivers/gpu/drm/i915/selftests/huge_pages.c +++ b/drivers/gpu/drm/i915/selftests/huge_pages.c @@ -1724,7 +1724,7 @@ int i915_gem_huge_page_mock_selftests(void) i915_modparams.enable_ppgtt = saved_ppgtt; - drm_dev_unref(&dev_priv->drm); + drm_dev_put(&dev_priv->drm); return err; } diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c index 836f1af8b833..07fd3fe24157 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c @@ -586,7 +586,7 @@ int i915_gem_context_mock_selftests(void) err = i915_subtests(tests, i915); - drm_dev_unref(&i915->drm); + drm_dev_put(&i915->drm); return err; } diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c index 89dc25a5a53b..a7055b12e53c 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c @@ -389,7 +389,7 @@ int i915_gem_dmabuf_mock_selftests(void) err = i915_subtests(tests, i915); - drm_dev_unref(&i915->drm); + drm_dev_put(&i915->drm); return err; } diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c index 2dc72a984d45..8059268800fa 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c @@ -490,7 +490,7 @@ int i915_gem_evict_mock_selftests(void) err = i915_subtests(tests, i915); mutex_unlock(&i915->drm.struct_mutex); - drm_dev_unref(&i915->drm); + drm_dev_put(&i915->drm); return err; } diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c index a4060238bef0..a28ee0cc6a63 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c @@ -1644,7 +1644,7 @@ int i915_gem_gtt_mock_selftests(void) err = i915_subtests(tests, i915); mutex_unlock(&i915->drm.struct_mutex); - drm_dev_unref(&i915->drm); + drm_dev_put(&i915->drm); return err; } diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_object.c b/drivers/gpu/drm/i915/selftests/i915_gem_object.c index 2b2dde94526f..549707b9d738 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_object.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_object.c @@ -586,7 +586,7 @@ int i915_gem_object_mock_selftests(void) err = i915_subtests(tests, i915); - drm_dev_unref(&i915->drm); + drm_dev_put(&i915->drm); return err; } diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c index 63cd9486cc13..521ae4a90ddf 100644 --- a/drivers/gpu/drm/i915/selftests/i915_request.c +++ b/drivers/gpu/drm/i915/selftests/i915_request.c @@ -262,7 +262,7 @@ int i915_request_mock_selftests(void) return -ENOMEM; err = i915_subtests(tests, i915); - drm_dev_unref(&i915->drm); + drm_dev_put(&i915->drm); return err; } diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c index 8400a8cc5cf2..ffa74290e054 100644 --- a/drivers/gpu/drm/i915/selftests/i915_vma.c +++ b/drivers/gpu/drm/i915/selftests/i915_vma.c @@ -733,7 +733,7 @@ int i915_vma_mock_selftests(void) err = i915_subtests(tests, i915); mutex_unlock(&i915->drm.struct_mutex); - drm_dev_unref(&i915->drm); + drm_dev_put(&i915->drm); return err; } diff --git a/drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c b/drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c index d6926e7820e5..f03b407fdbe2 100644 --- a/drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c +++ b/drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c @@ -464,7 +464,7 @@ int intel_breadcrumbs_mock_selftests(void) return -ENOMEM; err = i915_s
[Intel-gfx] [PATCH 4/5] drm/i915: Replace drm_gem_object_unreference_unlocked with put function
This patch unifies the naming of DRM functions for reference counting of struct drm_gem_object. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/i915/i915_gem_object.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_object.h b/drivers/gpu/drm/i915/i915_gem_object.h index 0042496216fe..c3c6f2e588fb 100644 --- a/drivers/gpu/drm/i915/i915_gem_object.h +++ b/drivers/gpu/drm/i915/i915_gem_object.h @@ -348,9 +348,6 @@ i915_gem_object_put(struct drm_i915_gem_object *obj) __drm_gem_object_put(&obj->base); } -__deprecated -extern void drm_gem_object_unreference_unlocked(struct drm_gem_object *); - static inline void i915_gem_object_lock(struct drm_i915_gem_object *obj) { reservation_object_lock(obj->resv, NULL); -- 2.14.4 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 2/5] drm/i915: Replace drm_gem_object_{un/reference} with {put, get} functions
This patch unifies the naming of DRM functions for reference counting of struct drm_gem_object. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/i915/i915_gem_object.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_object.h b/drivers/gpu/drm/i915/i915_gem_object.h index 54f00b350779..da6e849f41a4 100644 --- a/drivers/gpu/drm/i915/i915_gem_object.h +++ b/drivers/gpu/drm/i915/i915_gem_object.h @@ -337,13 +337,10 @@ __attribute__((nonnull)) static inline struct drm_i915_gem_object * i915_gem_object_get(struct drm_i915_gem_object *obj) { - drm_gem_object_reference(&obj->base); + drm_gem_object_get(&obj->base); return obj; } -__deprecated -extern void drm_gem_object_reference(struct drm_gem_object *); - __attribute__((nonnull)) static inline void i915_gem_object_put(struct drm_i915_gem_object *obj) @@ -351,9 +348,6 @@ i915_gem_object_put(struct drm_i915_gem_object *obj) __drm_gem_object_unreference(&obj->base); } -__deprecated -extern void drm_gem_object_unreference(struct drm_gem_object *); - __deprecated extern void drm_gem_object_unreference_unlocked(struct drm_gem_object *); -- 2.14.4 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/5] drm/i915: Replace drm_connector_{un/reference} with put, get functions
This patch unifies the naming of DRM functions for reference counting of struct drm_connector. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_dp_mst.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9939e092d9aa..593979cbd215 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -10725,7 +10725,7 @@ static void intel_modeset_update_connector_atomic_state(struct drm_device *dev) drm_connector_list_iter_begin(dev, &conn_iter); for_each_intel_connector_iter(connector, &conn_iter) { if (connector->base.state->crtc) - drm_connector_unreference(&connector->base); + drm_connector_put(&connector->base); if (connector->base.encoder) { connector->base.state->best_encoder = @@ -10733,7 +10733,7 @@ static void intel_modeset_update_connector_atomic_state(struct drm_device *dev) connector->base.state->crtc = connector->base.encoder->crtc; - drm_connector_reference(&connector->base); + drm_connector_get(&connector->base); } else { connector->base.state->best_encoder = NULL; connector->base.state->crtc = NULL; diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c index 5890500a3a8b..789a403e9f99 100644 --- a/drivers/gpu/drm/i915/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/intel_dp_mst.c @@ -524,7 +524,7 @@ static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr, intel_connector->mst_port = NULL; drm_modeset_unlock(&connector->dev->mode_config.connection_mutex); - drm_connector_unreference(connector); + drm_connector_put(connector); } static void intel_dp_mst_hotplug(struct drm_dp_mst_topology_mgr *mgr) -- 2.14.4 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 0/5] drm/i915: Replace {un/reference} with {put, get} functions
This patch set replaces functions named {un,reference} by their {put,get} counterparts. Affected data types are struct drm_connector, struct drm_gem_object, and struct drm_device. With the reference-counting functions being named {put,get}, the DRM interface is more aligned to Linux kernel nameing standard. The patch set does not change driver-internal interfaces. Thomas Zimmermann (5): drm/i915: Replace drm_connector_{un/reference} with put,get functions drm/i915: Replace drm_gem_object_{un/reference} with {put,get} functions drm/i915: Replace __drm_gem_object_unreference with __drm_gem_object_put drm/i915: Replace drm_gem_object_unreference_unlocked with put function drm/i915: Replace drm_dev_unref with drm_dev_put drivers/gpu/drm/i915/i915_gem_object.h | 13 ++--- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_dp_mst.c| 2 +- drivers/gpu/drm/i915/selftests/huge_pages.c| 2 +- drivers/gpu/drm/i915/selftests/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_evict.c| 2 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 2 +- drivers/gpu/drm/i915/selftests/i915_request.c | 2 +- drivers/gpu/drm/i915/selftests/i915_vma.c | 2 +- drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 2 +- 12 files changed, 14 insertions(+), 23 deletions(-) -- 2.14.4 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 3/5] drm/i915: Replace __drm_gem_object_unreference with __drm_gem_object_put
This patch unifies the naming of DRM functions for reference counting of struct drm_gem_object. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/i915/i915_gem_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_object.h b/drivers/gpu/drm/i915/i915_gem_object.h index da6e849f41a4..0042496216fe 100644 --- a/drivers/gpu/drm/i915/i915_gem_object.h +++ b/drivers/gpu/drm/i915/i915_gem_object.h @@ -345,7 +345,7 @@ __attribute__((nonnull)) static inline void i915_gem_object_put(struct drm_i915_gem_object *obj) { - __drm_gem_object_unreference(&obj->base); + __drm_gem_object_put(&obj->base); } __deprecated -- 2.14.4 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915/gtt: Enable full-ppgtt by default everywhere
== Series Details == Series: series starting with [1/2] drm/i915/gtt: Enable full-ppgtt by default everywhere URL : https://patchwork.freedesktop.org/series/44925/ State : warning == Summary == $ dim checkpatch origin/drm-tip f212fc4e9611 drm/i915/gtt: Enable full-ppgtt by default everywhere 5423c7e1efb6 drm/i915/gtt: Full ppgtt everywhere, no excuses -:12: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 'commit 62942ed7279d ("drm/i915/vlv: disable PPGTT on early revs v3")' #12: References: 62942ed7279d ("drm/i915/vlv: disable PPGTT on early revs v3") total: 1 errors, 0 warnings, 0 checks, 12 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/execlists: Pull the w/a LRI emission into a helper
Quoting Joonas Lahtinen (2018-06-18 12:01:16) > Quoting Chris Wilson (2018-06-18 12:41:50) > > Having the w/a registers as an open-coded table leaves a trap for the > > unwary; it would be easy to miss incrementing the LRI counter when > > adding a new register to the list. Instead, pull the list of registers > > into a table, so that we only need add new registers to that table > > rather than try and remember important side-effects of earlier chunks of > > GPU instructions. > > > > Suggested-by: Joonas Lahtinen > > Signed-off-by: Chris Wilson > > Cc: Joonas Lahtinen > > Not related to this patch, but the lack of OOB check for batch makes > one itch a little bit. We check for the overflow afterwards, if we get that far before the machine dies. As it's static, that seems reasonable as we'll cover it entirely in CI. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 1/2] drm/i915/guc: Print CTL params passed to Guc
While debugging we may want to examine params passed to GuC. v2: drop #ifdef DEBUG_GUC - Michal Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Michel Thierry Reviewed-by: Michel Thierry #1 Cc: Michal Winiarski --- drivers/gpu/drm/i915/intel_guc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c index 1aff30b..feecf6e5 100644 --- a/drivers/gpu/drm/i915/intel_guc.c +++ b/drivers/gpu/drm/i915/intel_guc.c @@ -327,6 +327,9 @@ void intel_guc_init_params(struct intel_guc *guc) params[GUC_CTL_DEBUG] = guc_ctl_debug_flags(guc); params[GUC_CTL_CTXINFO] = guc_ctl_ctxinfo_flags(guc); + for (i = 0; i < GUC_CTL_MAX_DWORDS; i++) + DRM_DEBUG_DRIVER("param[%2d] = %#x\n", i, params[i]); + /* * All SOFT_SCRATCH registers are in FORCEWAKE_BLITTER domain and * they are power context saved so it's ok to release forcewake -- 1.9.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 2/2] HAX enable GuC for CI
Signed-off-by: Michal Wajdeczko --- drivers/gpu/drm/i915/i915_params.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h index aebe046..3e4e128 100644 --- a/drivers/gpu/drm/i915/i915_params.h +++ b/drivers/gpu/drm/i915/i915_params.h @@ -47,7 +47,7 @@ param(int, disable_power_well, -1) \ param(int, enable_ips, 1) \ param(int, invert_brightness, 0) \ - param(int, enable_guc, 0) \ + param(int, enable_guc, -1) \ param(int, guc_log_level, -1) \ param(char *, guc_firmware_path, NULL) \ param(char *, huc_firmware_path, NULL) \ -- 1.9.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Only show debug for state changes when banning
== Series Details == Series: drm/i915: Only show debug for state changes when banning URL : https://patchwork.freedesktop.org/series/44913/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4333 -> Patchwork_9346 = == Summary - WARNING == Minor unknown changes coming with Patchwork_9346 need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9346, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/44913/revisions/1/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9346: === IGT changes === Warnings igt@kms_pipe_crc_basic@hang-read-crc-pipe-b: fi-glk-j4005: SKIP -> PASS == Known issues == Here are the changes found in Patchwork_9346 that come from known issues: === IGT changes === Issues hit igt@kms_flip@basic-flip-vs-modeset: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106000) igt@pm_rpm@basic-pci-d3-state: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106097) Possible fixes igt@gem_ctx_create@basic-files: fi-kbl-guc: DMESG-WARN -> PASS igt@kms_flip@basic-flip-vs-dpms: fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS fi-skl-6700hq: DMESG-WARN (fdo#105998) -> PASS fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097 == Participating hosts (40 -> 36) == Additional (1): fi-bxt-dsi Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u == Build changes == * Linux: CI_DRM_4333 -> Patchwork_9346 CI_DRM_4333: 5fad115a81a20aa6b4ffd3f7f6663d43c88fa395 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9346: 6d78c34f2428efbb957895000479ef7e0b2809c3 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 6d78c34f2428 drm/i915: Only show debug for state changes when banning == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9346/issues.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/gtt: Enable full-ppgtt by default everywhere
== Series Details == Series: series starting with [1/2] drm/i915/gtt: Enable full-ppgtt by default everywhere URL : https://patchwork.freedesktop.org/series/44925/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4333 -> Patchwork_9348 = == Summary - WARNING == Minor unknown changes coming with Patchwork_9348 need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9348, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/44925/revisions/1/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9348: === IGT changes === Warnings igt@kms_pipe_crc_basic@hang-read-crc-pipe-b: fi-glk-j4005: SKIP -> PASS == Known issues == Here are the changes found in Patchwork_9348 that come from known issues: === IGT changes === Issues hit igt@kms_flip@basic-flip-vs-wf_vblank: fi-glk-j4005: PASS -> FAIL (fdo#100368) igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a: fi-cnl-psr: PASS -> DMESG-WARN (fdo#104951) Possible fixes igt@debugfs_test@read_all_entries: fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS igt@gem_ctx_create@basic-files: fi-kbl-guc: DMESG-WARN -> PASS igt@kms_flip@basic-flip-vs-dpms: fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS fi-skl-6700hq: DMESG-WARN (fdo#105998) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713 fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951 fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 == Participating hosts (40 -> 36) == Additional (1): fi-bxt-dsi Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u == Build changes == * Linux: CI_DRM_4333 -> Patchwork_9348 CI_DRM_4333: 5fad115a81a20aa6b4ffd3f7f6663d43c88fa395 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9348: 5423c7e1efb6b188874236db402a5848bb3ab7cf @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 5423c7e1efb6 drm/i915/gtt: Full ppgtt everywhere, no excuses f212fc4e9611 drm/i915/gtt: Enable full-ppgtt by default everywhere == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9348/issues.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/execlists: Pull the w/a LRI emission into a helper
== Series Details == Series: drm/i915/execlists: Pull the w/a LRI emission into a helper URL : https://patchwork.freedesktop.org/series/44921/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4333 -> Patchwork_9347 = == Summary - WARNING == Minor unknown changes coming with Patchwork_9347 need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9347, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/44921/revisions/1/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9347: === IGT changes === Warnings igt@kms_pipe_crc_basic@hang-read-crc-pipe-b: fi-glk-j4005: SKIP -> PASS == Known issues == Here are the changes found in Patchwork_9347 that come from known issues: === IGT changes === Issues hit igt@gem_exec_flush@basic-uc-pro-default: fi-glk-j4005: PASS -> DMESG-WARN (fdo#105719) igt@kms_chamelium@hdmi-hpd-fast: fi-kbl-7500u: SKIP -> FAIL (fdo#102672, fdo#103841) igt@kms_flip@basic-flip-vs-wf_vblank: fi-glk-j4005: PASS -> FAIL (fdo#100368) igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c: fi-bxt-dsi: NOTRUN -> INCOMPLETE (fdo#103927) Possible fixes igt@debugfs_test@read_all_entries: fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS igt@gem_ctx_create@basic-files: fi-kbl-guc: DMESG-WARN -> PASS igt@kms_flip@basic-flip-vs-dpms: fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS fi-skl-6700hq: DMESG-WARN (fdo#105998) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#102672 https://bugs.freedesktop.org/show_bug.cgi?id=102672 fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713 fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841 fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927 fdo#105719 https://bugs.freedesktop.org/show_bug.cgi?id=105719 fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 == Participating hosts (40 -> 36) == Additional (1): fi-bxt-dsi Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u == Build changes == * Linux: CI_DRM_4333 -> Patchwork_9347 CI_DRM_4333: 5fad115a81a20aa6b4ffd3f7f6663d43c88fa395 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9347: 12321f1761c3fdd9eb4bd903bba62adb494f0212 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 12321f1761c3 drm/i915/execlists: Pull the w/a LRI emission into a helper == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9347/issues.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [v2,1/2] drm/i915/uc: Fetch GuC/HuC firmwares from guc/huc specific init
== Series Details == Series: series starting with [v2,1/2] drm/i915/uc: Fetch GuC/HuC firmwares from guc/huc specific init URL : https://patchwork.freedesktop.org/series/44930/ State : failure == Summary == = CI Bug Log - changes from CI_DRM_4333 -> Patchwork_9349 = == Summary - FAILURE == Serious unknown changes coming with Patchwork_9349 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9349, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/44930/revisions/1/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9349: === IGT changes === Possible regressions igt@debugfs_test@read_all_entries: fi-cfl-s3: PASS -> DMESG-WARN fi-skl-6260u: PASS -> DMESG-WARN fi-skl-gvtdvm: PASS -> DMESG-WARN fi-skl-6700hq: PASS -> DMESG-WARN fi-bxt-j4205: PASS -> DMESG-WARN fi-kbl-7500u: PASS -> DMESG-WARN fi-skl-guc: PASS -> DMESG-WARN fi-kbl-7567u: PASS -> DMESG-WARN fi-skl-6600u: PASS -> DMESG-WARN fi-cfl-8700k: PASS -> DMESG-WARN {fi-whl-u}: PASS -> DMESG-WARN fi-skl-6700k2: PASS -> DMESG-WARN fi-cfl-guc: PASS -> DMESG-WARN fi-skl-6770hq: PASS -> DMESG-WARN igt@gem_exec_basic@gtt-blt: fi-kbl-guc: PASS -> DMESG-WARN Warnings igt@kms_pipe_crc_basic@hang-read-crc-pipe-b: fi-glk-j4005: SKIP -> PASS == Known issues == Here are the changes found in Patchwork_9349 that come from known issues: === IGT changes === Issues hit igt@gem_ctx_create@basic-files: fi-skl-gvtdvm: PASS -> INCOMPLETE (fdo#105600) igt@gem_exec_gttfill@basic: fi-byt-n2820: PASS -> FAIL (fdo#106744) igt@kms_busy@basic-flip-b: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106000) igt@kms_flip@basic-flip-vs-wf_vblank: fi-glk-j4005: PASS -> FAIL (fdo#100368) Possible fixes igt@gem_ctx_create@basic-files: fi-kbl-guc: DMESG-WARN -> PASS igt@kms_flip@basic-flip-vs-dpms: fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS fi-skl-6700hq: DMESG-WARN (fdo#105998) -> PASS {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#105600 https://bugs.freedesktop.org/show_bug.cgi?id=105600 fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 fdo#106744 https://bugs.freedesktop.org/show_bug.cgi?id=106744 == Participating hosts (40 -> 34) == Missing(6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-kbl-7560u == Build changes == * Linux: CI_DRM_4333 -> Patchwork_9349 CI_DRM_4333: 5fad115a81a20aa6b4ffd3f7f6663d43c88fa395 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9349: 4d9c48c49dcaabd7c580a546be53a1f854b20ce4 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 4d9c48c49dca HAX enable GuC for CI 496058e05dd5 drm/i915/uc: Fetch GuC/HuC firmwares from guc/huc specific init == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9349/issues.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 0/7] drm/i915: move towards kernel types
On Mon, 18 Jun 2018, Joonas Lahtinen wrote: > Quoting Jani Nikula (2018-06-15 12:08:23) >> On Thu, 14 Jun 2018, Rodrigo Vivi wrote: >> > On Wed, Jun 13, 2018 at 09:55:38AM +0300, Jani Nikula wrote: >> >> On Tue, 12 Jun 2018, Lucas De Marchi wrote: >> >> > On Tue, Jun 12, 2018 at 3:15 AM Jani Nikula >> >> > wrote: >> >> >> >> >> >> On Tue, 12 Jun 2018, Tvrtko Ursulin >> >> >> wrote: >> >> >> > On 12/06/2018 10:19, Jani Nikula wrote: >> >> >> >> Semi-RFC. Do we want to do this? Here's a batch of conversions that >> >> >> >> shouldn't >> >> >> >> conflict much with in-flight patches. >> >> >> >> >> >> >> >> The trouble with mixed use is that it's inconsistent, and any >> >> >> >> remaining C99 >> >> >> >> types will encourage their use. We could at least do the low >> >> >> >> hanging fruit? >> >> >> > >> >> >> > Ack from me. Doesn't seem so big to cause much pain. >> >> >> > >> >> >> > When you say low-hanging fruit, that implies you only dealt with a >> >> >> > particular class of occurrences? >> >> >> >> >> >> I meant the files which don't have massive amounts of C99 types and >> >> >> aren't under active development right now. I just wanted to avoid >> >> >> trouble for starters. ;) >> >> > >> >> > If using kernel types is where we want to go (which I agree with), >> >> > maybe it would be better to have a single conversion rather than >> >> > several small ones as we are doing with dev_priv -> i915? This allows >> >> > in-flight-but-not-yet-sent patches to easily keep up with the changes >> >> > rather than conflicting every other rebase. >> >> >> >> I'm thinking we can do a lot of changes without conflicting anything or >> >> very little. At least for starters before the sudden ripping off the >> >> band-aid. >> > >> > I'm with Lucas. I'd prefer one single massive move than many small ones. >> > Easier for the internal maintenance. We fix it only once and not one per >> > day for months and months like dev_priv/i915 case. >> >> For everything else, I believe smaller patches are easier. For example, >> who is going to review the massive change? Halt everything until it's >> reviewed and merged? For merge conflicts I think git can do a better job >> of managing the rerere with piecemeal changes. Internal is not the only >> consideration. > > I'm somewhere in the middle, but I have to agree changing everything with > one patch would be bit too overwhelming for review. Okay, we can continue to debate, but I've pushed this series in the mean time because it has review and by my judgement should not conflict much. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [RFC] drm/i915: Fix assert_plane() warning on bootup with external display
On Mon, Jun 18, 2018 at 11:18:52AM +0300, Jani Nikula wrote: > On Sun, 17 Jun 2018, Azhar Shaikh wrote: > > On KBL, WHL RVPs, booting up with an external display connected, triggers > > below warning. This warning is not seen during hotplug. > > > > [3.615226] [ cut here ] > > [3.619829] plane 1A assertion failure (expected on, current off) > > [3.632039] WARNING: CPU: 2 PID: 354 at > > drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb > > [3.633920] iwlwifi :00:14.3: loaded firmware version 38.c0e03d94.0 > > op_mode iwlmvm > > [3.647157] Modules linked in: iwlwifi cfg80211 btusb btrtl btbcm > > btintel bluetooth ecdh_generic > > [3.647163] CPU: 2 PID: 354 Comm: frecon Not tainted > > 4.17.0-rc7-50176-g655af12d39c2 #3 > > [3.647165] Hardware name: Intel Corporation CoffeeLake Client > > Platform/WhiskeyLake U DDR4 ERB, BIOS CNLSFWR1.R00.X140.B00.1804040304 > > 04/04/2018 > > [3.684509] RIP: 0010:assert_plane+0x71/0xbb > > [3.764451] Call Trace: > > [3.766888] intel_atomic_commit_tail+0xa97/0xb77 > > [3.771569] intel_atomic_commit+0x26a/0x279 > > [3.771572] drm_atomic_helper_set_config+0x5c/0x76 > > [3.780670] __drm_mode_set_config_internal+0x66/0x109 > > [3.780672] drm_mode_setcrtc+0x4c9/0x5cc > > [3.780674] ? drm_mode_getcrtc+0x162/0x162 > > [3.789774] ? drm_mode_getcrtc+0x162/0x162 > > [3.798108] drm_ioctl_kernel+0x8d/0xe4 > > [3.801926] drm_ioctl+0x27d/0x368 > > [3.805311] ? drm_mode_getcrtc+0x162/0x162 > > [3.805314] ? selinux_file_ioctl+0x14e/0x199 > > [3.805317] vfs_ioctl+0x21/0x2f > > [3.813812] do_vfs_ioctl+0x491/0x4b4 > > [3.813813] ? security_file_ioctl+0x37/0x4b > > [3.813816] ksys_ioctl+0x55/0x75 > > [3.820672] __x64_sys_ioctl+0x1a/0x1e > > [3.820674] do_syscall_64+0x51/0x5f > > [3.820678] entry_SYSCALL_64_after_hwframe+0x44/0xa9 > > [3.828221] RIP: 0033:0x7b5e04953967 > > [3.835504] RSP: 002b:7fff2eafb6f8 EFLAGS: 0246 ORIG_RAX: > > 0010 > > [3.835505] RAX: ffda RBX: 0002 RCX: > > 7b5e04953967 > > [3.835505] RDX: 7fff2eafb730 RSI: c06864a2 RDI: > > 000f > > [3.835506] RBP: 7fff2eafb720 R08: R09: > > > > [3.835507] R10: 0070 R11: 0246 R12: > > 000f > > [3.879988] R13: 56bc9dd7d210 R14: 7fff2eafb730 R15: > > c06864a2 > > [3.887081] Code: 48 c7 c7 06 71 a5 be 84 c0 48 c7 c2 06 fd a3 be 48 89 > > f9 48 0f 44 ca 84 db 48 0f 45 d7 48 c7 c7 df d3 a4 be 31 c0 e8 af a0 c0 ff > > <0f> 0b eb 2b 48 c7 c7 06 fd a3 be 84 c0 48 c7 c2 06 71 a5 be 48 > > [3.905845] WARNING: CPU: 2 PID: 354 at > > drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb > > [3.920964] ---[ end trace dac692f4ac46391a ]--- > > > > The warning is seen when mode_setcrtc() is called for pipeB > > during bootup and before we get a mode_setcrtc() for pipeA, > > while doing update_crtcs() in intel_atomic_commit_tail(). > > Now since, plane1A is still active after commit, update_crtcs() > > is done for pipeA and eventually update_plane() for plane1A. > > > > intel_plane_state->ctl for plane1A is not updated since set_modecrtc() is > > called for pipeB. So intel_plane_state->ctl for plane 1A will be 0x0. > > So doing an update_plane() for plane1A, will result in clearing > > PLANE_CTL_ENABLE bit, and hence the warning. > > > > To fix this warning, prior to updating the PLANE_CTL register with > > intel_plane_state->ctl value, read PLANE_CTL register, OR it with > > intel_plane_state->ctl and then write it to PLANE_CTL register > > instead of just relying on intel_plane_state->ctl value. > > > > Signed-off-by: Azhar Shaikh > > --- > > drivers/gpu/drm/i915/intel_sprite.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/intel_sprite.c > > b/drivers/gpu/drm/i915/intel_sprite.c > > index 344c0e709b19..b491b1fbdea1 100644 > > --- a/drivers/gpu/drm/i915/intel_sprite.c > > +++ b/drivers/gpu/drm/i915/intel_sprite.c > > @@ -254,6 +254,7 @@ void intel_pipe_update_end(struct intel_crtc_state > > *new_crtc_state) > > uint32_t src_w = drm_rect_width(&plane_state->base.src) >> 16; > > uint32_t src_h = drm_rect_height(&plane_state->base.src) >> 16; > > unsigned long irqflags; > > + u32 val; > > > > /* Sizes are 0 based */ > > src_w--; > > @@ -322,6 +323,8 @@ void intel_pipe_update_end(struct intel_crtc_state > > *new_crtc_state) > > I915_WRITE_FW(PLANE_POS(pipe, plane_id), (crtc_y << 16) | > > crtc_x); > > } > > > > + val = I915_READ_FW(PLANE_CTL(pipe, plane_id)); > > + plane_ctl |= val; > > You get the warning backtrace from our state checker, the purpose of > which is to ensure that our software state and hardware state > match. This change defeats the purpose of the state ch
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Replace {un/reference} with {put, get} functions
== Series Details == Series: drm/i915: Replace {un/reference} with {put, get} functions URL : https://patchwork.freedesktop.org/series/44932/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4333 -> Patchwork_9350 = == Summary - WARNING == Minor unknown changes coming with Patchwork_9350 need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9350, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/44932/revisions/1/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9350: === IGT changes === Warnings igt@gem_exec_gttfill@basic: fi-pnv-d510:PASS -> SKIP igt@kms_pipe_crc_basic@hang-read-crc-pipe-b: fi-glk-j4005: SKIP -> PASS == Known issues == Here are the changes found in Patchwork_9350 that come from known issues: === IGT changes === Issues hit igt@gem_exec_gttfill@basic: fi-byt-n2820: PASS -> FAIL (fdo#106744) igt@kms_flip@basic-flip-vs-modeset: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106000) igt@kms_pipe_crc_basic@hang-read-crc-pipe-c: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106238) igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c: fi-bxt-dsi: NOTRUN -> INCOMPLETE (fdo#103927) Possible fixes igt@debugfs_test@read_all_entries: fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713 fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 fdo#106238 https://bugs.freedesktop.org/show_bug.cgi?id=106238 fdo#106744 https://bugs.freedesktop.org/show_bug.cgi?id=106744 == Participating hosts (40 -> 37) == Additional (2): fi-bxt-dsi fi-kbl-r Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u == Build changes == * Linux: CI_DRM_4333 -> Patchwork_9350 CI_DRM_4333: 5fad115a81a20aa6b4ffd3f7f6663d43c88fa395 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9350: f576ff5cb564ee2fdcb2c688a5d37f486d0d418f @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == f576ff5cb564 drm/i915: Replace drm_dev_unref with drm_dev_put 9e55b9ee654e drm/i915: Replace drm_gem_object_unreference_unlocked with put function e2a2fce627f1 drm/i915: Replace __drm_gem_object_unreference with __drm_gem_object_put 33b46e158311 drm/i915: Replace drm_gem_object_{un/reference} with {put, get} functions 773002149531 drm/i915: Replace drm_connector_{un/reference} with put, get functions == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9350/issues.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/3] drm/i915: Print prop name/id when rejecting it
On Mon, Jun 18, 2018 at 10:53:13AM +0200, Daniel Vetter wrote: > On Mon, Jun 11, 2018 at 10:34:03PM +0300, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > Use the '[PROP:id:name]' format I introduced for the core in the driver > > debug messages as well. > > > > Signed-off-by: Ville Syrjälä > > Reviewed-by: Daniel Vetter > > I'm wondering whether there's not some kind of macro magic we could do, > but unfortunately printf style stuff is really not composable :-/ And our > stuff isn't important enough to warant new %p modes either ... I should have DRM_PLANE_FMT, DRM_PLANE_ARGS(), etc. in some branch. Never posted that stuff because I wasn't entirely convinced it's all that useful. Opinions? -- Ville Syrjälä Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] Oops with i915
On Thu, Jun 07, 2018 at 11:06:33AM +0100, Sudip Mukherjee wrote: > Hi All, > > We are running v4.14.47 kernel and recently in one of our test cycle > we saw the below trace. I know this is not the usual way to raise a > BUG report, but since this was seen only once in one of the automated > test cycle so I donot have anything else apart from this trace. > Is this a known issue? Will appreciate any help in understanding what > the problem might be. > > [ 1176.909543] BUG: unable to handle kernel paging request at 8298fb0a > [ 1176.916565] IP: queued_spin_lock_slowpath+0xfc/0x142 > [ 1176.922111] *pdpt = 3367a001 *pde = > [ 1176.928534] Oops: 0002 [#1] PREEMPT SMP > [ 1177.002434] CPU: 2 PID: 24688 Comm: kworker/u8:4 Tainted: G U O > 4.14.47-20180606-a6b8390e8cc1de032b8314d1a5b193fe9e21f325 #1 > [ 1177.024120] Workqueue: events_unbound intel_atomic_commit_work > [ 1177.030630] task: ef2ee200 task.stack: efbf4000 > [ 1177.035685] EIP: queued_spin_lock_slowpath+0xfc/0x142 > [ 1177.041327] EFLAGS: 00010087 CPU: 2 > [ 1177.045212] EAX: 8298fb0a EBX: 3ba0 ECX: ee82489c EDX: f4656fc0 > [ 1177.052215] ESI: 000c EDI: 0001 EBP: efbf5e88 ESP: efbf5e78 > [ 1177.059217] DS: 007b ES: 007b FS: 00d8 GS: SS: 0068 > [ 1177.065239] CR0: 80050033 CR2: 8298fb0a CR3: 2e8ed320 CR4: 001006f0 > [ 1177.072240] Call Trace: > [ 1177.074973] _raw_spin_lock_irqsave+0x28/0x2d > [ 1177.079840] complete_all+0x12/0x36 > [ 1177.083737] drm_atomic_helper_commit_hw_done+0x3c/0x43 > [ 1177.089576] intel_atomic_commit_tail+0xa5f/0xbd9 > [ 1177.094832] ? wait_woken+0x5a/0x5a > [ 1177.098727] ? wait_woken+0x5a/0x5a > [ 1177.102622] intel_atomic_commit_work+0xb/0xd > [ 1177.107489] ? intel_atomic_commit_work+0xb/0xd > [ 1177.112551] process_one_work+0x109/0x1ee > [ 1177.117029] worker_thread+0x1a4/0x257 > [ 1177.121215] kthread+0xee/0xf3 > [ 1177.124625] ? rescuer_thread+0x207/0x207 > [ 1177.129103] ? kthread_create_on_node+0x1a/0x1a > [ 1177.134165] ret_from_fork+0x2e/0x38 > [ 1177.138156] Code: 12 09 de 89 f0 89 75 f0 c1 e8 10 66 87 41 02 89 c3 c1 e3 > 10 74 51 83 e0 03 c1 eb 12 6b c0 0c 05 c0 1f 7e c1 03 04 9d d8 b1 6c c1 <89> > 10 8b 42 04 85 c0 75 04 f3 90 eb f5 8b 1a 85 db 74 03 0f 0d > [ 1177.159204] EIP: queued_spin_lock_slowpath+0xfc/0x142 SS:ESP: 0068:efbf5e78 > [ 1177.166983] CR2: 8298fb0a Presumably a use after free in atomic. Possibly 21a01abbe32a ("drm/atomic: Fix freeing connector/plane state too early by tracking commits, v3.") But there may have been other similar fixes. -- Ville Syrjälä Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Apply context workarounds directly
Quoting Chris Wilson (2018-06-15 19:37:33) > From: Oscar Mateo > > Once upon a time, we tried to apply workarounds for registers that lived > inside the context image for every new context. That meant emitting LRI > commands soon after each context was created. > > Nowadays, we have a single golden context that gets used as a master > template for future contexts. That golden context will acquire initial > values for its image from the existing values in HW (thanks to inhibit > restore bit). If all WAs are applied normally (i.e. using MMIO writes) > before that happens, they will get soaked up by the golden context and > transmitted correctly to new contexts. > > All of this means we don't have to distinguish between context and > non-context WAs anymore, because both can be applied in the same way > (we still want to distinguish them though, because we would like to > check their validity using i-g-t, and that means making sure we have > a context loaded for ctx-residing WAs). > > Signed-off-by: Oscar Mateo > Cc: Chris Wilson > Cc: Joonas Lahtinen > Cc: Ville Syrjälä Reviewed-by: Joonas Lahtinen Regards, Joonas ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] Oops with i915
Hi Ville, On Mon, Jun 18, 2018 at 03:09:15PM +0300, Ville Syrjälä wrote: > On Thu, Jun 07, 2018 at 11:06:33AM +0100, Sudip Mukherjee wrote: > > Hi All, > > > > We are running v4.14.47 kernel and recently in one of our test cycle > > we saw the below trace. I know this is not the usual way to raise a > > BUG report, but since this was seen only once in one of the automated > > test cycle so I donot have anything else apart from this trace. > > Is this a known issue? Will appreciate any help in understanding what > > the problem might be. > > > > [ 1176.909543] BUG: unable to handle kernel paging request at 8298fb0a > > [ 1176.916565] IP: queued_spin_lock_slowpath+0xfc/0x142 > > [ 1176.922111] *pdpt = 3367a001 *pde = > > [ 1176.928534] Oops: 0002 [#1] PREEMPT SMP > > [ 1177.002434] CPU: 2 PID: 24688 Comm: kworker/u8:4 Tainted: G U O > > 4.14.47-20180606-a6b8390e8cc1de032b8314d1a5b193fe9e21f325 #1 > > [ 1177.024120] Workqueue: events_unbound intel_atomic_commit_work > > [ 1177.030630] task: ef2ee200 task.stack: efbf4000 > > [ 1177.035685] EIP: queued_spin_lock_slowpath+0xfc/0x142 > > [ 1177.041327] EFLAGS: 00010087 CPU: 2 > > [ 1177.045212] EAX: 8298fb0a EBX: 3ba0 ECX: ee82489c EDX: f4656fc0 > > [ 1177.052215] ESI: 000c EDI: 0001 EBP: efbf5e88 ESP: efbf5e78 > > [ 1177.059217] DS: 007b ES: 007b FS: 00d8 GS: SS: 0068 > > [ 1177.065239] CR0: 80050033 CR2: 8298fb0a CR3: 2e8ed320 CR4: 001006f0 > > [ 1177.072240] Call Trace: > > [ 1177.074973] _raw_spin_lock_irqsave+0x28/0x2d > > [ 1177.079840] complete_all+0x12/0x36 > > [ 1177.083737] drm_atomic_helper_commit_hw_done+0x3c/0x43 > > [ 1177.089576] intel_atomic_commit_tail+0xa5f/0xbd9 > > [ 1177.094832] ? wait_woken+0x5a/0x5a > > [ 1177.098727] ? wait_woken+0x5a/0x5a > > [ 1177.102622] intel_atomic_commit_work+0xb/0xd > > [ 1177.107489] ? intel_atomic_commit_work+0xb/0xd > > [ 1177.112551] process_one_work+0x109/0x1ee > > [ 1177.117029] worker_thread+0x1a4/0x257 > > [ 1177.121215] kthread+0xee/0xf3 > > [ 1177.124625] ? rescuer_thread+0x207/0x207 > > [ 1177.129103] ? kthread_create_on_node+0x1a/0x1a > > [ 1177.134165] ret_from_fork+0x2e/0x38 > > [ 1177.138156] Code: 12 09 de 89 f0 89 75 f0 c1 e8 10 66 87 41 02 89 c3 c1 > > e3 10 74 51 83 e0 03 c1 eb 12 6b c0 0c 05 c0 1f 7e c1 03 04 9d d8 b1 6c c1 > > <89> 10 8b 42 04 85 c0 75 04 f3 90 eb f5 8b 1a 85 db 74 03 0f 0d > > [ 1177.159204] EIP: queued_spin_lock_slowpath+0xfc/0x142 SS:ESP: > > 0068:efbf5e78 > > [ 1177.166983] CR2: 8298fb0a > > Presumably a use after free in atomic. Possibly 21a01abbe32a > ("drm/atomic: Fix freeing connector/plane state too early by tracking > commits, v3.") But there may have been other similar fixes. Thanks for your reply. I also thought so as the stacktrace showed it was using an invalid memory for the old_state. And so I applied: 21a01abbe32a ("drm/atomic: Fix freeing connector/plane state too early by tracking commits, v3.") on top of v4.14.47. It also needed: 1) f46640b931e5 ("drm/atomic: Return commit in drm_crtc_commit_get for better annotation") 2) 163bcc2c74a2 ("drm/atomic: Move drm_crtc_commit to drm_crtc_state, v4.") to apply cleanly. But after that the occurance rate increased. Did I miss something else also? Will apprecate your help in finding a fix to this. -- Regards Sudip ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 1/2] drm/i915/guc: Print CTL params passed to Guc
On Mon, Jun 18, 2018 at 11:18:20AM +, Michal Wajdeczko wrote: > While debugging we may want to examine params passed to GuC. > > v2: drop #ifdef DEBUG_GUC - Michal > > Signed-off-by: Michal Wajdeczko > Cc: Daniele Ceraolo Spurio > Cc: Michel Thierry > Reviewed-by: Michel Thierry #1 > Cc: Michal Winiarski > --- > drivers/gpu/drm/i915/intel_guc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_guc.c > b/drivers/gpu/drm/i915/intel_guc.c > index 1aff30b..feecf6e5 100644 > --- a/drivers/gpu/drm/i915/intel_guc.c > +++ b/drivers/gpu/drm/i915/intel_guc.c > @@ -327,6 +327,9 @@ void intel_guc_init_params(struct intel_guc *guc) > params[GUC_CTL_DEBUG] = guc_ctl_debug_flags(guc); > params[GUC_CTL_CTXINFO] = guc_ctl_ctxinfo_flags(guc); > > + for (i = 0; i < GUC_CTL_MAX_DWORDS; i++) > + DRM_DEBUG_DRIVER("param[%2d] = %#x\n", i, params[i]); > + Reviewed-by: Michał Winiarski -Michał > /* >* All SOFT_SCRATCH registers are in FORCEWAKE_BLITTER domain and >* they are power context saved so it's ok to release forcewake > -- > 1.9.1 > ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] Oops with i915
On Mon, Jun 18, 2018 at 01:29:02PM +0100, Sudip Mukherjee wrote: > Hi Ville, > > On Mon, Jun 18, 2018 at 03:09:15PM +0300, Ville Syrjälä wrote: > > On Thu, Jun 07, 2018 at 11:06:33AM +0100, Sudip Mukherjee wrote: > > > Hi All, > > > > > > We are running v4.14.47 kernel and recently in one of our test cycle > > > we saw the below trace. I know this is not the usual way to raise a > > > BUG report, but since this was seen only once in one of the automated > > > test cycle so I donot have anything else apart from this trace. > > > Is this a known issue? Will appreciate any help in understanding what > > > the problem might be. > > > > > > [ 1176.909543] BUG: unable to handle kernel paging request at 8298fb0a > > > [ 1176.916565] IP: queued_spin_lock_slowpath+0xfc/0x142 > > > [ 1176.922111] *pdpt = 3367a001 *pde = > > > [ 1176.928534] Oops: 0002 [#1] PREEMPT SMP > > > [ 1177.002434] CPU: 2 PID: 24688 Comm: kworker/u8:4 Tainted: G U > > > O4.14.47-20180606-a6b8390e8cc1de032b8314d1a5b193fe9e21f325 #1 > > > [ 1177.024120] Workqueue: events_unbound intel_atomic_commit_work > > > [ 1177.030630] task: ef2ee200 task.stack: efbf4000 > > > [ 1177.035685] EIP: queued_spin_lock_slowpath+0xfc/0x142 > > > [ 1177.041327] EFLAGS: 00010087 CPU: 2 > > > [ 1177.045212] EAX: 8298fb0a EBX: 3ba0 ECX: ee82489c EDX: f4656fc0 > > > [ 1177.052215] ESI: 000c EDI: 0001 EBP: efbf5e88 ESP: efbf5e78 > > > [ 1177.059217] DS: 007b ES: 007b FS: 00d8 GS: SS: 0068 > > > [ 1177.065239] CR0: 80050033 CR2: 8298fb0a CR3: 2e8ed320 CR4: 001006f0 > > > [ 1177.072240] Call Trace: > > > [ 1177.074973] _raw_spin_lock_irqsave+0x28/0x2d > > > [ 1177.079840] complete_all+0x12/0x36 > > > [ 1177.083737] drm_atomic_helper_commit_hw_done+0x3c/0x43 > > > [ 1177.089576] intel_atomic_commit_tail+0xa5f/0xbd9 > > > [ 1177.094832] ? wait_woken+0x5a/0x5a > > > [ 1177.098727] ? wait_woken+0x5a/0x5a > > > [ 1177.102622] intel_atomic_commit_work+0xb/0xd > > > [ 1177.107489] ? intel_atomic_commit_work+0xb/0xd > > > [ 1177.112551] process_one_work+0x109/0x1ee > > > [ 1177.117029] worker_thread+0x1a4/0x257 > > > [ 1177.121215] kthread+0xee/0xf3 > > > [ 1177.124625] ? rescuer_thread+0x207/0x207 > > > [ 1177.129103] ? kthread_create_on_node+0x1a/0x1a > > > [ 1177.134165] ret_from_fork+0x2e/0x38 > > > [ 1177.138156] Code: 12 09 de 89 f0 89 75 f0 c1 e8 10 66 87 41 02 89 c3 > > > c1 e3 10 74 51 83 e0 03 c1 eb 12 6b c0 0c 05 c0 1f 7e c1 03 04 9d d8 b1 > > > 6c c1 <89> 10 8b 42 04 85 c0 75 04 f3 90 eb f5 8b 1a 85 db 74 03 0f 0d > > > [ 1177.159204] EIP: queued_spin_lock_slowpath+0xfc/0x142 SS:ESP: > > > 0068:efbf5e78 > > > [ 1177.166983] CR2: 8298fb0a > > > > Presumably a use after free in atomic. Possibly 21a01abbe32a > > ("drm/atomic: Fix freeing connector/plane state too early by tracking > > commits, v3.") But there may have been other similar fixes. > > Thanks for your reply. I also thought so as the stacktrace showed it was > using an invalid memory for the old_state. And so I applied: > 21a01abbe32a ("drm/atomic: Fix freeing connector/plane state too early by > tracking commits, v3.") > on top of v4.14.47. It also needed: > 1) f46640b931e5 ("drm/atomic: Return commit in drm_crtc_commit_get for better > annotation") > 2) 163bcc2c74a2 ("drm/atomic: Move drm_crtc_commit to drm_crtc_state, v4.") > > to apply cleanly. But after that the occurance rate increased. > Did I miss something else also? No idea. I suggest a reverse bisect to find out when it got fixed in upstream. -- Ville Syrjälä Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 05/14] drm/sti: Try to fix up the tvout possible clones
From: Ville Syrjälä The current possible_clones setup doesn't look sensible. I'm assuming the 0 and 1 are supposed to refer to the indexes of the hdmi and hda encoders? So it kinda looks like we want hda+hdmi cloning, but then dvo also claims to be cloneable with hdmi, but hdmi won't recipricate. Benjamin tells me all encoders should be cloneable with each other, so let's fix up the masks to indicate that. Cc: Benjamin Gaignard Cc: Vincent Abriou Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/sti/sti_tvout.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c index 7d495307fe79..8bca519b3bfe 100644 --- a/drivers/gpu/drm/sti/sti_tvout.c +++ b/drivers/gpu/drm/sti/sti_tvout.c @@ -668,7 +668,6 @@ sti_tvout_create_dvo_encoder(struct drm_device *dev, drm_encoder = &encoder->encoder; drm_encoder->possible_crtcs = ENCODER_CRTC_MASK; - drm_encoder->possible_clones = 1 << 0; drm_encoder_init(dev, drm_encoder, &sti_tvout_encoder_funcs, DRM_MODE_ENCODER_LVDS, @@ -721,7 +720,6 @@ static struct drm_encoder *sti_tvout_create_hda_encoder(struct drm_device *dev, drm_encoder = &encoder->encoder; drm_encoder->possible_crtcs = ENCODER_CRTC_MASK; - drm_encoder->possible_clones = 1 << 0; drm_encoder_init(dev, drm_encoder, &sti_tvout_encoder_funcs, DRM_MODE_ENCODER_DAC, NULL); @@ -770,7 +768,6 @@ static struct drm_encoder *sti_tvout_create_hdmi_encoder(struct drm_device *dev, drm_encoder = &encoder->encoder; drm_encoder->possible_crtcs = ENCODER_CRTC_MASK; - drm_encoder->possible_clones = 1 << 1; drm_encoder_init(dev, drm_encoder, &sti_tvout_encoder_funcs, DRM_MODE_ENCODER_TMDS, NULL); @@ -786,6 +783,13 @@ static void sti_tvout_create_encoders(struct drm_device *dev, tvout->hdmi = sti_tvout_create_hdmi_encoder(dev, tvout); tvout->hda = sti_tvout_create_hda_encoder(dev, tvout); tvout->dvo = sti_tvout_create_dvo_encoder(dev, tvout); + + tvout->hdmi->possible_clones = drm_encoder_mask(tvout->hdmi) | + drm_encoder_mask(tvout->hda) | drm_encoder_mask(tvout->dvo); + tvout->hda->possible_clones = drm_encoder_mask(tvout->hdmi) | + drm_encoder_mask(tvout->hda) | drm_encoder_mask(tvout->dvo); + tvout->dvo->possible_clones = drm_encoder_mask(tvout->hdmi) | + drm_encoder_mask(tvout->hda) | drm_encoder_mask(tvout->dvo); } static void sti_tvout_destroy_encoders(struct sti_tvout *tvout) -- 2.16.4 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915/guc: Print CTL params passed to Guc
== Series Details == Series: series starting with [v2,1/2] drm/i915/guc: Print CTL params passed to Guc URL : https://patchwork.freedesktop.org/series/44934/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4334 -> Patchwork_9351 = == Summary - WARNING == Minor unknown changes coming with Patchwork_9351 need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9351, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/44934/revisions/1/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9351: === IGT changes === Warnings igt@gem_exec_gttfill@basic: fi-pnv-d510:SKIP -> PASS == Known issues == Here are the changes found in Patchwork_9351 that come from known issues: === IGT changes === Issues hit igt@gem_exec_gttfill@basic: fi-byt-n2820: PASS -> FAIL (fdo#106744) igt@kms_pipe_crc_basic@read-crc-pipe-b: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106000) +1 igt@pm_rpm@basic-rte: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106097) Possible fixes igt@gem_ctx_create@basic-files: fi-kbl-guc: DMESG-WARN -> PASS igt@gem_ctx_switch@basic-default-heavy: fi-glk-j4005: DMESG-WARN (fdo#106745, fdo#105719) -> PASS igt@kms_flip@basic-plain-flip: fi-glk-j4005: DMESG-WARN (fdo#106097) -> PASS igt@kms_pipe_crc_basic@read-crc-pipe-c-frame-sequence: fi-glk-j4005: DMESG-WARN (fdo#106238) -> PASS igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b: fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713 fdo#105719 https://bugs.freedesktop.org/show_bug.cgi?id=105719 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097 fdo#106238 https://bugs.freedesktop.org/show_bug.cgi?id=106238 fdo#106744 https://bugs.freedesktop.org/show_bug.cgi?id=106744 fdo#106745 https://bugs.freedesktop.org/show_bug.cgi?id=106745 == Participating hosts (42 -> 36) == Missing(6): fi-ilk-m540 fi-bxt-dsi fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 == Build changes == * Linux: CI_DRM_4334 -> Patchwork_9351 CI_DRM_4334: e2635b9253c80ae63fcea5b3382351aa34e5f056 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9351: 35d1fdad52ec99775e0816dfefa8ac3456322672 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 35d1fdad52ec HAX enable GuC for CI 820365971843 drm/i915/guc: Print CTL params passed to Guc == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9351/issues.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Only show debug for state changes when banning
== Series Details == Series: drm/i915: Only show debug for state changes when banning URL : https://patchwork.freedesktop.org/series/44913/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4333_full -> Patchwork_9346_full = == Summary - WARNING == Minor unknown changes coming with Patchwork_9346_full need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9346_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9346_full: === IGT changes === Warnings igt@gem_mocs_settings@mocs-rc6-vebox: shard-kbl: PASS -> SKIP +1 == Known issues == Here are the changes found in Patchwork_9346_full that come from known issues: === IGT changes === Issues hit igt@drv_selftest@live_gtt: shard-kbl: PASS -> FAIL (fdo#105347) shard-glk: PASS -> FAIL (fdo#105347) igt@drv_selftest@live_hugepages: shard-kbl: PASS -> INCOMPLETE (fdo#103665) igt@kms_atomic_transition@1x-modeset-transitions-nonblocking: shard-glk: PASS -> FAIL (fdo#105703) igt@kms_flip@basic-flip-vs-wf_vblank: shard-glk: PASS -> FAIL (fdo#103928) igt@kms_flip@flip-vs-panning-vs-hang-interruptible: shard-snb: PASS -> DMESG-WARN (fdo#103821) igt@kms_setmode@basic: shard-kbl: PASS -> FAIL (fdo#99912) Possible fixes igt@kms_cursor_legacy@cursora-vs-flipa-toggle: shard-glk: DMESG-WARN (fdo#105763) -> PASS igt@kms_flip@flip-vs-expired-vblank-interruptible: shard-glk: FAIL (fdo#105189) -> PASS igt@kms_flip@modeset-vs-vblank-race: shard-hsw: FAIL (fdo#103060) -> PASS igt@kms_flip@plain-flip-fb-recreate-interruptible: shard-glk: FAIL (fdo#100368) -> PASS +1 igt@kms_flip_tiling@flip-to-x-tiled: shard-glk: FAIL (fdo#104724) -> PASS igt@kms_setmode@basic: shard-apl: FAIL (fdo#99912) -> PASS shard-hsw: FAIL (fdo#99912) -> PASS igt@perf@blocking: shard-hsw: FAIL (fdo#102252) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252 fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060 fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665 fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821 fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928 fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724 fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189 fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347 fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703 fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763 fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * Linux: CI_DRM_4333 -> Patchwork_9346 CI_DRM_4333: 5fad115a81a20aa6b4ffd3f7f6663d43c88fa395 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9346: 6d78c34f2428efbb957895000479ef7e0b2809c3 @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9346/shards.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] [RFC] Add support to force specific module load
On Sat, Jun 16, 2018 at 09:26:31PM -0300, Rodrigo Siqueira wrote: > Hi, > > First of all, thanks for your feedback :) > > On 06/13, Petri Latvala wrote: > > On Tue, May 29, 2018 at 09:45:20PM -0300, Rodrigo Siqueira wrote: > > > This patch adds a new option to force the use of a module specified from > > > the command line. The force command expects a module name which will be > > > used on the target test (changing the standard behavior). This feature > > > can be useful for developers that have to create a new module since it > > > is possible to use some of the tests already provided by IGT (e.g., > > > kms_color, core, etc.) as a start point. Additionally, it can > > > also be useful for someone that wants to implement a new set of tests > > > for a specific driver because the developer can first check the behavior > > > of any test in the target module. It is important to highlight, that a > > > force option can produce unexpected results and developers should be > > > aware of that. > > > > > > Is this meant for testing replacement drivers for hardware with > > already existing drivers? If not, I'm not sure what the goal is here. > > Just for provide some additional information, follows my context and > motivation for this patch: > > We are working on a new module named VKMS [1,2]. In some way, our > development approach is similar to Test-Driven Development (TDD), since > we use IGT tests to support our development process. For example, at the > beginning of the VKMS development we focused on making core_* tests > pass, and now we are using kms_flip and others to help us to implement > new features. For doing it, we changed IGT code to load our > module. After thinking about the changes we made in the IGT, I realize > that force a particular module via command line could be useful for > other users because they can utilize the available tests to help them to > create their modules (as we are doing). Additionally, I think this > feature could be used for test some basic features on modules that > currently aren't part of the IGT. > > So, what do you think about that? Do you think that makes sense to have > this feature in the IGT? Yes! The devil is in the details though. Forcing the use of a specific driver, that's what we're going to need in IGT in some form. After discussing this with you on IRC, I learned that you're running a VM without any other DRM drivers (loaded). That's why you have this system working at this time. When the tests want an fd to a DRM device, drmtest.c tries to open the first /dev/dri/card that matches what is requested. If everything fails, it loads all modules it knows about and tries another time, again opening the first /dev/dri/card that matches the request. If you had, say, i915 loaded or builtin, you'd have /dev/dri/card0 already, and it would be used for DRIVER_ANY opens regardless of whether you modprobe vkms. If vkms was builtin, modprobe would change nothing. One force option that we absolutely need is selecting what DRIVER_ANY means, in a device that has multiple DRM drivers available. Another is forcing which /dev/dri/card to use, with or without overriding what DRIVER_ANY means. Forcing a modprobe on a particular driver isn't strictly speaking a third option, but tied to the two. (One could argue that modprobing a driver can also be done from one's testing scripts, but drivers can be left unloaded by e.g. a test that checks module unloading.) An approach I came up with is setting a string and in drmtest.c, __open_device(), if (force_string && chipset == DRIVER_ANY && __is_device(fd, force_string)) return fd; That would force vkms to be used by setting force_string to "vkms", assuming DRM_IOCTL_VERSION gives that as its name. That allows vkms to be builtin, and other drivers to be loaded. In addition to that, setting another force string could be used to modprobe a specific module. In addition to what is already loaded by the modprobe loop, forcing the device name in the above code would mean other drivers won't be used. > > > Setting a forced module target in this patch changes which module is > > loaded by the kernel, but the driver that's opened by IGT is > > unchanged. Force-loading my-fancy-driver.ko still makes > > drm_open_driver(DRIVER_INTEL) open the one driven by i915.ko, and > > drm_open_driver(DRIVER_ANY) still opens the first one that is > > recognized. > > I think it is better to force open and load, right? > > > If this is for testing new drivers for not-already-supported devices, > > you need to instead force what drm_open_driver(DRIVER_ANY) will open, > > and not reject unknown devices. For those following along at home, correction to this: drm_open_driver does not reject unknown devices, I misread the code. > I did not completely understand the idea, what do you mean by force > option through the environment? Make the force command set a flag and > change the code to check it? As you might have learned now,
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Try to fix encoder possible_clones/crtcs (rev2)
== Series Details == Series: drm: Try to fix encoder possible_clones/crtcs (rev2) URL : https://patchwork.freedesktop.org/series/44848/ State : warning == Summary == $ dim checkpatch origin/drm-tip 3006d0e17c54 drm: Add drm_encoder_mask() a610ab10aea4 drm: Include the encoder itself in possible_clones eae1fc52497d drm/gma500: Sanitize possible_clones -:10: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #10: i915 at least doesn't do those. Truthfully there could be some very specific total: 0 errors, 1 warnings, 0 checks, 51 lines checked 2a97e6dc397a drm/sti: Remove pointless casts 651aafd32889 drm/sti: Try to fix up the tvout possible clones c9d2398f8ca3 drm/exynos: Use drm_encoder_mask() e27809347273 drm/imx: Remove the bogus possible_clones setup d6c79671aca4 drm: Validate encoder->possible_clones 15dc5f6a09c2 drm/i915: Use drm_encoder_mask() 0a51f88f7a37 drm/i915: Populate possible_crtcs correctly 46d63ba9a949 drm/i915: Fix DP-MST crtc_mask 24ad65a02b7e drm/i915: Clean up encoder->crtc_mask setup ed39c3f62c9c drm/i915: Simplfy LVDS crtc_mask setup 0674e5f40f99 drm: Validate encoder->possible_crtcs ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm: Try to fix encoder possible_clones/crtcs (rev2)
== Series Details == Series: drm: Try to fix encoder possible_clones/crtcs (rev2) URL : https://patchwork.freedesktop.org/series/44848/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4334 -> Patchwork_9352 = == Summary - SUCCESS == No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/44848/revisions/2/mbox/ == Known issues == Here are the changes found in Patchwork_9352 that come from known issues: === IGT changes === Issues hit igt@gem_exec_suspend@basic-s4-devices: fi-kbl-7500u: PASS -> DMESG-WARN (fdo#105128) igt@kms_flip@basic-flip-vs-dpms: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106000, fdo#106097) igt@kms_flip@basic-flip-vs-modeset: fi-skl-6700hq: PASS -> DMESG-WARN (fdo#105998) Possible fixes igt@gem_ctx_create@basic-files: fi-kbl-guc: DMESG-WARN -> PASS igt@gem_ctx_switch@basic-default-heavy: fi-glk-j4005: DMESG-WARN (fdo#105719, fdo#106745) -> PASS igt@kms_flip@basic-flip-vs-modeset: fi-glk-j4005: DMESG-WARN (fdo#106000, fdo#106097) -> PASS igt@kms_flip@basic-plain-flip: fi-glk-j4005: DMESG-WARN (fdo#106097) -> PASS igt@kms_pipe_crc_basic@read-crc-pipe-c-frame-sequence: fi-glk-j4005: DMESG-WARN (fdo#106238) -> PASS fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128 fdo#105719 https://bugs.freedesktop.org/show_bug.cgi?id=105719 fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097 fdo#106238 https://bugs.freedesktop.org/show_bug.cgi?id=106238 fdo#106745 https://bugs.freedesktop.org/show_bug.cgi?id=106745 == Participating hosts (42 -> 38) == Additional (1): fi-ilk-650 Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u == Build changes == * Linux: CI_DRM_4334 -> Patchwork_9352 CI_DRM_4334: e2635b9253c80ae63fcea5b3382351aa34e5f056 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9352: 0674e5f40f9980a1a9042f70d454e0c97a7169b1 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 0674e5f40f99 drm: Validate encoder->possible_crtcs ed39c3f62c9c drm/i915: Simplfy LVDS crtc_mask setup 24ad65a02b7e drm/i915: Clean up encoder->crtc_mask setup 46d63ba9a949 drm/i915: Fix DP-MST crtc_mask 0a51f88f7a37 drm/i915: Populate possible_crtcs correctly 15dc5f6a09c2 drm/i915: Use drm_encoder_mask() d6c79671aca4 drm: Validate encoder->possible_clones e27809347273 drm/imx: Remove the bogus possible_clones setup c9d2398f8ca3 drm/exynos: Use drm_encoder_mask() 651aafd32889 drm/sti: Try to fix up the tvout possible clones 2a97e6dc397a drm/sti: Remove pointless casts eae1fc52497d drm/gma500: Sanitize possible_clones a610ab10aea4 drm: Include the encoder itself in possible_clones 3006d0e17c54 drm: Add drm_encoder_mask() == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9352/issues.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/3] drm/i915: Enforce max hdisplay/hblank_start limits on HSW/BDW FDI
On Fri, Jun 15, 2018 at 02:09:12PM -0700, Paulo Zanoni wrote: > Em Sex, 2018-06-15 às 20:44 +0300, Ville Syrjala escreveu: > > From: Ville Syrjälä > > > > The PCH transcoder registers are only 12 bits wide for the hdisplay > > and hblank_start values. On HSW/BDW the CPU side registers are 13 > > bits wide. intel_mode_valid() only checks against the higher limit > > (since we don't know where the mode is to be used), so an extra > > check is required against the FDI limits. > > > > Signed-off-by: Ville Syrjälä > > --- > > drivers/gpu/drm/i915/intel_crt.c | 9 + > > 1 file changed, 9 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/intel_crt.c > > b/drivers/gpu/drm/i915/intel_crt.c > > index 95aa29cf2d9c..457b1a2d05b8 100644 > > --- a/drivers/gpu/drm/i915/intel_crt.c > > +++ b/drivers/gpu/drm/i915/intel_crt.c > > @@ -333,6 +333,10 @@ intel_crt_mode_valid(struct drm_connector > > *connector, > > (ironlake_get_lanes_required(mode->clock, 27, 24) > > > 2)) > > return MODE_CLOCK_HIGH; > > > > + /* HSW/BDW FDI limited to 4k */ > > + if (mode->hdisplay > 4096) > > + return MODE_H_ILLEGAL; > > + > > return MODE_OK; > > } > > > > @@ -375,6 +379,11 @@ static bool hsw_crt_compute_config(struct > > intel_encoder *encoder, > > if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN) > > return false; > > > > + /* HSW/BDW FDI limited to 4k */ > > + if (adjusted_mode->crtc_hdisplay > 4096 || > > + adjusted_mode->crtc_hblank_start > 4096) > > + return false; > > Meh, doubling checks is not cool. > > By the way, doesn't this chunk make more sense inside > ironlake_fdi_compute_config()? Hmm. I don't see a particularly good reason for putting it there. All that guy is doing is computing the number of lanes and the M/N values. Nothing to do with transcoder timings. It's also called fairly late in the process, so we'd end up doing quite a bit of pointless work that way. > > Just to make sure: the only cases that could escape mode_valid() and > make it into compute_config() are for panel fitting, right? The connector .mode_valid() won't be called for setcrtc/atomic ioctls at all. > > With or without changes: > > Reviewed-by: Paulo Zanoni > > Thanks, > Paulo > > > + > > pipe_config->has_pch_encoder = true; > > > > /* LPT FDI RX only supports 8bpc. */ -- Ville Syrjälä Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915/gtt: Enable full-ppgtt by default everywhere
== Series Details == Series: series starting with [1/2] drm/i915/gtt: Enable full-ppgtt by default everywhere URL : https://patchwork.freedesktop.org/series/44925/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4333_full -> Patchwork_9348_full = == Summary - WARNING == Minor unknown changes coming with Patchwork_9348_full need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9348_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9348_full: === IGT changes === Warnings igt@gem_mocs_settings@mocs-rc6-vebox: shard-kbl: PASS -> SKIP igt@gem_ppgtt@flink-and-close-vma-leak: shard-hsw: SKIP -> PASS +2 == Known issues == Here are the changes found in Patchwork_9348_full that come from known issues: === IGT changes === Issues hit igt@drv_selftest@live_gtt: shard-glk: PASS -> FAIL (fdo#105347) igt@drv_selftest@live_hangcheck: shard-kbl: PASS -> DMESG-FAIL (fdo#106947) igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic: shard-glk: PASS -> FAIL (fdo#105454, fdo#106509) igt@kms_flip@flip-vs-wf_vblank-interruptible: shard-glk: PASS -> FAIL (fdo#100368) igt@kms_flip@modeset-vs-vblank-race-interruptible: shard-hsw: PASS -> FAIL (fdo#103060) Possible fixes igt@kms_cursor_legacy@cursora-vs-flipa-toggle: shard-glk: DMESG-WARN (fdo#105763) -> PASS igt@kms_flip@flip-vs-expired-vblank-interruptible: shard-glk: FAIL (fdo#105189) -> PASS igt@kms_flip@modeset-vs-vblank-race: shard-hsw: FAIL (fdo#103060) -> PASS igt@kms_flip@plain-flip-fb-recreate-interruptible: shard-glk: FAIL (fdo#100368) -> PASS +2 igt@kms_flip_tiling@flip-to-x-tiled: shard-glk: FAIL (fdo#104724) -> PASS igt@kms_setmode@basic: shard-apl: FAIL (fdo#99912) -> PASS igt@perf@blocking: shard-hsw: FAIL (fdo#102252) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252 fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060 fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724 fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189 fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347 fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454 fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763 fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509 fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947 fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * Linux: CI_DRM_4333 -> Patchwork_9348 CI_DRM_4333: 5fad115a81a20aa6b4ffd3f7f6663d43c88fa395 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9348: 5423c7e1efb6b188874236db402a5848bb3ab7cf @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9348/shards.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/execlists: Pull the w/a LRI emission into a helper
== Series Details == Series: drm/i915/execlists: Pull the w/a LRI emission into a helper URL : https://patchwork.freedesktop.org/series/44921/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4333_full -> Patchwork_9347_full = == Summary - WARNING == Minor unknown changes coming with Patchwork_9347_full need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9347_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9347_full: === IGT changes === Warnings igt@gem_mocs_settings@mocs-rc6-blt: shard-kbl: PASS -> SKIP == Known issues == Here are the changes found in Patchwork_9347_full that come from known issues: === IGT changes === Issues hit igt@drv_selftest@live_gtt: shard-kbl: PASS -> FAIL (fdo#105347) shard-glk: PASS -> FAIL (fdo#105347) igt@drv_selftest@live_hangcheck: shard-kbl: PASS -> DMESG-FAIL (fdo#106947) igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic: shard-glk: PASS -> FAIL (fdo#106509, fdo#105454) igt@kms_flip@plain-flip-fb-recreate: shard-glk: PASS -> FAIL (fdo#100368) igt@kms_setmode@basic: shard-kbl: PASS -> FAIL (fdo#99912) Possible fixes igt@gem_wait@await-default: shard-snb: INCOMPLETE (fdo#105411) -> PASS igt@kms_cursor_legacy@cursora-vs-flipa-toggle: shard-glk: DMESG-WARN (fdo#105763) -> PASS igt@kms_flip@flip-vs-expired-vblank-interruptible: shard-glk: FAIL (fdo#105189) -> PASS igt@kms_flip@modeset-vs-vblank-race: shard-hsw: FAIL (fdo#103060) -> PASS igt@kms_flip@plain-flip-fb-recreate-interruptible: shard-glk: FAIL (fdo#100368) -> PASS +2 igt@kms_flip_tiling@flip-to-x-tiled: shard-glk: FAIL (fdo#104724) -> PASS igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a: shard-kbl: INCOMPLETE (fdo#103665) -> PASS igt@perf@blocking: shard-hsw: FAIL (fdo#102252) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252 fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060 fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665 fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724 fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189 fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347 fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411 fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454 fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763 fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509 fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947 fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * Linux: CI_DRM_4333 -> Patchwork_9347 CI_DRM_4333: 5fad115a81a20aa6b4ffd3f7f6663d43c88fa395 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9347: 12321f1761c3fdd9eb4bd903bba62adb494f0212 @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9347/shards.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/execlists: Pull the w/a LRI emission into a helper
Quoting Joonas Lahtinen (2018-06-18 12:01:16) > Quoting Chris Wilson (2018-06-18 12:41:50) > > Having the w/a registers as an open-coded table leaves a trap for the > > unwary; it would be easy to miss incrementing the LRI counter when > > adding a new register to the list. Instead, pull the list of registers > > into a table, so that we only need add new registers to that table > > rather than try and remember important side-effects of earlier chunks of > > GPU instructions. > > > > Suggested-by: Joonas Lahtinen > > Signed-off-by: Chris Wilson > > Cc: Joonas Lahtinen > > Not related to this patch, but the lack of OOB check for batch makes > one itch a little bit. > > Reviewed-by: Joonas Lahtinen Thanks for the suggestion and review, pushed. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 08/12] drm/client: Add client callbacks
Add client callbacks and hook them up. Add a list of clients per drm_device. Signed-off-by: Noralf Trønnes --- Changes since version 1: - Remove unused functions - Change name drm_client_funcs.lastclose -> .restore - Change name drm_client_funcs.remove -> .unregister - Rework unregister code drivers/gpu/drm/drm_client.c| 97 +++-- drivers/gpu/drm/drm_drv.c | 7 +++ drivers/gpu/drm/drm_fb_cma_helper.c | 2 +- drivers/gpu/drm/drm_file.c | 3 ++ drivers/gpu/drm/drm_probe_helper.c | 3 ++ include/drm/drm_client.h| 69 +- include/drm/drm_device.h| 14 ++ 7 files changed, 190 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index 98dda40f5416..f1dc04d641cc 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -74,6 +74,7 @@ EXPORT_SYMBOL(drm_client_close); * @dev: DRM device * @client: DRM client * @name: Client name + * @funcs: DRM client functions (optional) * * Use drm_client_put() to free the client. * @@ -81,8 +82,9 @@ EXPORT_SYMBOL(drm_client_close); * Zero on success or negative error code on failure. */ int drm_client_new(struct drm_device *dev, struct drm_client_dev *client, - const char *name) + const char *name, const struct drm_client_funcs *funcs) { + bool registered; int ret; if (!drm_core_check_feature(dev, DRIVER_MODESET) || @@ -91,12 +93,23 @@ int drm_client_new(struct drm_device *dev, struct drm_client_dev *client, client->dev = dev; client->name = name; + client->funcs = funcs; kref_init(&client->ref); ret = drm_client_open(client); if (ret) return ret; + mutex_lock(&dev->clientlist_mutex); + registered = dev->registered; + if (registered) + list_add(&client->list, &dev->clientlist); + mutex_unlock(&dev->clientlist_mutex); + if (!registered) { + drm_client_close(client); + return -ENODEV; + } + drm_dev_get(dev); return 0; @@ -110,8 +123,17 @@ static void drm_client_release(struct kref *ref) DRM_DEV_DEBUG_KMS(dev->dev, "%s\n", client->name); - drm_client_close(client); - kfree(client); + mutex_lock(&dev->clientlist_mutex); + if (!list_empty(&client->list)) + list_del(&client->list); + mutex_unlock(&dev->clientlist_mutex); + + if (client->funcs && client->funcs->release) { + client->funcs->release(client); + } else { + drm_client_close(client); + kfree(client); + } drm_dev_put(dev); } @@ -145,6 +167,75 @@ void drm_client_put(struct drm_client_dev *client) } EXPORT_SYMBOL(drm_client_put); +void drm_client_dev_unregister(struct drm_device *dev) +{ + struct drm_client_dev *client, *iter; + + if (!drm_core_check_feature(dev, DRIVER_MODESET)) + return; + + do { + client = NULL; + mutex_lock(&dev->clientlist_mutex); + list_for_each_entry(iter, &dev->clientlist, list) { + list_del_init(&iter->list); + if (iter->funcs && iter->funcs->unregister) { + /* Make sure a release has not begun */ + if (kref_get_unless_zero(&iter->ref)) { + client = iter; + break; + } + } + } + mutex_unlock(&dev->clientlist_mutex); + if (client) { + client->funcs->unregister(client); + drm_client_put(client); + } + } while (client); +} + +void drm_client_dev_hotplug(struct drm_device *dev) +{ + struct drm_client_dev *client; + int ret; + + if (!drm_core_check_feature(dev, DRIVER_MODESET)) + return; + + mutex_lock(&dev->clientlist_mutex); + list_for_each_entry(client, &dev->clientlist, list) { + if (!client->funcs || !client->funcs->hotplug) + continue; + + ret = client->funcs->hotplug(client); + DRM_DEV_DEBUG_KMS(dev->dev, "%s: ret=%d\n", client->name, ret); + } + mutex_unlock(&dev->clientlist_mutex); +} +EXPORT_SYMBOL(drm_client_dev_hotplug); + +void drm_client_dev_restore(struct drm_device *dev) +{ + struct drm_client_dev *client; + int ret; + + if (!drm_core_check_feature(dev, DRIVER_MODESET)) + return; + + mutex_lock(&dev->clientlist_mutex); + list_for_each_entry(client, &dev->clientlist, list) { + if (!client->funcs || !client->funcs->restore) + continue; + +
[Intel-gfx] [PATCH v2 04/12] drm: Begin an API for in-kernel clients
This the beginning of an API for in-kernel clients. First out is a way to get a framebuffer backed by a dumb buffer. Only GEM drivers are supported. The original idea of using an exported dma-buf was dropped because it also creates an anonomous file descriptor which doesn't work when the buffer is created from a kernel thread. The easy way out is to use drm_driver.gem_prime_vmap to get the virtual address, which requires a GEM object. This excludes the vmwgfx driver which is the only non-GEM driver apart from the legacy ones. A solution for vmwgfx will have to be worked out later if it wants to support the client API which it probably will when we have a bootsplash client. Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter --- Changes since version 1: - Make it possible to embed struct drm_client_dev and drop the private pointer - Use kref reference counting to control client release since both the client and the driver can release. - Add comment about using dma-buf as a possibility with some rework - Move buffer NULL check to drm_client_framebuffer_delete() - Move client name to struct drm_client_dev - Move up drm_dev_get/put calls to make them more visible - Move drm_client_dev.list definition to later patch that makes use of it Documentation/gpu/drm-client.rst | 12 ++ Documentation/gpu/index.rst | 1 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_client.c | 316 +++ drivers/gpu/drm/drm_drv.c| 1 + include/drm/drm_client.h | 87 +++ include/drm/drm_device.h | 7 + 7 files changed, 425 insertions(+), 1 deletion(-) create mode 100644 Documentation/gpu/drm-client.rst create mode 100644 drivers/gpu/drm/drm_client.c create mode 100644 include/drm/drm_client.h diff --git a/Documentation/gpu/drm-client.rst b/Documentation/gpu/drm-client.rst new file mode 100644 index ..7e672063e7eb --- /dev/null +++ b/Documentation/gpu/drm-client.rst @@ -0,0 +1,12 @@ += +Kernel clients += + +.. kernel-doc:: drivers/gpu/drm/drm_client.c + :doc: overview + +.. kernel-doc:: include/drm/drm_client.h + :internal: + +.. kernel-doc:: drivers/gpu/drm/drm_client.c + :export: diff --git a/Documentation/gpu/index.rst b/Documentation/gpu/index.rst index 00288f34c5a6..1fcf8e851e15 100644 --- a/Documentation/gpu/index.rst +++ b/Documentation/gpu/index.rst @@ -10,6 +10,7 @@ Linux GPU Driver Developer's Guide drm-kms drm-kms-helpers drm-uapi + drm-client drivers vga-switcheroo vgaarbiter diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index ef9f3dab287f..8c8045147416 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -18,7 +18,7 @@ drm-y :=drm_auth.o drm_bufs.o drm_cache.o \ drm_encoder.o drm_mode_object.o drm_property.o \ drm_plane.o drm_color_mgmt.o drm_print.o \ drm_dumb_buffers.o drm_mode_config.o drm_vblank.o \ - drm_syncobj.o drm_lease.o + drm_syncobj.o drm_lease.o drm_client.o drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o drm-$(CONFIG_DRM_VM) += drm_vm.o diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c new file mode 100644 index ..98dda40f5416 --- /dev/null +++ b/drivers/gpu/drm/drm_client.c @@ -0,0 +1,316 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2018 Noralf Trønnes + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "drm_crtc_internal.h" +#include "drm_internal.h" + +/** + * DOC: overview + * + * This library provides support for clients running in the kernel like fbdev and bootsplash. + * Currently it's only partially implemented, just enough to support fbdev. + * + * GEM drivers which provide a GEM based dumb buffer with a virtual address are supported. + */ + +static int drm_client_open(struct drm_client_dev *client) +{ + struct drm_device *dev = client->dev; + struct drm_file *file; + + file = drm_file_alloc(dev->primary); + if (IS_ERR(file)) + return PTR_ERR(file); + + mutex_lock(&dev->filelist_mutex); + list_add(&file->lhead, &dev->filelist_internal); + mutex_unlock(&dev->filelist_mutex); + + client->file = file; + + return 0; +} + +/** + * drm_client_close - Close the client DRM file + * @client: DRM client + * + * Close the &drm_file that was opened by drm_client_new(). It is called + * automatically if the &drm_client_funcs.release callback is not set. + * This function should only be called from the release callback. + */ +void drm_client_close(struct drm_client_dev *client) +{ + struct drm_device *dev = client->dev; + + mutex_lock(&dev->filelist_mutex); + list_del(&client->file->lhead); + mutex_unlock(&dev->filelist_mutex); + +
[Intel-gfx] [PATCH v2 00/12] drm: Add generic fbdev emulation
This patchset adds generic fbdev emulation for drivers that supports GEM based dumb buffers which support .gem_prime_vmap and gem_prime_mmap. An API is begun to support in-kernel clients in general. Notable changes since version 1: - Rework client unregister code. I've used reference counting to manage the fact that both the client itself and the driver through drm_dev_unregister() can release the client. The client is now released using drm_client_put() instead of drm_client_free(). - fbdev: Use a shadow buffer for framebuffers that have a dirty callback. This makes the fbdev client truly generic and useable for all drivers. There's a blitting penalty, but this is generic emulation after all. The reason for needing a shadow buffer is that deferred I/O only works with kmalloc/vmalloc buffers and not with shmem buffers (page->lru/mapping). - Let tinydrm use the full fbdev client Noralf. Changes since version 1: - Make it possible to embed struct drm_client_dev and drop the private pointer - Use kref reference counting to control client release since both the client and the driver can release. - Add comment about using dma-buf as a possibility with some rework - Move buffer NULL check to drm_client_framebuffer_delete() - Move client name to struct drm_client_dev - Move up drm_dev_get/put calls to make them more visible - Move drm_client_dev.list definition to later patch that makes use of it - Embed drm_client at the beginning of drm_fb_helper to avoid a fragile transitional kfree hack in drm_client_release() - Set owner in drm_fbdev_fb_ops - Add kerneldoc to drm_fb_helper_generic_probe() - Remove unused functions - Change name drm_client_funcs.lastclose -> .restore - Change name drm_client_funcs.remove -> .unregister - Rework unregister code - tinydrm: Use drm_fbdev_generic_setup() and remove drm_fb_cma_fbdev_init_with_funcs() David Herrmann (1): drm: provide management functions for drm_file Noralf Trønnes (11): drm/file: Don't set master on in-kernel clients drm: Make ioctls available for in-kernel clients drm: Begin an API for in-kernel clients drm/fb-helper: Add generic fbdev emulation .fb_probe function drm/pl111: Set .gem_prime_vmap and .gem_prime_mmap drm/cma-helper: Use the generic fbdev emulation drm/client: Add client callbacks drm/debugfs: Add internal client debugfs file drm/fb-helper: Finish the generic fbdev emulation drm/tinydrm: Use drm_fbdev_generic_setup() drm/cma-helper: Remove drm_fb_cma_fbdev_init_with_funcs() Documentation/gpu/drm-client.rst| 12 + Documentation/gpu/index.rst | 1 + drivers/gpu/drm/Makefile| 2 +- drivers/gpu/drm/drm_client.c| 435 drivers/gpu/drm/drm_crtc_internal.h | 19 +- drivers/gpu/drm/drm_debugfs.c | 7 + drivers/gpu/drm/drm_drv.c | 8 + drivers/gpu/drm/drm_dumb_buffers.c | 33 ++- drivers/gpu/drm/drm_fb_cma_helper.c | 380 +++- drivers/gpu/drm/drm_fb_helper.c | 330 - drivers/gpu/drm/drm_file.c | 304 ++- drivers/gpu/drm/drm_framebuffer.c | 42 ++- drivers/gpu/drm/drm_internal.h | 2 + drivers/gpu/drm/drm_ioctl.c | 4 +- drivers/gpu/drm/drm_probe_helper.c | 3 + drivers/gpu/drm/pl111/pl111_drv.c | 2 + drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 3 +- drivers/gpu/drm/tinydrm/ili9225.c | 1 - drivers/gpu/drm/tinydrm/mi0283qt.c | 1 - drivers/gpu/drm/tinydrm/st7586.c| 1 - drivers/gpu/drm/tinydrm/st7735r.c | 1 - include/drm/drm_client.h| 156 ++ include/drm/drm_device.h| 21 ++ include/drm/drm_fb_cma_helper.h | 6 - include/drm/drm_fb_helper.h | 38 +++ 25 files changed, 1298 insertions(+), 514 deletions(-) create mode 100644 Documentation/gpu/drm-client.rst create mode 100644 drivers/gpu/drm/drm_client.c create mode 100644 include/drm/drm_client.h -- 2.15.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 03/12] drm: Make ioctls available for in-kernel clients
Make ioctl wrappers for functions that will be used by the in-kernel API. The following functions are touched: - drm_mode_create_dumb_ioctl() - drm_mode_destroy_dumb_ioctl() - drm_mode_addfb() - drm_mode_rmfb() Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_crtc_internal.h | 19 + drivers/gpu/drm/drm_dumb_buffers.c | 33 +++-- drivers/gpu/drm/drm_framebuffer.c | 42 - drivers/gpu/drm/drm_ioctl.c | 4 ++-- 4 files changed, 66 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index 5d307b23a4e6..c762614af453 100644 --- a/drivers/gpu/drm/drm_crtc_internal.h +++ b/drivers/gpu/drm/drm_crtc_internal.h @@ -62,6 +62,12 @@ int drm_mode_getresources(struct drm_device *dev, /* drm_dumb_buffers.c */ +int drm_mode_create_dumb(struct drm_device *dev, +struct drm_mode_create_dumb *args, +struct drm_file *file_priv); +int drm_mode_destroy_dumb(struct drm_device *dev, u32 handle, + struct drm_file *file_priv); + /* IOCTLs */ int drm_mode_create_dumb_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); @@ -163,14 +169,19 @@ int drm_framebuffer_check_src_coords(uint32_t src_x, uint32_t src_y, const struct drm_framebuffer *fb); void drm_fb_release(struct drm_file *file_priv); +int drm_mode_addfb(struct drm_device *dev, struct drm_mode_fb_cmd *or, + struct drm_file *file_priv); +int drm_mode_rmfb(struct drm_device *dev, u32 fb_id, + struct drm_file *file_priv); + /* IOCTL */ -int drm_mode_addfb(struct drm_device *dev, - void *data, struct drm_file *file_priv); +int drm_mode_addfb_ioctl(struct drm_device *dev, +void *data, struct drm_file *file_priv); int drm_mode_addfb2(struct drm_device *dev, void *data, struct drm_file *file_priv); -int drm_mode_rmfb(struct drm_device *dev, - void *data, struct drm_file *file_priv); +int drm_mode_rmfb_ioctl(struct drm_device *dev, + void *data, struct drm_file *file_priv); int drm_mode_getfb(struct drm_device *dev, void *data, struct drm_file *file_priv); int drm_mode_dirtyfb_ioctl(struct drm_device *dev, diff --git a/drivers/gpu/drm/drm_dumb_buffers.c b/drivers/gpu/drm/drm_dumb_buffers.c index 39ac15ce4702..eed9687b8698 100644 --- a/drivers/gpu/drm/drm_dumb_buffers.c +++ b/drivers/gpu/drm/drm_dumb_buffers.c @@ -53,10 +53,10 @@ * a hardware-specific ioctl to allocate suitable buffer objects. */ -int drm_mode_create_dumb_ioctl(struct drm_device *dev, - void *data, struct drm_file *file_priv) +int drm_mode_create_dumb(struct drm_device *dev, +struct drm_mode_create_dumb *args, +struct drm_file *file_priv) { - struct drm_mode_create_dumb *args = data; u32 cpp, stride, size; if (!dev->driver->dumb_create) @@ -91,6 +91,12 @@ int drm_mode_create_dumb_ioctl(struct drm_device *dev, return dev->driver->dumb_create(file_priv, dev, args); } +int drm_mode_create_dumb_ioctl(struct drm_device *dev, + void *data, struct drm_file *file_priv) +{ + return drm_mode_create_dumb(dev, data, file_priv); +} + /** * drm_mode_mmap_dumb_ioctl - create an mmap offset for a dumb backing storage buffer * @dev: DRM device @@ -122,17 +128,22 @@ int drm_mode_mmap_dumb_ioctl(struct drm_device *dev, &args->offset); } +int drm_mode_destroy_dumb(struct drm_device *dev, u32 handle, + struct drm_file *file_priv) +{ + if (!dev->driver->dumb_create) + return -ENOSYS; + + if (dev->driver->dumb_destroy) + return dev->driver->dumb_destroy(file_priv, dev, handle); + else + return drm_gem_dumb_destroy(file_priv, dev, handle); +} + int drm_mode_destroy_dumb_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_mode_destroy_dumb *args = data; - if (!dev->driver->dumb_create) - return -ENOSYS; - - if (dev->driver->dumb_destroy) - return dev->driver->dumb_destroy(file_priv, dev, args->handle); - else - return drm_gem_dumb_destroy(file_priv, dev, args->handle); + return drm_mode_destroy_dumb(dev, args->handle, file_priv); } - diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index bfedceff87bb..44759aeed1e7 100644 --- a/drivers/gpu/drm/drm_framebuffer.c +++ b/drivers/gpu/drm/drm_framebuffer.c @@ -95,21 +95,20 @@ int drm_framebuffer_check_src_coords(uint32_t src_x, uint
[Intel-gfx] [PATCH v2 01/12] drm: provide management functions for drm_file
From: David Herrmann Rather than doing drm_file allocation/destruction right in the fops, lets provide separate helpers. This decouples drm_file management from the still-mandatory drm-fops. It prepares for use of drm_file without the fops, both by possible separate fops implementations and APIs (not that I am aware of any such plans), and more importantly from in-kernel use where no real file is available. Signed-off-by: David Herrmann Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_file.c | 305 +++-- drivers/gpu/drm/drm_internal.h | 2 + 2 files changed, 175 insertions(+), 132 deletions(-) diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index e394799979a6..d4588d33f91c 100644 --- a/drivers/gpu/drm/drm_file.c +++ b/drivers/gpu/drm/drm_file.c @@ -101,6 +101,175 @@ DEFINE_MUTEX(drm_global_mutex); static int drm_open_helper(struct file *filp, struct drm_minor *minor); +/** + * drm_file_alloc - allocate file context + * @minor: minor to allocate on + * + * This allocates a new DRM file context. It is not linked into any context and + * can be used by the caller freely. Note that the context keeps a pointer to + * @minor, so it must be freed before @minor is. + * + * RETURNS: + * Pointer to newly allocated context, ERR_PTR on failure. + */ +struct drm_file *drm_file_alloc(struct drm_minor *minor) +{ + struct drm_device *dev = minor->dev; + struct drm_file *file; + int ret; + + file = kzalloc(sizeof(*file), GFP_KERNEL); + if (!file) + return ERR_PTR(-ENOMEM); + + file->pid = get_pid(task_pid(current)); + file->minor = minor; + + /* for compatibility root is always authenticated */ + file->authenticated = capable(CAP_SYS_ADMIN); + file->lock_count = 0; + + INIT_LIST_HEAD(&file->lhead); + INIT_LIST_HEAD(&file->fbs); + mutex_init(&file->fbs_lock); + INIT_LIST_HEAD(&file->blobs); + INIT_LIST_HEAD(&file->pending_event_list); + INIT_LIST_HEAD(&file->event_list); + init_waitqueue_head(&file->event_wait); + file->event_space = 4096; /* set aside 4k for event buffer */ + + mutex_init(&file->event_read_lock); + + if (drm_core_check_feature(dev, DRIVER_GEM)) + drm_gem_open(dev, file); + + if (drm_core_check_feature(dev, DRIVER_SYNCOBJ)) + drm_syncobj_open(file); + + if (drm_core_check_feature(dev, DRIVER_PRIME)) + drm_prime_init_file_private(&file->prime); + + if (dev->driver->open) { + ret = dev->driver->open(dev, file); + if (ret < 0) + goto out_prime_destroy; + } + + if (drm_is_primary_client(file)) { + ret = drm_master_open(file); + if (ret) + goto out_close; + } + + return file; + +out_close: + if (dev->driver->postclose) + dev->driver->postclose(dev, file); +out_prime_destroy: + if (drm_core_check_feature(dev, DRIVER_PRIME)) + drm_prime_destroy_file_private(&file->prime); + if (drm_core_check_feature(dev, DRIVER_SYNCOBJ)) + drm_syncobj_release(file); + if (drm_core_check_feature(dev, DRIVER_GEM)) + drm_gem_release(dev, file); + put_pid(file->pid); + kfree(file); + + return ERR_PTR(ret); +} + +static void drm_events_release(struct drm_file *file_priv) +{ + struct drm_device *dev = file_priv->minor->dev; + struct drm_pending_event *e, *et; + unsigned long flags; + + spin_lock_irqsave(&dev->event_lock, flags); + + /* Unlink pending events */ + list_for_each_entry_safe(e, et, &file_priv->pending_event_list, +pending_link) { + list_del(&e->pending_link); + e->file_priv = NULL; + } + + /* Remove unconsumed events */ + list_for_each_entry_safe(e, et, &file_priv->event_list, link) { + list_del(&e->link); + kfree(e); + } + + spin_unlock_irqrestore(&dev->event_lock, flags); +} + +/** + * drm_file_free - free file context + * @file: context to free, or NULL + * + * This destroys and deallocates a DRM file context previously allocated via + * drm_file_alloc(). The caller must make sure to unlink it from any contexts + * before calling this. + * + * If NULL is passed, this is a no-op. + * + * RETURNS: + * 0 on success, or error code on failure. + */ +void drm_file_free(struct drm_file *file) +{ + struct drm_device *dev; + + if (!file) + return; + + dev = file->minor->dev; + + DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n", + task_pid_nr(current), + (long)old_encode_dev(file->minor->kdev->devt), + dev->open_count); + + if (drm_core_check_feature(dev, DRIVER_LEGACY
[Intel-gfx] [PATCH v2 02/12] drm/file: Don't set master on in-kernel clients
It only makes sense for userspace clients. Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_file.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index d4588d33f91c..55505378df47 100644 --- a/drivers/gpu/drm/drm_file.c +++ b/drivers/gpu/drm/drm_file.c @@ -155,17 +155,8 @@ struct drm_file *drm_file_alloc(struct drm_minor *minor) goto out_prime_destroy; } - if (drm_is_primary_client(file)) { - ret = drm_master_open(file); - if (ret) - goto out_close; - } - return file; -out_close: - if (dev->driver->postclose) - dev->driver->postclose(dev, file); out_prime_destroy: if (drm_core_check_feature(dev, DRIVER_PRIME)) drm_prime_destroy_file_private(&file->prime); @@ -365,6 +356,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor) { struct drm_device *dev = minor->dev; struct drm_file *priv; + int ret; if (filp->f_flags & O_EXCL) return -EBUSY; /* No exclusive opens */ @@ -379,6 +371,14 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor) if (IS_ERR(priv)) return PTR_ERR(priv); + if (drm_is_primary_client(priv)) { + ret = drm_master_open(priv); + if (ret) { + drm_file_free(priv); + return ret; + } + } + filp->private_data = priv; priv->filp = filp; -- 2.15.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 09/12] drm/debugfs: Add internal client debugfs file
Print the names of the internal clients currently attached. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c | 28 drivers/gpu/drm/drm_debugfs.c | 7 +++ include/drm/drm_client.h | 2 ++ 3 files changed, 37 insertions(+) diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index f1dc04d641cc..3ebb8fa34655 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -405,3 +405,31 @@ void drm_client_framebuffer_delete(struct drm_client_buffer *buffer) drm_client_buffer_delete(buffer); } EXPORT_SYMBOL(drm_client_framebuffer_delete); + +#ifdef CONFIG_DEBUG_FS +static int drm_client_debugfs_internal_clients(struct seq_file *m, void *data) +{ + struct drm_info_node *node = m->private; + struct drm_device *dev = node->minor->dev; + struct drm_printer p = drm_seq_file_printer(m); + struct drm_client_dev *client; + + mutex_lock(&dev->clientlist_mutex); + list_for_each_entry(client, &dev->clientlist, list) + drm_printf(&p, "%s\n", client->name); + mutex_unlock(&dev->clientlist_mutex); + + return 0; +} + +static const struct drm_info_list drm_client_debugfs_list[] = { + { "internal_clients", drm_client_debugfs_internal_clients, 0 }, +}; + +int drm_client_debugfs_init(struct drm_minor *minor) +{ + return drm_debugfs_create_files(drm_client_debugfs_list, + ARRAY_SIZE(drm_client_debugfs_list), + minor->debugfs_root, minor); +} +#endif diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index b2482818fee8..50a20bfc07ea 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -164,6 +165,12 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id, DRM_ERROR("Failed to create framebuffer debugfs file\n"); return ret; } + + ret = drm_client_debugfs_init(minor); + if (ret) { + DRM_ERROR("Failed to create client debugfs file\n"); + return ret; + } } if (dev->driver->debugfs_init) { diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h index 80fe21c86f69..c3a87d6c30fc 100644 --- a/include/drm/drm_client.h +++ b/include/drm/drm_client.h @@ -151,4 +151,6 @@ struct drm_client_buffer * drm_client_framebuffer_create(struct drm_client_dev *client, u32 width, u32 height, u32 format); void drm_client_framebuffer_delete(struct drm_client_buffer *buffer); +int drm_client_debugfs_init(struct drm_minor *minor); + #endif -- 2.15.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 05/12] drm/fb-helper: Add generic fbdev emulation .fb_probe function
This is the first step in getting generic fbdev emulation. A drm_fb_helper_funcs.fb_probe function is added which uses the DRM client API to get a framebuffer backed by a dumb buffer. A transitional hack for tinydrm is needed in order to switch over all CMA helper drivers in a later patch. This hack will be removed when tinydrm moves to vmalloc buffers. Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter --- Changes since version 1: - Embed drm_client at the beginning of drm_fb_helper to avoid a fragile transitional kfree hack in drm_client_release() - Set owner in drm_fbdev_fb_ops - Add kerneldoc to drm_fb_helper_generic_probe() drivers/gpu/drm/drm_fb_helper.c | 209 +++- include/drm/drm_fb_helper.h | 31 ++ 2 files changed, 239 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 2ee1eaa66188..be6bab889f1b 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -30,6 +30,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include +#include #include #include #include @@ -745,6 +746,24 @@ static void drm_fb_helper_resume_worker(struct work_struct *work) console_unlock(); } +static void drm_fb_helper_dirty_blit_real(struct drm_fb_helper *fb_helper, + struct drm_clip_rect *clip) +{ + struct drm_framebuffer *fb = fb_helper->fb; + unsigned int cpp = drm_format_plane_cpp(fb->format->format, 0); + size_t offset = clip->y1 * fb->pitches[0] + clip->x1 * cpp; + void *src = fb_helper->fbdev->screen_buffer + offset; + void *dst = fb_helper->buffer->vaddr + offset; + size_t len = (clip->x2 - clip->x1) * cpp; + unsigned int y; + + for (y = clip->y1; y < clip->y2; y++) { + memcpy(dst, src, len); + src += fb->pitches[0]; + dst += fb->pitches[0]; + } +} + static void drm_fb_helper_dirty_work(struct work_struct *work) { struct drm_fb_helper *helper = container_of(work, struct drm_fb_helper, @@ -760,8 +779,11 @@ static void drm_fb_helper_dirty_work(struct work_struct *work) spin_unlock_irqrestore(&helper->dirty_lock, flags); /* call dirty callback only when it has been really touched */ - if (clip_copy.x1 < clip_copy.x2 && clip_copy.y1 < clip_copy.y2) + if (clip_copy.x1 < clip_copy.x2 && clip_copy.y1 < clip_copy.y2) { + if (helper->buffer) /* Generic fbdev uses a shadow buffer */ + drm_fb_helper_dirty_blit_real(helper, &clip_copy); helper->fb->funcs->dirty(helper->fb, NULL, 0, 0, &clip_copy, 1); + } } /** @@ -2928,6 +2950,191 @@ void drm_fb_helper_output_poll_changed(struct drm_device *dev) } EXPORT_SYMBOL(drm_fb_helper_output_poll_changed); +/* @user: 1=userspace, 0=fbcon */ +static int drm_fbdev_fb_open(struct fb_info *info, int user) +{ + struct drm_fb_helper *fb_helper = info->par; + + if (!try_module_get(fb_helper->dev->driver->fops->owner)) + return -ENODEV; + + return 0; +} + +static int drm_fbdev_fb_release(struct fb_info *info, int user) +{ + struct drm_fb_helper *fb_helper = info->par; + + module_put(fb_helper->dev->driver->fops->owner); + + return 0; +} + +/* + * FIXME: + * Merge this into drm_fbdev_generic_client_release() when all CMA drivers have + * been moved over to using drm_fbdev_generic_setup(). + */ +static void drm_fbdev_generic_client_release_do(struct drm_client_dev *client) +{ + struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); + struct fb_info *fbi = fb_helper->fbdev; + bool defio = fbi->fbdefio; + struct fb_ops *fbops; + void *shadow; + + if (defio) { + fb_deferred_io_cleanup(fbi); + fbops = fbi->fbops; + shadow = fbi->screen_buffer; + } + + drm_fb_helper_fini(fb_helper); + + if (defio) { + kfree(fbops); + vfree(shadow); + } + + drm_client_framebuffer_delete(fb_helper->buffer); +} + +/* + * fb_ops.fb_destroy is called by the last put_fb_info() call at the end of + * unregister_framebuffer() or fb_release(). + */ +static void drm_fbdev_fb_destroy(struct fb_info *info) +{ + struct drm_fb_helper *fb_helper = info->par; + + /* +* FIXME: +* Remove this when all CMA drivers have been moved over to using +* drm_fbdev_generic_setup(). +*/ + drm_fbdev_generic_client_release_do(&fb_helper->client); + + drm_client_put(&fb_helper->client); +} + +static int drm_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) +{ + struct drm_fb_helper *fb_helper = info->par; + + if (fb_helper->dev->driver->gem_prime_mmap) + return fb_helper->dev->driver->gem_prime_mmap(fb_helper->buffer->gem, vma); + else +
[Intel-gfx] [PATCH v2 06/12] drm/pl111: Set .gem_prime_vmap and .gem_prime_mmap
These are needed for pl111 to use the generic fbdev emulation. Cc: Eric Anholt Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt --- drivers/gpu/drm/pl111/pl111_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index 454ff0804642..78854b52676c 100644 --- a/drivers/gpu/drm/pl111/pl111_drv.c +++ b/drivers/gpu/drm/pl111/pl111_drv.c @@ -249,6 +249,8 @@ static struct drm_driver pl111_drm_driver = { .gem_prime_import_sg_table = pl111_gem_import_sg_table, .gem_prime_export = drm_gem_prime_export, .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table, + .gem_prime_mmap = drm_gem_cma_prime_mmap, + .gem_prime_vmap = drm_gem_cma_prime_vmap, #if defined(CONFIG_DEBUG_FS) .debugfs_init = pl111_debugfs_init, -- 2.15.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 07/12] drm/cma-helper: Use the generic fbdev emulation
This switches the CMA helper drivers that use its fbdev emulation over to the generic fbdev emulation. It's the first phase of using generic fbdev. A later phase will use DRM client callbacks for the lastclose/hotplug/remove callbacks. There are currently 2 fbdev init/fini functions: - drm_fb_cma_fbdev_init/drm_fb_cma_fbdev_fini - drm_fbdev_cma_init/drm_fbdev_cma_fini This is because the work on generic fbdev came up during a fbdev refactoring and thus wasn't completed. No point in completing that refactoring when drivers will soon move to drm_fb_helper_generic_probe(). tinydrm uses drm_fb_cma_fbdev_init_with_funcs(). Cc: Laurent Pinchart Signed-off-by: Noralf Trønnes Acked-by: Daniel Vetter --- drivers/gpu/drm/drm_fb_cma_helper.c | 361 +--- include/drm/drm_fb_cma_helper.h | 3 - 2 files changed, 43 insertions(+), 321 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c index 186d00adfb5f..dbd1933160d1 100644 --- a/drivers/gpu/drm/drm_fb_cma_helper.c +++ b/drivers/gpu/drm/drm_fb_cma_helper.c @@ -18,6 +18,7 @@ */ #include +#include #include #include #include @@ -26,11 +27,8 @@ #include #include -#define DEFAULT_FBDEFIO_DELAY_MS 50 - struct drm_fbdev_cma { struct drm_fb_helperfb_helper; - const struct drm_framebuffer_funcs *fb_funcs; }; /** @@ -44,36 +42,6 @@ struct drm_fbdev_cma { * * An fbdev framebuffer backed by cma is also available by calling * drm_fb_cma_fbdev_init(). drm_fb_cma_fbdev_fini() tears it down. - * If the &drm_framebuffer_funcs.dirty callback is set, fb_deferred_io will be - * set up automatically. &drm_framebuffer_funcs.dirty is called by - * drm_fb_helper_deferred_io() in process context (&struct delayed_work). - * - * Example fbdev deferred io code:: - * - * static int driver_fb_dirty(struct drm_framebuffer *fb, - *struct drm_file *file_priv, - *unsigned flags, unsigned color, - *struct drm_clip_rect *clips, - *unsigned num_clips) - * { - * struct drm_gem_cma_object *cma = drm_fb_cma_get_gem_obj(fb, 0); - * ... push changes ... - * return 0; - * } - * - * static struct drm_framebuffer_funcs driver_fb_funcs = { - * .destroy = drm_gem_fb_destroy, - * .create_handle = drm_gem_fb_create_handle, - * .dirty = driver_fb_dirty, - * }; - * - * Initialize:: - * - * fbdev = drm_fb_cma_fbdev_init_with_funcs(dev, 16, - * dev->mode_config.num_crtc, - * dev->mode_config.num_connector, - * &driver_fb_funcs); - * */ static inline struct drm_fbdev_cma *to_fbdev_cma(struct drm_fb_helper *helper) @@ -131,153 +99,6 @@ dma_addr_t drm_fb_cma_get_gem_addr(struct drm_framebuffer *fb, } EXPORT_SYMBOL_GPL(drm_fb_cma_get_gem_addr); -static int drm_fb_cma_mmap(struct fb_info *info, struct vm_area_struct *vma) -{ - return dma_mmap_writecombine(info->device, vma, info->screen_base, -info->fix.smem_start, info->fix.smem_len); -} - -static struct fb_ops drm_fbdev_cma_ops = { - .owner = THIS_MODULE, - DRM_FB_HELPER_DEFAULT_OPS, - .fb_fillrect= drm_fb_helper_sys_fillrect, - .fb_copyarea= drm_fb_helper_sys_copyarea, - .fb_imageblit = drm_fb_helper_sys_imageblit, - .fb_mmap= drm_fb_cma_mmap, -}; - -static int drm_fbdev_cma_deferred_io_mmap(struct fb_info *info, - struct vm_area_struct *vma) -{ - fb_deferred_io_mmap(info, vma); - vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); - - return 0; -} - -static int drm_fbdev_cma_defio_init(struct fb_info *fbi, - struct drm_gem_cma_object *cma_obj) -{ - struct fb_deferred_io *fbdefio; - struct fb_ops *fbops; - - /* -* Per device structures are needed because: -* fbops: fb_deferred_io_cleanup() clears fbops.fb_mmap -* fbdefio: individual delays -*/ - fbdefio = kzalloc(sizeof(*fbdefio), GFP_KERNEL); - fbops = kzalloc(sizeof(*fbops), GFP_KERNEL); - if (!fbdefio || !fbops) { - kfree(fbdefio); - kfree(fbops); - return -ENOMEM; - } - - /* can't be offset from vaddr since dirty() uses cma_obj */ - fbi->screen_buffer = cma_obj->vaddr; - /* fb_deferred_io_fault() needs a physical address */ - fbi->fix.smem_start = page_to_phys(virt_to_page(fbi->screen_buffer)); - - *fbops = *fbi->fbops; - fbi->fbops = fbops; - - fbdefio->delay = msecs_to_jiffies(DEFAULT_FBDEFIO_DELAY_MS); - fbdefio->deferred_io = drm_fb_helper_deferred_io; - fbi->fbdef
[Intel-gfx] [PATCH v2 10/12] drm/fb-helper: Finish the generic fbdev emulation
This adds a drm_fbdev_generic_setup() function that sets up generic fbdev emulation with client callbacks for lastclose, hotplug and remove/unregister. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 123 +++- include/drm/drm_fb_helper.h | 7 +++ 2 files changed, 129 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index be6bab889f1b..de98d6217864 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -67,6 +67,9 @@ static DEFINE_MUTEX(kernel_fb_helper_lock); * helper functions used by many drivers to implement the kernel mode setting * interfaces. * + * Drivers that support a dumb buffer with a virtual address and mmap support, + * should try out the generic fbdev emulation using drm_fbdev_generic_setup(). + * * Setup fbdev emulation by calling drm_fb_helper_fbdev_setup() and tear it * down by calling drm_fb_helper_fbdev_teardown(). * @@ -3012,7 +3015,8 @@ static void drm_fbdev_fb_destroy(struct fb_info *info) * Remove this when all CMA drivers have been moved over to using * drm_fbdev_generic_setup(). */ - drm_fbdev_generic_client_release_do(&fb_helper->client); + if (!fb_helper->client.funcs) + drm_fbdev_generic_client_release_do(&fb_helper->client); drm_client_put(&fb_helper->client); } @@ -3135,6 +3139,123 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, } EXPORT_SYMBOL(drm_fb_helper_generic_probe); +static const struct drm_fb_helper_funcs drm_fb_helper_generic_funcs = { + .fb_probe = drm_fb_helper_generic_probe, +}; + +static void drm_fbdev_generic_client_release(struct drm_client_dev *client) +{ + struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); + + /* Check if drm_fb_helper_fbdev_setup() has been run */ + if (fb_helper->dev) + drm_fbdev_generic_client_release_do(client); + drm_client_close(client); + kfree(fb_helper); +} + +static void drm_fbdev_client_unregister(struct drm_client_dev *client) +{ + struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); + + if (fb_helper->fbdev) + drm_fb_helper_unregister_fbi(fb_helper); + else + drm_client_put(client); +} + +static int drm_fbdev_client_restore(struct drm_client_dev *client) +{ + struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); + + drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper); + + return 0; +} + +static int drm_fbdev_client_hotplug(struct drm_client_dev *client) +{ + struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); + struct drm_device *dev = client->dev; + int ret; + + /* If drm_fb_helper_fbdev_setup() failed, we only try once */ + if (!fb_helper->dev && fb_helper->funcs) + return 0; + + if (dev->fb_helper) + return drm_fb_helper_hotplug_event(dev->fb_helper); + + if (!dev->mode_config.num_connector) + return 0; + + ret = drm_fb_helper_fbdev_setup(dev, fb_helper, &drm_fb_helper_generic_funcs, + fb_helper->preferred_bpp, 0); + if (ret) { + fb_helper->dev = NULL; + fb_helper->fbdev = NULL; + return ret; + } + + return 0; +} + +static const struct drm_client_funcs drm_fbdev_client_funcs = { + .release= drm_fbdev_generic_client_release, + .unregister = drm_fbdev_client_unregister, + .restore= drm_fbdev_client_restore, + .hotplug= drm_fbdev_client_hotplug, +}; + +/** + * drm_fb_helper_generic_fbdev_setup() - Setup generic fbdev emulation + * @dev: DRM device + * @preferred_bpp: Preferred bits per pixel for the device. + * @dev->mode_config.preferred_depth is used if this is zero. + * + * This function sets up generic fbdev emulation for drivers that supports + * dumb buffers with a virtual address and that can be mmap'ed. + * + * Restore, hotplug events and teardown are all taken care of. Drivers that do + * suspend/resume need to call drm_fb_helper_set_suspend_unlocked() themselves. + * Simple drivers might use drm_mode_config_helper_suspend(). + * + * Drivers that set the dirty callback on their framebuffer will get a shadow + * fbdev buffer that is blitted onto the real buffer. This is done in order to + * make deferred I/O work with all kinds of buffers. + * + * This function is safe to call even when there are no connectors present. + * Setup will be retried on the next hotplug event. + * + * Returns: + * Zero on success or negative error code on failure. + */ +int drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp) +{ + struct drm_fb_helper *fb_helper; + int ret; + + if (!drm_fbdev_emulation) + ret
[Intel-gfx] [PATCH v2 12/12] drm/cma-helper: Remove drm_fb_cma_fbdev_init_with_funcs()
Remove drm_fb_cma_fbdev_init_with_funcs(), its only user tinydrm has moved to drm_fbdev_generic_setup(). Cc: Laurent Pinchart Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_cma_helper.c | 21 - include/drm/drm_fb_cma_helper.h | 3 --- 2 files changed, 24 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c index 31831a7a6a99..63e5a0106211 100644 --- a/drivers/gpu/drm/drm_fb_cma_helper.c +++ b/drivers/gpu/drm/drm_fb_cma_helper.c @@ -99,27 +99,6 @@ dma_addr_t drm_fb_cma_get_gem_addr(struct drm_framebuffer *fb, } EXPORT_SYMBOL_GPL(drm_fb_cma_get_gem_addr); -/** - * drm_fb_cma_fbdev_init_with_funcs() - Allocate and initialize fbdev emulation - * @dev: DRM device - * @preferred_bpp: Preferred bits per pixel for the device. - * @dev->mode_config.preferred_depth is used if this is zero. - * @max_conn_count: Maximum number of connectors. - * @dev->mode_config.num_connector is used if this is zero. - * @funcs: Framebuffer functions, in particular a custom dirty() callback. - * Can be NULL. - * - * Returns: - * Zero on success or negative error code on failure. - */ -int drm_fb_cma_fbdev_init_with_funcs(struct drm_device *dev, - unsigned int preferred_bpp, unsigned int max_conn_count, - const struct drm_framebuffer_funcs *funcs) -{ - return drm_fb_cma_fbdev_init(dev, preferred_bpp, max_conn_count); -} -EXPORT_SYMBOL_GPL(drm_fb_cma_fbdev_init_with_funcs); - /** * drm_fb_cma_fbdev_init() - Allocate and initialize fbdev emulation * @dev: DRM device diff --git a/include/drm/drm_fb_cma_helper.h b/include/drm/drm_fb_cma_helper.h index a0546c3451f9..96e26e3b9a0c 100644 --- a/include/drm/drm_fb_cma_helper.h +++ b/include/drm/drm_fb_cma_helper.h @@ -16,9 +16,6 @@ struct drm_mode_fb_cmd2; struct drm_plane; struct drm_plane_state; -int drm_fb_cma_fbdev_init_with_funcs(struct drm_device *dev, - unsigned int preferred_bpp, unsigned int max_conn_count, - const struct drm_framebuffer_funcs *funcs); int drm_fb_cma_fbdev_init(struct drm_device *dev, unsigned int preferred_bpp, unsigned int max_conn_count); void drm_fb_cma_fbdev_fini(struct drm_device *dev); -- 2.15.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 11/12] drm/tinydrm: Use drm_fbdev_generic_setup()
Make full use of the generic fbdev client. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 3 +-- drivers/gpu/drm/tinydrm/ili9225.c | 1 - drivers/gpu/drm/tinydrm/mi0283qt.c | 1 - drivers/gpu/drm/tinydrm/st7586.c| 1 - drivers/gpu/drm/tinydrm/st7735r.c | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c index 24a33bf862fa..19c7f70adfa5 100644 --- a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c @@ -204,7 +204,7 @@ static int tinydrm_register(struct tinydrm_device *tdev) if (ret) return ret; - ret = drm_fb_cma_fbdev_init_with_funcs(drm, 0, 0, tdev->fb_funcs); + ret = drm_fbdev_generic_setup(drm, 0); if (ret) DRM_ERROR("Failed to initialize fbdev: %d\n", ret); @@ -214,7 +214,6 @@ static int tinydrm_register(struct tinydrm_device *tdev) static void tinydrm_unregister(struct tinydrm_device *tdev) { drm_atomic_helper_shutdown(tdev->drm); - drm_fb_cma_fbdev_fini(tdev->drm); drm_dev_unregister(tdev->drm); } diff --git a/drivers/gpu/drm/tinydrm/ili9225.c b/drivers/gpu/drm/tinydrm/ili9225.c index 841c69aba059..455fefe012f5 100644 --- a/drivers/gpu/drm/tinydrm/ili9225.c +++ b/drivers/gpu/drm/tinydrm/ili9225.c @@ -368,7 +368,6 @@ static struct drm_driver ili9225_driver = { DRIVER_ATOMIC, .fops = &ili9225_fops, TINYDRM_GEM_DRIVER_OPS, - .lastclose = drm_fb_helper_lastclose, .name = "ili9225", .desc = "Ilitek ILI9225", .date = "20171106", diff --git a/drivers/gpu/drm/tinydrm/mi0283qt.c b/drivers/gpu/drm/tinydrm/mi0283qt.c index 015d03f2acba..d7bb4c5e6657 100644 --- a/drivers/gpu/drm/tinydrm/mi0283qt.c +++ b/drivers/gpu/drm/tinydrm/mi0283qt.c @@ -154,7 +154,6 @@ static struct drm_driver mi0283qt_driver = { DRIVER_ATOMIC, .fops = &mi0283qt_fops, TINYDRM_GEM_DRIVER_OPS, - .lastclose = drm_fb_helper_lastclose, .debugfs_init = mipi_dbi_debugfs_init, .name = "mi0283qt", .desc = "Multi-Inno MI0283QT", diff --git a/drivers/gpu/drm/tinydrm/st7586.c b/drivers/gpu/drm/tinydrm/st7586.c index 5c29e3803ecb..2fcbc3067d71 100644 --- a/drivers/gpu/drm/tinydrm/st7586.c +++ b/drivers/gpu/drm/tinydrm/st7586.c @@ -304,7 +304,6 @@ static struct drm_driver st7586_driver = { DRIVER_ATOMIC, .fops = &st7586_fops, TINYDRM_GEM_DRIVER_OPS, - .lastclose = drm_fb_helper_lastclose, .debugfs_init = mipi_dbi_debugfs_init, .name = "st7586", .desc = "Sitronix ST7586", diff --git a/drivers/gpu/drm/tinydrm/st7735r.c b/drivers/gpu/drm/tinydrm/st7735r.c index 6c7b15c9da4f..3081bc57c116 100644 --- a/drivers/gpu/drm/tinydrm/st7735r.c +++ b/drivers/gpu/drm/tinydrm/st7735r.c @@ -120,7 +120,6 @@ static struct drm_driver st7735r_driver = { DRIVER_ATOMIC, .fops = &st7735r_fops, TINYDRM_GEM_DRIVER_OPS, - .lastclose = drm_fb_helper_lastclose, .debugfs_init = mipi_dbi_debugfs_init, .name = "st7735r", .desc = "Sitronix ST7735R", -- 2.15.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Replace {un/reference} with {put, get} functions
== Series Details == Series: drm/i915: Replace {un/reference} with {put, get} functions URL : https://patchwork.freedesktop.org/series/44932/ State : failure == Summary == = CI Bug Log - changes from CI_DRM_4333_full -> Patchwork_9350_full = == Summary - FAILURE == Serious unknown changes coming with Patchwork_9350_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9350_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9350_full: === Piglit changes === Possible regressions spec@glsl-1.20@execution@tex-miplevel-selection gl2:textureproj(bias) 2d_projvec4: pig-skl-6260u: NOTRUN -> FAIL == Known issues == Here are the changes found in Patchwork_9350_full that come from known issues: === IGT changes === Issues hit igt@drv_selftest@live_hangcheck: shard-kbl: PASS -> DMESG-FAIL (fdo#106947) igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic: shard-glk: PASS -> FAIL (fdo#106509, fdo#105454) igt@kms_flip@2x-flip-vs-expired-vblank-interruptible: shard-glk: PASS -> FAIL (fdo#105363) igt@kms_flip@busy-flip: shard-hsw: PASS -> DMESG-WARN (fdo#102614) Possible fixes igt@kms_cursor_legacy@cursora-vs-flipa-toggle: shard-glk: DMESG-WARN (fdo#105763) -> PASS igt@kms_flip@modeset-vs-vblank-race: shard-hsw: FAIL (fdo#103060) -> PASS igt@kms_flip@plain-flip-fb-recreate-interruptible: shard-glk: FAIL (fdo#100368) -> PASS +1 igt@kms_flip_tiling@flip-to-y-tiled: shard-glk: FAIL (fdo#104724) -> PASS +1 igt@kms_flip_tiling@flip-x-tiled: shard-glk: FAIL (fdo#104724, fdo#103822) -> PASS igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a: shard-kbl: INCOMPLETE (fdo#103665) -> PASS igt@kms_setmode@basic: shard-hsw: FAIL (fdo#99912) -> PASS igt@perf@blocking: shard-hsw: FAIL (fdo#102252) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252 fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614 fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060 fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665 fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822 fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724 fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363 fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454 fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763 fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509 fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947 fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912 == Participating hosts (5 -> 6) == Additional (1): pig-skl-6260u == Build changes == * Linux: CI_DRM_4333 -> Patchwork_9350 CI_DRM_4333: 5fad115a81a20aa6b4ffd3f7f6663d43c88fa395 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9350: f576ff5cb564ee2fdcb2c688a5d37f486d0d418f @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9350/shards.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Add generic fbdev emulation
== Series Details == Series: drm: Add generic fbdev emulation URL : https://patchwork.freedesktop.org/series/44952/ State : warning == Summary == $ dim checkpatch origin/drm-tip 59e39279c0f6 drm: provide management functions for drm_file edfcad58ba6d drm/file: Don't set master on in-kernel clients b60d5cacea01 drm: Make ioctls available for in-kernel clients 58174cc2f73a drm: Begin an API for in-kernel clients -:26: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #26: new file mode 100644 -:31: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #31: FILE: Documentation/gpu/drm-client.rst:1: += total: 0 errors, 2 warnings, 0 checks, 450 lines checked 31fdd3b6e524 drm/fb-helper: Add generic fbdev emulation .fb_probe function 2cb53d805040 drm/pl111: Set .gem_prime_vmap and .gem_prime_mmap 6987226752e9 drm/cma-helper: Use the generic fbdev emulation -:359: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #359: FILE: drivers/gpu/drm/drm_fb_cma_helper.c:172: +struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev, + unsigned int preferred_bpp, unsigned int max_conn_count) total: 0 errors, 0 warnings, 1 checks, 426 lines checked 1b2f56748578 drm/client: Add client callbacks b41445462f13 drm/debugfs: Add internal client debugfs file 520a6c2e290e drm/fb-helper: Finish the generic fbdev emulation 4cab6cf795bb drm/tinydrm: Use drm_fbdev_generic_setup() 9f2ddc3cbcc0 drm/cma-helper: Remove drm_fb_cma_fbdev_init_with_funcs() ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm: Add generic fbdev emulation
== Series Details == Series: drm: Add generic fbdev emulation URL : https://patchwork.freedesktop.org/series/44952/ State : warning == Summary == $ dim sparse origin/drm-tip Commit: drm: provide management functions for drm_file Okay! Commit: drm/file: Don't set master on in-kernel clients Okay! Commit: drm: Make ioctls available for in-kernel clients Okay! Commit: drm: Begin an API for in-kernel clients Okay! Commit: drm/fb-helper: Add generic fbdev emulation .fb_probe function + ^~~~ + ^ +^~ + ^ +drivers/gpu/drm/drm_fb_helper.c:1005:20: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1005:20: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1006:20: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1006:20: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1007:20: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1007:20: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1008:20: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:1008:20: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1005:20: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1005:20: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1006:20: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1006:20: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1007:20: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1007:20: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1008:20: warning: expression using sizeof(void) -drivers/gpu/drm/drm_fb_helper.c:1008:20: warning: expression using sizeof(void) +drivers/gpu/drm/drm_fb_helper.c:2976:17: note: ‘fbops’ was declared here +drivers/gpu/drm/drm_fb_helper.c:2977:8: note: ‘shadow’ was declared here +drivers/gpu/drm/drm_fb_helper.c:2988:3: warning: ‘fbops’ may be used uninitialized in this function [-Wmaybe-uninitialized] +drivers/gpu/drm/drm_fb_helper.c:2989:3: warning: ‘shadow’ may be used uninitialized in this function [-Wmaybe-uninitialized] +drivers/gpu/drm/drm_fb_helper.c: In function ‘drm_fbdev_fb_destroy’: + kfree(fbops); + struct fb_ops *fbops; + vfree(shadow); + void *shadow; Commit: drm/pl111: Set .gem_prime_vmap and .gem_prime_mmap Okay! Commit: drm/cma-helper: Use the generic fbdev emulation Okay! Commit: drm/client: Add client callbacks Okay! Commit: drm/debugfs: Add internal client debugfs file Okay! Commit: drm/fb-helper: Finish the generic fbdev emulation -^~ - ^ -drivers/gpu/drm/drm_fb_helper.c:2979:17: note: ‘fbops’ was declared here -drivers/gpu/drm/drm_fb_helper.c:2980:8: note: ‘shadow’ was declared here -drivers/gpu/drm/drm_fb_helper.c: In function ‘drm_fbdev_fb_destroy’: +drivers/gpu/drm/drm_fb_helper.c: In function ‘drm_fbdev_generic_client_release_do’: - struct fb_ops *fbops; - void *shadow; Commit: drm/tinydrm: Use drm_fbdev_generic_setup() Okay! Commit: drm/cma-helper: Remove drm_fb_cma_fbdev_init_with_funcs() Okay! ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm: Add generic fbdev emulation
== Series Details == Series: drm: Add generic fbdev emulation URL : https://patchwork.freedesktop.org/series/44952/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4336 -> Patchwork_9353 = == Summary - WARNING == Minor unknown changes coming with Patchwork_9353 need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9353, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/44952/revisions/1/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9353: === IGT changes === Warnings igt@gem_exec_gttfill@basic: fi-pnv-d510:PASS -> SKIP == Known issues == Here are the changes found in Patchwork_9353 that come from known issues: === IGT changes === Issues hit igt@gem_ctx_create@basic-files: fi-kbl-guc: PASS -> DMESG-WARN (fdo#106954) Possible fixes igt@gem_exec_gttfill@basic: fi-byt-n2820: FAIL (fdo#106744) -> PASS igt@kms_flip@basic-flip-vs-dpms: fi-glk-j4005: DMESG-WARN (fdo#106000, fdo#106097) -> PASS igt@kms_frontbuffer_tracking@basic: fi-hsw-peppy: DMESG-FAIL (fdo#106103, fdo#102614) -> PASS igt@kms_pipe_crc_basic@read-crc-pipe-c: fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097 fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103 fdo#106744 https://bugs.freedesktop.org/show_bug.cgi?id=106744 fdo#106954 https://bugs.freedesktop.org/show_bug.cgi?id=106954 == Participating hosts (43 -> 38) == Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u == Build changes == * Linux: CI_DRM_4336 -> Patchwork_9353 CI_DRM_4336: 0f050838b4270d3ebed75ece1eefc394c8c1d93d @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9353: 9f2ddc3cbcc079228253ae47683cd97ab4eb3ecf @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 9f2ddc3cbcc0 drm/cma-helper: Remove drm_fb_cma_fbdev_init_with_funcs() 4cab6cf795bb drm/tinydrm: Use drm_fbdev_generic_setup() 520a6c2e290e drm/fb-helper: Finish the generic fbdev emulation b41445462f13 drm/debugfs: Add internal client debugfs file 1b2f56748578 drm/client: Add client callbacks 6987226752e9 drm/cma-helper: Use the generic fbdev emulation 2cb53d805040 drm/pl111: Set .gem_prime_vmap and .gem_prime_mmap 31fdd3b6e524 drm/fb-helper: Add generic fbdev emulation .fb_probe function 58174cc2f73a drm: Begin an API for in-kernel clients b60d5cacea01 drm: Make ioctls available for in-kernel clients edfcad58ba6d drm/file: Don't set master on in-kernel clients 59e39279c0f6 drm: provide management functions for drm_file == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9353/issues.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] i915: remove timespec_to_jiffies_timeout
This function has been unused since commit 5ed0bdf21a85 ("drm: i915: Use nsec based interfaces"). Let's remove the definition as well now to help get rid of all uses of 'timespec'. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/i915/i915_drv.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 34c125e2d90c..5f61676e8fb8 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -3673,14 +3673,6 @@ static inline unsigned long nsecs_to_jiffies_timeout(const u64 n) return min_t(u64, MAX_JIFFY_OFFSET, nsecs_to_jiffies64(n) + 1); } -static inline unsigned long -timespec_to_jiffies_timeout(const struct timespec *value) -{ - unsigned long j = timespec_to_jiffies(value); - - return min_t(unsigned long, MAX_JIFFY_OFFSET, j + 1); -} - /* * If you need to wait X milliseconds between events A and B, but event B * doesn't happen exactly after event A, you record the timestamp (jiffies) of -- 2.9.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 1/2] drm/i915/uc: Fetch GuC/HuC firmwares from guc/huc specific init
On 06/18/2018 03:39 AM, Michal Wajdeczko wrote: We're fetching GuC/HuC firmwares directly from uc level during init_early stage but this breaks guc/huc struct isolation and also strict SW-only initialization rule. Move fw fetching to init phase and do it separately per guc/huc struct. v2: don't forget to move wopcm_init - Michele I'm not Italian ;) Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Michel Thierry --- drivers/gpu/drm/i915/i915_gem.c | 8 drivers/gpu/drm/i915/intel_guc.c | 7 ++- drivers/gpu/drm/i915/intel_huc.c | 8 drivers/gpu/drm/i915/intel_huc.h | 6 ++ drivers/gpu/drm/i915/intel_uc.c | 37 - 5 files changed, 44 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 822abf4..6a0fa53 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -5456,10 +5456,6 @@ int i915_gem_init(struct drm_i915_private *dev_priv) if (ret) return ret; - ret = intel_wopcm_init(&dev_priv->wopcm); - if (ret) - return ret; - ret = intel_uc_init_misc(dev_priv); if (ret) return ret; @@ -5497,6 +5493,10 @@ int i915_gem_init(struct drm_i915_private *dev_priv) Not visible, but the previous line before this chunk is ret = intel_uc_init(dev_priv); if (ret) goto err_pm; + ret = intel_wopcm_init(&dev_priv->wopcm); + if (ret) + goto err_uc_init; + ret = i915_gem_init_hw(dev_priv); if (ret) goto err_uc_init; So, Reviewed-by: Michel Thierry diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c index 1aff30b..a63a86f 100644 --- a/drivers/gpu/drm/i915/intel_guc.c +++ b/drivers/gpu/drm/i915/intel_guc.c @@ -167,9 +167,11 @@ int intel_guc_init(struct intel_guc *guc) struct drm_i915_private *dev_priv = guc_to_i915(guc); int ret; + intel_uc_fw_fetch(dev_priv, &guc->fw); + ret = guc_shared_data_create(guc); if (ret) - return ret; + goto err_fetch; GEM_BUG_ON(!guc->shared_data); ret = intel_guc_log_create(&guc->log); @@ -190,6 +192,8 @@ int intel_guc_init(struct intel_guc *guc) intel_guc_log_destroy(&guc->log); err_shared: guc_shared_data_destroy(guc); +err_fetch: + intel_uc_fw_fini(&guc->fw); return ret; } @@ -201,6 +205,7 @@ void intel_guc_fini(struct intel_guc *guc) intel_guc_ads_destroy(guc); intel_guc_log_destroy(&guc->log); guc_shared_data_destroy(guc); + intel_uc_fw_fini(&guc->fw); } static u32 guc_ctl_debug_flags(struct intel_guc *guc) diff --git a/drivers/gpu/drm/i915/intel_huc.c b/drivers/gpu/drm/i915/intel_huc.c index 2912852..8a884d7 100644 --- a/drivers/gpu/drm/i915/intel_huc.c +++ b/drivers/gpu/drm/i915/intel_huc.c @@ -32,6 +32,14 @@ void intel_huc_init_early(struct intel_huc *huc) intel_huc_fw_init_early(huc); } +int intel_huc_init(struct intel_huc *huc) +{ + struct drm_i915_private *i915 = huc_to_i915(huc); + + intel_uc_fw_fetch(i915, &huc->fw); + return 0; +} + /** * intel_huc_auth() - Authenticate HuC uCode * @huc: intel_huc structure diff --git a/drivers/gpu/drm/i915/intel_huc.h b/drivers/gpu/drm/i915/intel_huc.h index aa85490..21e600c 100644 --- a/drivers/gpu/drm/i915/intel_huc.h +++ b/drivers/gpu/drm/i915/intel_huc.h @@ -36,9 +36,15 @@ struct intel_huc { }; void intel_huc_init_early(struct intel_huc *huc); +int intel_huc_init(struct intel_huc *huc); int intel_huc_auth(struct intel_huc *huc); int intel_huc_check_status(struct intel_huc *huc); +static inline void intel_huc_fini(struct intel_huc *huc) +{ + intel_uc_fw_fini(&huc->fw); +} + static inline int intel_huc_sanitize(struct intel_huc *huc) { intel_uc_fw_sanitize(&huc->fw); diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c index 94e8863..ec3c37c 100644 --- a/drivers/gpu/drm/i915/intel_uc.c +++ b/drivers/gpu/drm/i915/intel_uc.c @@ -171,24 +171,11 @@ void intel_uc_init_early(struct drm_i915_private *i915) intel_huc_init_early(huc); sanitize_options_early(i915); - - if (USES_GUC(i915)) - intel_uc_fw_fetch(i915, &guc->fw); - - if (USES_HUC(i915)) - intel_uc_fw_fetch(i915, &huc->fw); } void intel_uc_cleanup_early(struct drm_i915_private *i915) { struct intel_guc *guc = &i915->guc; - struct intel_huc *huc = &i915->huc; - - if (USES_HUC(i915)) - intel_uc_fw_fini(&huc->fw); - - if (USES_GUC(i915)) - intel_uc_fw_fini(&guc->fw); guc_free_load_err_log(guc); } @@ -279,6 +266,7 @@ void intel_uc_fini_misc(struct drm_i915_private *i915) int intel_uc_init(struct drm_
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for i915: remove timespec_to_jiffies_timeout
== Series Details == Series: i915: remove timespec_to_jiffies_timeout URL : https://patchwork.freedesktop.org/series/44965/ State : warning == Summary == $ dim sparse origin/drm-tip Commit: i915: remove timespec_to_jiffies_timeout -O:drivers/gpu/drm/i915/i915_drv.h:3700:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/i915_drv.h:3700:16: warning: expression using sizeof(void) ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/3] drm/i915: Print prop name/id when rejecting it
On Mon, Jun 18, 2018 at 03:03:39PM +0300, Ville Syrjälä wrote: > On Mon, Jun 18, 2018 at 10:53:13AM +0200, Daniel Vetter wrote: > > On Mon, Jun 11, 2018 at 10:34:03PM +0300, Ville Syrjala wrote: > > > From: Ville Syrjälä > > > > > > Use the '[PROP:id:name]' format I introduced for the core in the driver > > > debug messages as well. > > > > > > Signed-off-by: Ville Syrjälä > > > > Reviewed-by: Daniel Vetter > > > > I'm wondering whether there's not some kind of macro magic we could do, > > but unfortunately printf style stuff is really not composable :-/ And our > > stuff isn't important enough to warant new %p modes either ... > > I should have DRM_PLANE_FMT, DRM_PLANE_ARGS(), etc. in some branch. > Never posted that stuff because I wasn't entirely convinced it's > all that useful. Opinions? Yeah, not sure that's better either ... and doing a %s with a drm_format_$obj() gives us massive headaches with leaking strings everywhere :-) Maybe we should just have an $obj->debug_str field that we file out when creating the object? Also not awesome, but about the best I can come up with. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] i915: remove timespec_to_jiffies_timeout
On Mon, Jun 18, 2018 at 05:38:43PM +0200, Arnd Bergmann wrote: > This function has been unused since commit 5ed0bdf21a85 ("drm: i915: > Use nsec based interfaces"). Let's remove the definition as well now > to help get rid of all uses of 'timespec'. > > Signed-off-by: Arnd Bergmann Applied, thanks for the patch. -Daniel > --- > drivers/gpu/drm/i915/i915_drv.h | 8 > 1 file changed, 8 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index 34c125e2d90c..5f61676e8fb8 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -3673,14 +3673,6 @@ static inline unsigned long > nsecs_to_jiffies_timeout(const u64 n) > return min_t(u64, MAX_JIFFY_OFFSET, nsecs_to_jiffies64(n) + 1); > } > > -static inline unsigned long > -timespec_to_jiffies_timeout(const struct timespec *value) > -{ > - unsigned long j = timespec_to_jiffies(value); > - > - return min_t(unsigned long, MAX_JIFFY_OFFSET, j + 1); > -} > - > /* > * If you need to wait X milliseconds between events A and B, but event B > * doesn't happen exactly after event A, you record the timestamp (jiffies) > of > -- > 2.9.0 > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for i915: remove timespec_to_jiffies_timeout
== Series Details == Series: i915: remove timespec_to_jiffies_timeout URL : https://patchwork.freedesktop.org/series/44965/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4336 -> Patchwork_9354 = == Summary - WARNING == Minor unknown changes coming with Patchwork_9354 need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9354, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/44965/revisions/1/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9354: === IGT changes === Warnings igt@gem_exec_gttfill@basic: fi-pnv-d510:PASS -> SKIP == Known issues == Here are the changes found in Patchwork_9354 that come from known issues: === IGT changes === Issues hit igt@kms_flip@basic-flip-vs-wf_vblank: fi-glk-j4005: PASS -> FAIL (fdo#100368) Possible fixes igt@gem_exec_gttfill@basic: fi-byt-n2820: FAIL (fdo#106744) -> PASS igt@kms_flip@basic-flip-vs-dpms: fi-glk-j4005: DMESG-WARN (fdo#106097, fdo#106000) -> PASS igt@kms_frontbuffer_tracking@basic: fi-hsw-peppy: DMESG-FAIL (fdo#106103, fdo#102614) -> PASS igt@kms_pipe_crc_basic@read-crc-pipe-c: fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c: fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614 fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097 fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103 fdo#106744 https://bugs.freedesktop.org/show_bug.cgi?id=106744 == Participating hosts (43 -> 38) == Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u == Build changes == * Linux: CI_DRM_4336 -> Patchwork_9354 CI_DRM_4336: 0f050838b4270d3ebed75ece1eefc394c8c1d93d @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9354: 57467e03614a011815924a3b3e8f9e98eeccf610 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 57467e03614a i915: remove timespec_to_jiffies_timeout == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9354/issues.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [v2,1/2] drm/i915/guc: Print CTL params passed to Guc
== Series Details == Series: series starting with [v2,1/2] drm/i915/guc: Print CTL params passed to Guc URL : https://patchwork.freedesktop.org/series/44934/ State : failure == Summary == = CI Bug Log - changes from CI_DRM_4334_full -> Patchwork_9351_full = == Summary - FAILURE == Serious unknown changes coming with Patchwork_9351_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9351_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9351_full: === IGT changes === Possible regressions igt@drv_selftest@mock_contexts: shard-apl: PASS -> DMESG-FAIL +1 shard-kbl: PASS -> DMESG-FAIL shard-snb: PASS -> DMESG-FAIL shard-hsw: PASS -> DMESG-FAIL shard-glk: PASS -> DMESG-FAIL igt@gem_exec_capture@capture-render: shard-kbl: PASS -> DMESG-WARN +3 igt@pm_rpm@debugfs-read: shard-apl: PASS -> DMESG-WARN Warnings igt@drv_selftest@live_evict: shard-snb: PASS -> SKIP +13 igt@drv_selftest@live_execlists: shard-hsw: PASS -> SKIP +13 igt@drv_selftest@live_objects: shard-glk: PASS -> SKIP +11 igt@drv_selftest@live_requests: shard-kbl: PASS -> SKIP +19 igt@drv_selftest@live_workarounds: shard-apl: PASS -> SKIP +14 igt@gem_mocs_settings@mocs-rc6-blt: shard-kbl: SKIP -> PASS == Known issues == Here are the changes found in Patchwork_9351_full that come from known issues: === IGT changes === Issues hit igt@gem_eio@execbuf: shard-apl: PASS -> INCOMPLETE (fdo#103927) +1 igt@gem_exec_suspend@basic-s4-devices: shard-kbl: PASS -> DMESG-WARN (fdo#103558, fdo#105602, fdo#103313) igt@gem_wait@await-default: shard-snb: PASS -> INCOMPLETE (fdo#105411) igt@kms_flip@dpms-vs-vblank-race: shard-glk: PASS -> FAIL (fdo#103060) igt@kms_flip@flip-vs-panning-vs-hang: shard-snb: PASS -> DMESG-WARN (fdo#103821) igt@kms_flip_tiling@flip-to-y-tiled: shard-glk: PASS -> FAIL (fdo#104724, fdo#103822) igt@kms_vblank@pipe-c-wait-forked-hang: shard-kbl: PASS -> DMESG-WARN (fdo#103558, fdo#105602) +2 igt@prime_busy@wait-hang-vebox: shard-kbl: PASS -> INCOMPLETE (fdo#103665) +3 Possible fixes igt@drv_selftest@live_gtt: shard-glk: FAIL (fdo#105347) -> SKIP igt@drv_selftest@live_hangcheck: shard-glk: DMESG-FAIL (fdo#106947) -> SKIP igt@kms_flip@2x-plain-flip-ts-check-interruptible: shard-glk: FAIL (fdo#100368) -> PASS +1 fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060 fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313 fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558 fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665 fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821 fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822 fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927 fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724 fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347 fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411 fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602 fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * Linux: CI_DRM_4334 -> Patchwork_9351 CI_DRM_4334: e2635b9253c80ae63fcea5b3382351aa34e5f056 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9351: 35d1fdad52ec99775e0816dfefa8ac3456322672 @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9351/shards.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm: Try to fix encoder possible_clones/crtcs (rev2)
== Series Details == Series: drm: Try to fix encoder possible_clones/crtcs (rev2) URL : https://patchwork.freedesktop.org/series/44848/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4334_full -> Patchwork_9352_full = == Summary - WARNING == Minor unknown changes coming with Patchwork_9352_full need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9352_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9352_full: === IGT changes === Warnings igt@gem_mocs_settings@mocs-rc6-blt: shard-kbl: SKIP -> PASS == Known issues == Here are the changes found in Patchwork_9352_full that come from known issues: === IGT changes === Issues hit igt@drv_selftest@live_hangcheck: shard-kbl: PASS -> DMESG-FAIL (fdo#106947) igt@gem_wait@await-default: shard-snb: PASS -> INCOMPLETE (fdo#105411) igt@kms_flip_tiling@flip-to-y-tiled: shard-glk: PASS -> FAIL (fdo#104724) Possible fixes igt@drv_selftest@live_gtt: shard-glk: FAIL (fdo#105347) -> PASS igt@drv_selftest@live_hangcheck: shard-glk: DMESG-FAIL (fdo#106947) -> PASS igt@kms_flip@2x-plain-flip-ts-check-interruptible: shard-glk: FAIL (fdo#100368) -> PASS +2 igt@kms_flip_tiling@flip-x-tiled: shard-glk: FAIL (fdo#104724) -> PASS igt@kms_setmode@basic: shard-apl: FAIL (fdo#99912) -> PASS shard-kbl: FAIL (fdo#99912) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724 fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347 fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411 fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947 fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * Linux: CI_DRM_4334 -> Patchwork_9352 CI_DRM_4334: e2635b9253c80ae63fcea5b3382351aa34e5f056 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9352: 0674e5f40f9980a1a9042f70d454e0c97a7169b1 @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9352/shards.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH xf86-video-intel] sna: Replace the blt SYNC_COPY assert with a check
From: Ville Syrjälä My IVB hits the SYNC_COPY assert in prefer_blt_copy() when I force the use of the software cursor and I move the cursor on top of a dri2 window. Looks like any platform with sna_wait_for_scanline() implemented should be capable of tripping this assert. Let's just replace the assert with a check, which is what gen6 already does. IVB/HSW/BDW have sna_wait_for_scanline() so we'll have to change the gen7 and gen8 code at least. gen9+ doesn't have sna_wait_for_scanline() so in theory we could leave that one be, but I like consistency so let's change that one too. Signed-off-by: Ville Syrjälä --- src/sna/gen7_render.c | 5 +++-- src/sna/gen8_render.c | 5 +++-- src/sna/gen9_render.c | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 0a3bda768100..68002409a73d 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2957,11 +2957,12 @@ prefer_blt_copy(struct sna *sna, struct kgem_bo *dst_bo, unsigned flags) { + if (flags & COPY_SYNC) + return false; + if (sna->kgem.mode == KGEM_BLT) return true; - assert((flags & COPY_SYNC) == 0); - if (untiled_tlb_miss(src_bo) || untiled_tlb_miss(dst_bo)) return true; diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c index 69617da561b6..69c29bc6d901 100644 --- a/src/sna/gen8_render.c +++ b/src/sna/gen8_render.c @@ -2796,11 +2796,12 @@ prefer_blt_copy(struct sna *sna, struct kgem_bo *dst_bo, unsigned flags) { + if (flags & COPY_SYNC) + return false; + if (sna->kgem.mode == KGEM_BLT) return true; - assert((flags & COPY_SYNC) == 0); - if (untiled_tlb_miss(src_bo) || untiled_tlb_miss(dst_bo)) return true; diff --git a/src/sna/gen9_render.c b/src/sna/gen9_render.c index 505b98afa38c..b9622437897a 100644 --- a/src/sna/gen9_render.c +++ b/src/sna/gen9_render.c @@ -2859,11 +2859,12 @@ prefer_blt_copy(struct sna *sna, struct kgem_bo *dst_bo, unsigned flags) { + if (flags & COPY_SYNC) + return false; + if (sna->kgem.mode == KGEM_BLT) return true; - assert((flags & COPY_SYNC) == 0); - if (untiled_tlb_miss(src_bo) || untiled_tlb_miss(dst_bo)) return true; -- 2.16.4 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/2] x86/gpu: reserve ICL's graphics stolen memory
On Fri, Jun 01, 2018 at 02:44:51PM -0700, Paulo Zanoni wrote: > Em Seg, 2018-05-07 às 11:46 +0300, Joonas Lahtinen escreveu: > > Ingo, do you prefer to merge through our tree with your ack? > > Ping? > > > > > Quoting Paulo Zanoni (2018-05-04 23:32:51) > > > ICL changes the registers and addresses to 64 bits. > > > > > > I also briefly looked at implementing an u64 version of the PCI > > > config > > > read functions, but I concluded this wouldn't be trivial, so it's > > > not > > > worth doing it for a single user that can't have any racing > > > problems > > > while reading the register in two separate operations. > > > > > > v2: > > > - Scrub the development (non-public) changelog (Joonas). > > > - Remove the i915.ko bits so this can be easily backported in > > > order > > >to properly avoid stolen memory even on machines without i915.ko > > >(Joonas). > > > - CC stable for the reasons above. > > > > > > Issue: VIZ-9250 > > > > Fixes: 412310019a20 ("drm/i915/icl: Add initial Icelake > > definitions.") > > > > > CC: sta...@vger.kernel.org > > > > This should not be needed, it was introduced in v4.17-rc1 only. > > > > Reviewed-by: Joonas Lahtinen > > > > Regards, Joonas > > Cc: Thomas Gleixner > > > Cc: Ingo Molnar > > > Cc: H. Peter Anvin > > > Cc: x...@kernel.org guys, could we push this through drm-intel? ack? nack? comments? > > > Cc: Daniele Ceraolo Spurio > > > Cc: Joonas Lahtinen > > > Signed-off-by: Paulo Zanoni > > > --- > > > arch/x86/kernel/early-quirks.c | 18 ++ > > > include/drm/i915_drm.h | 4 +++- > > > 2 files changed, 21 insertions(+), 1 deletion(-) > > > > > > diff --git a/arch/x86/kernel/early-quirks.c > > > b/arch/x86/kernel/early-quirks.c > > > index bae0d32e327b..72c2cf961d44 100644 > > > --- a/arch/x86/kernel/early-quirks.c > > > +++ b/arch/x86/kernel/early-quirks.c > > > @@ -340,6 +340,18 @@ static resource_size_t __init > > > gen3_stolen_base(int num, int slot, int func, > > > return bsm & INTEL_BSM_MASK; > > > } > > > > > > +static resource_size_t __init gen11_stolen_base(int num, int slot, > > > int func, > > > + resource_size_t > > > stolen_size) > > > +{ > > > + u64 bsm; > > > + > > > + bsm = read_pci_config(num, slot, func, > > > INTEL_GEN11_BSM_DW0); > > > + bsm &= INTEL_BSM_MASK; > > > + bsm |= (u64)read_pci_config(num, slot, func, > > > INTEL_GEN11_BSM_DW1) << 32; > > > + > > > + return bsm; > > > +} > > > + > > > static resource_size_t __init i830_stolen_size(int num, int slot, > > > int func) > > > { > > > u16 gmch_ctrl; > > > @@ -500,6 +512,11 @@ static const struct intel_early_ops > > > chv_early_ops __initconst = { > > > .stolen_size = chv_stolen_size, > > > }; > > > > > > +static const struct intel_early_ops gen11_early_ops __initconst = > > > { > > > + .stolen_base = gen11_stolen_base, > > > + .stolen_size = gen9_stolen_size, > > > +}; > > > + > > > static const struct pci_device_id intel_early_ids[] __initconst = > > > { > > > INTEL_I830_IDS(&i830_early_ops), > > > INTEL_I845G_IDS(&i845_early_ops), > > > @@ -531,6 +548,7 @@ static const struct pci_device_id > > > intel_early_ids[] __initconst = { > > > INTEL_CFL_IDS(&gen9_early_ops), > > > INTEL_GLK_IDS(&gen9_early_ops), > > > INTEL_CNL_IDS(&gen9_early_ops), > > > + INTEL_ICL_11_IDS(&gen11_early_ops), > > > }; > > > > > > struct resource intel_graphics_stolen_res __ro_after_init = > > > DEFINE_RES_MEM(0, 0); > > > diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h > > > index c9e5a6621b95..c44703f471b3 100644 > > > --- a/include/drm/i915_drm.h > > > +++ b/include/drm/i915_drm.h > > > @@ -95,7 +95,9 @@ extern struct resource intel_graphics_stolen_res; > > > #defineI845_TSEG_SIZE_512K (2 << 1) > > > #defineI845_TSEG_SIZE_1M (3 << 1) > > > > > > -#define INTEL_BSM 0x5c > > > +#define INTEL_BSM 0x5c > > > +#define INTEL_GEN11_BSM_DW00xc0 > > > +#define INTEL_GEN11_BSM_DW10xc4 > > > #define INTEL_BSM_MASK (-(1u << 20)) > > > > > > #endif /* _I915_DRM_H_ */ > > > -- > > > 2.14.3 > > > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 1/2] drm/i915/whl: Introducing Whiskey Lake platform
On Thu, Jun 14, 2018 at 04:59:32PM -0700, Rodrigo Vivi wrote: > On Thu, Jun 14, 2018 at 04:37:19PM -0700, José Roberto de Souza wrote: > > Whiskey Lake uses the same gen graphics as Coffe Lake, including some > > ids that were previously marked as reserved on Coffe Lake, but that > > now are moved to WHL page. > > > > So, let's just move them to WHL macros that will feed into CFL macro > > just to keep it better organized to make easier future code review > > but it will be handled as a CFL. > > > > v2: > > Fixing GT level of some ids > > > > Cc: Rodrigo Vivi > > Signed-off-by: José Roberto de Souza > > Reviewed-by: Rodrigo Vivi pushed to dinq, thanks. > > > --- > > drivers/gpu/drm/i915/i915_pci.c | 4 +++- > > include/drm/i915_pciids.h | 28 ++-- > > 2 files changed, 21 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_pci.c > > b/drivers/gpu/drm/i915/i915_pci.c > > index 97a91e6af7e3..92e98773e53d 100644 > > --- a/drivers/gpu/drm/i915/i915_pci.c > > +++ b/drivers/gpu/drm/i915/i915_pci.c > > @@ -660,9 +660,11 @@ static const struct pci_device_id pciidlist[] = { > > INTEL_CFL_S_GT1_IDS(&intel_coffeelake_gt1_info), > > INTEL_CFL_S_GT2_IDS(&intel_coffeelake_gt2_info), > > INTEL_CFL_H_GT2_IDS(&intel_coffeelake_gt2_info), > > - INTEL_CFL_U_GT1_IDS(&intel_coffeelake_gt1_info), > > INTEL_CFL_U_GT2_IDS(&intel_coffeelake_gt2_info), > > INTEL_CFL_U_GT3_IDS(&intel_coffeelake_gt3_info), > > + INTEL_WHL_U_GT1_IDS(&intel_coffeelake_gt1_info), > > + INTEL_WHL_U_GT2_IDS(&intel_coffeelake_gt2_info), > > + INTEL_WHL_U_GT3_IDS(&intel_coffeelake_gt3_info), > > INTEL_CNL_IDS(&intel_cannonlake_info), > > INTEL_ICL_11_IDS(&intel_icelake_11_info), > > {0, 0, 0} > > diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h > > index bab70ff6e78b..d03350a38025 100644 > > --- a/include/drm/i915_pciids.h > > +++ b/include/drm/i915_pciids.h > > @@ -388,32 +388,40 @@ > > INTEL_VGA_DEVICE(0x3E9B, info), /* Halo GT2 */ \ > > INTEL_VGA_DEVICE(0x3E94, info) /* Halo GT2 */ > > > > -/* CFL U GT1 */ > > -#define INTEL_CFL_U_GT1_IDS(info) \ > > - INTEL_VGA_DEVICE(0x3EA1, info), \ > > - INTEL_VGA_DEVICE(0x3EA4, info) > > - > > /* CFL U GT2 */ > > #define INTEL_CFL_U_GT2_IDS(info) \ > > - INTEL_VGA_DEVICE(0x3EA0, info), \ > > - INTEL_VGA_DEVICE(0x3EA3, info), \ > > INTEL_VGA_DEVICE(0x3EA9, info) > > > > /* CFL U GT3 */ > > #define INTEL_CFL_U_GT3_IDS(info) \ > > - INTEL_VGA_DEVICE(0x3EA2, info), /* ULT GT3 */ \ > > INTEL_VGA_DEVICE(0x3EA5, info), /* ULT GT3 */ \ > > INTEL_VGA_DEVICE(0x3EA6, info), /* ULT GT3 */ \ > > INTEL_VGA_DEVICE(0x3EA7, info), /* ULT GT3 */ \ > > INTEL_VGA_DEVICE(0x3EA8, info) /* ULT GT3 */ > > > > +/* WHL/CFL U GT1 */ > > +#define INTEL_WHL_U_GT1_IDS(info) \ > > + INTEL_VGA_DEVICE(0x3EA1, info) > > + > > +/* WHL/CFL U GT2 */ > > +#define INTEL_WHL_U_GT2_IDS(info) \ > > + INTEL_VGA_DEVICE(0x3EA0, info) > > + > > +/* WHL/CFL U GT3 */ > > +#define INTEL_WHL_U_GT3_IDS(info) \ > > + INTEL_VGA_DEVICE(0x3EA2, info), \ > > + INTEL_VGA_DEVICE(0x3EA3, info), \ > > + INTEL_VGA_DEVICE(0x3EA4, info) > > + > > #define INTEL_CFL_IDS(info) \ > > INTEL_CFL_S_GT1_IDS(info), \ > > INTEL_CFL_S_GT2_IDS(info), \ > > INTEL_CFL_H_GT2_IDS(info), \ > > - INTEL_CFL_U_GT1_IDS(info), \ > > INTEL_CFL_U_GT2_IDS(info), \ > > - INTEL_CFL_U_GT3_IDS(info) > > + INTEL_CFL_U_GT3_IDS(info), \ > > + INTEL_WHL_U_GT1_IDS(info), \ > > + INTEL_WHL_U_GT2_IDS(info), \ > > + INTEL_WHL_U_GT3_IDS(info) > > > > /* CNL */ > > #define INTEL_CNL_IDS(info) \ > > -- > > 2.17.1 > > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [CI 2/2] drm/i915/icl: update VBT's child_device_config flags2 field
On Thu, 14 Jun 2018, Paulo Zanoni wrote: > Some bits from the flags2 field are going to be used in the next > patches, so replace the whole-byte definition with the actual bits and > document their versions. > > This patch is based on a patch by Animesh Manna. > > Cc: Animesh Manna > Credits-to: Animesh Manna > Reviewed-by: Rodrigo Vivi > Signed-off-by: Paulo Zanoni Reviewed-by: Jani Nikula > --- > drivers/gpu/drm/i915/intel_vbt_defs.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h > b/drivers/gpu/drm/i915/intel_vbt_defs.h > index c132d0c3a500..c614c9f3f28b 100644 > --- a/drivers/gpu/drm/i915/intel_vbt_defs.h > +++ b/drivers/gpu/drm/i915/intel_vbt_defs.h > @@ -420,7 +420,9 @@ struct child_device_config { > u16 extended_type; > u8 dvo_function; > u8 dp_usb_type_c:1; /* 195 */ > - u8 flags2_reserved:7; /* 195 */ > + u8 tbt:1; /* 209 */ > + u8 flags2_reserved:2; /* 195 */ > + u8 dp_port_trace_length:4; /* 209 */ > u8 dp_gpio_index; /* 195 */ > u16 dp_gpio_pin_num;/* 195 */ > u8 dp_iboost_level:4; /* 196 */ -- Jani Nikula, Intel Open Source Graphics Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Some checkpatch fixes for i915_reg.h (rev2)
== Series Details == Series: Some checkpatch fixes for i915_reg.h (rev2) URL : https://patchwork.freedesktop.org/series/44662/ State : warning == Summary == $ dim checkpatch origin/drm-tip e7a983f07b24 drm/i915/i915_reg.h: fix the checkpatch SPACING issues -:4: WARNING:EMAIL_SUBJECT: A patch subject line should describe the change not the tool that found it #4: Subject: [PATCH] drm/i915/i915_reg.h: fix the checkpatch SPACING issues -:53: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'a' - possible side-effects? #53: FILE: drivers/gpu/drm/i915/i915_reg.h:144: +#define _PIPE(pipe, a, b) ((a) + (pipe) * ((b) - (a))) -:58: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'a' - possible side-effects? #58: FILE: drivers/gpu/drm/i915/i915_reg.h:148: +#define _TRANS(tran, a, b) ((a) + (tran) * ((b) - (a))) -:61: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'a' - possible side-effects? #61: FILE: drivers/gpu/drm/i915/i915_reg.h:150: +#define _PORT(port, a, b) ((a) + (port) * ((b) - (a))) -:66: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'a' - possible side-effects? #66: FILE: drivers/gpu/drm/i915/i915_reg.h:154: +#define _PLL(pll, a, b) ((a) + (pll) * ((b) - (a))) -:1068: WARNING:SPACE_BEFORE_TAB: please, no space before tabs #1068: FILE: drivers/gpu/drm/i915/i915_reg.h:2416: +#define DERRMR_PIPEB_SCANLINE ^I(1 << 8)$ -:1636: WARNING:LONG_LINE: line over 100 characters #1636: FILE: drivers/gpu/drm/i915/i915_reg.h:3136: +#define PHY_STATUS_SPLINE_LDO(phy, ch, spline)(1 << (8 - (6 * (phy) + 3 * (ch) + (spline -:1848: WARNING:LONG_LINE_COMMENT: line over 100 characters #1848: FILE: drivers/gpu/drm/i915/i915_reg.h:3651: +#define IMPROMOEN(1 << 10) /* promo is immediate or delayed until next idle interval (only for timeout method above) */ -:3189: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'a' - possible side-effects? #3189: FILE: drivers/gpu/drm/i915/i915_reg.h:6832: +#define _ID(id, a, b) ((a) + (id) * ((b) - (a))) total: 0 errors, 4 warnings, 5 checks, 4619 lines checked a6966a6827eb drm/i915/i915_reg.h: fix the checkpatch SPACE_BEFORE_TAB issues -:4: WARNING:EMAIL_SUBJECT: A patch subject line should describe the change not the tool that found it #4: Subject: [PATCH] drm/i915/i915_reg.h: fix the checkpatch SPACE_BEFORE_TAB total: 0 errors, 1 warnings, 0 checks, 32 lines checked 77f23b3d193f drm/i915/i915_reg.h: fix the checkpatch MACRO_ARG_PRECEDENCE issues -:4: WARNING:EMAIL_SUBJECT: A patch subject line should describe the change not the tool that found it #4: Subject: [PATCH] drm/i915/i915_reg.h: fix the checkpatch MACRO_ARG_PRECEDENCE total: 0 errors, 1 warnings, 0 checks, 138 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 12/14] drm/i915: Clean up encoder->crtc_mask setup
On Fri, 15 Jun 2018, Ville Syrjala wrote: > From: Ville Syrjälä > > Use BIT(pipe) for better legibility when populating the crtc_mask > for encoders. > > Also remove the redundant possible_crtcs setup for the TV encoder. > > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula > --- > drivers/gpu/drm/i915/intel_crt.c | 4 ++-- > drivers/gpu/drm/i915/intel_ddi.c | 2 +- > drivers/gpu/drm/i915/intel_dp.c | 6 +++--- > drivers/gpu/drm/i915/intel_dvo.c | 2 +- > drivers/gpu/drm/i915/intel_hdmi.c | 6 +++--- > drivers/gpu/drm/i915/intel_lvds.c | 6 +++--- > drivers/gpu/drm/i915/intel_sdvo.c | 2 +- > drivers/gpu/drm/i915/intel_tv.c | 3 +-- > 8 files changed, 15 insertions(+), 16 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_crt.c > b/drivers/gpu/drm/i915/intel_crt.c > index 95aa29cf2d9c..b6b1464a47b2 100644 > --- a/drivers/gpu/drm/i915/intel_crt.c > +++ b/drivers/gpu/drm/i915/intel_crt.c > @@ -967,9 +967,9 @@ void intel_crt_init(struct drm_i915_private *dev_priv) > crt->base.type = INTEL_OUTPUT_ANALOG; > crt->base.cloneable = (1 << INTEL_OUTPUT_DVO) | (1 << > INTEL_OUTPUT_HDMI); > if (IS_I830(dev_priv)) > - crt->base.crtc_mask = (1 << 0); > + crt->base.crtc_mask = BIT(PIPE_A); > else > - crt->base.crtc_mask = (1 << 0) | (1 << 1) | (1 << 2); > + crt->base.crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C); > > if (IS_GEN2(dev_priv)) > connector->interlace_allowed = 0; > diff --git a/drivers/gpu/drm/i915/intel_ddi.c > b/drivers/gpu/drm/i915/intel_ddi.c > index ca73387bd596..0462d9b31f7d 100644 > --- a/drivers/gpu/drm/i915/intel_ddi.c > +++ b/drivers/gpu/drm/i915/intel_ddi.c > @@ -3514,7 +3514,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, > enum port port) > intel_encoder->type = INTEL_OUTPUT_DDI; > intel_encoder->power_domain = intel_port_to_power_domain(port); > intel_encoder->port = port; > - intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2); > + intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C); > intel_encoder->cloneable = 0; > > if (INTEL_GEN(dev_priv) >= 11) > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > index a58bac01aeea..d983924ed69a 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -6474,11 +6474,11 @@ bool intel_dp_init(struct drm_i915_private *dev_priv, > intel_encoder->power_domain = intel_port_to_power_domain(port); > if (IS_CHERRYVIEW(dev_priv)) { > if (port == PORT_D) > - intel_encoder->crtc_mask = 1 << 2; > + intel_encoder->crtc_mask = BIT(PIPE_C); > else > - intel_encoder->crtc_mask = (1 << 0) | (1 << 1); > + intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B); > } else { > - intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2); > + intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | > BIT(PIPE_C); > } > intel_encoder->cloneable = 0; > intel_encoder->port = port; > diff --git a/drivers/gpu/drm/i915/intel_dvo.c > b/drivers/gpu/drm/i915/intel_dvo.c > index 27f16db8953a..27c18680deb4 100644 > --- a/drivers/gpu/drm/i915/intel_dvo.c > +++ b/drivers/gpu/drm/i915/intel_dvo.c > @@ -499,7 +499,7 @@ void intel_dvo_init(struct drm_i915_private *dev_priv) > intel_encoder->type = INTEL_OUTPUT_DVO; > intel_encoder->power_domain = POWER_DOMAIN_PORT_OTHER; > intel_encoder->port = port; > - intel_encoder->crtc_mask = (1 << 0) | (1 << 1); > + intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B); > > switch (dvo->type) { > case INTEL_DVO_CHIP_TMDS: > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c > b/drivers/gpu/drm/i915/intel_hdmi.c > index 09d7d38f0d4e..666bcc1a4660 100644 > --- a/drivers/gpu/drm/i915/intel_hdmi.c > +++ b/drivers/gpu/drm/i915/intel_hdmi.c > @@ -2405,11 +2405,11 @@ void intel_hdmi_init(struct drm_i915_private > *dev_priv, > intel_encoder->port = port; > if (IS_CHERRYVIEW(dev_priv)) { > if (port == PORT_D) > - intel_encoder->crtc_mask = 1 << 2; > + intel_encoder->crtc_mask = BIT(PIPE_C); > else > - intel_encoder->crtc_mask = (1 << 0) | (1 << 1); > + intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B); > } else { > - intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2); > + intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | > BIT(PIPE_C); > } > intel_encoder->cloneable = 1 << INTEL_OUTPUT_ANALOG; > /* > diff --git a/drivers/gpu/drm/i915/intel_lvds.c > b/drivers/gpu/drm/i915/intel_lvds.c > index bb06744d28a4..753df8dd9a03 100644 > --- a/drivers/gpu/drm/i915/intel_lvds.c >
[Intel-gfx] ✗ Fi.CI.BAT: failure for Some checkpatch fixes for i915_reg.h (rev2)
== Series Details == Series: Some checkpatch fixes for i915_reg.h (rev2) URL : https://patchwork.freedesktop.org/series/44662/ State : failure == Summary == = CI Bug Log - changes from CI_DRM_4337 -> Patchwork_9355 = == Summary - FAILURE == Serious unknown changes coming with Patchwork_9355 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9355, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/44662/revisions/2/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9355: === IGT changes === Possible regressions igt@gem_ctx_create@basic-files: fi-cfl-8700k: PASS -> DMESG-WARN == Known issues == Here are the changes found in Patchwork_9355 that come from known issues: === IGT changes === Issues hit igt@gem_ctx_create@basic-files: fi-glk-j4005: PASS -> DMESG-WARN (fdo#105719) +1 igt@kms_flip@basic-flip-vs-modeset: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106000) igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c: fi-bxt-dsi: PASS -> INCOMPLETE (fdo#103927) Possible fixes igt@gem_exec_fence@await-hang-default: fi-glk-j4005: DMESG-WARN (fdo#105719) -> PASS igt@kms_frontbuffer_tracking@basic: fi-hsw-peppy: DMESG-FAIL (fdo#106103, fdo#102614) -> PASS igt@kms_pipe_crc_basic@hang-read-crc-pipe-b: fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c: fi-glk-j4005: DMESG-WARN (fdo#106238) -> PASS fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614 fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927 fdo#105719 https://bugs.freedesktop.org/show_bug.cgi?id=105719 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103 fdo#106238 https://bugs.freedesktop.org/show_bug.cgi?id=106238 == Participating hosts (43 -> 38) == Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u == Build changes == * Linux: CI_DRM_4337 -> Patchwork_9355 CI_DRM_4337: 2c201fbc18b9d8403c321e340d153c98633e3b7f @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4523: 778497e7965dc8662c770a89ebbd741778feb71e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9355: 77f23b3d193f468da37b079562d0f2396875d3d0 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 77f23b3d193f drm/i915/i915_reg.h: fix the checkpatch MACRO_ARG_PRECEDENCE issues a6966a6827eb drm/i915/i915_reg.h: fix the checkpatch SPACE_BEFORE_TAB issues e7a983f07b24 drm/i915/i915_reg.h: fix the checkpatch SPACING issues == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9355/issues.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 05/24] drm/i915/icp: Add Interrupt Support
On Wed, Jun 13, 2018 at 07:21:54PM -0700, Dhinakaran Pandiyan wrote: > On Wed, 2018-06-13 at 15:23 -0700, Lucas De Marchi wrote: > > On Tue, May 29, 2018 at 05:04:58PM -0700, Lucas De Marchi wrote: > > > > > > On Thu, May 24, 2018 at 05:43:24PM -0700, Lucas De Marchi wrote: > > > > > > > > On Thu, May 24, 2018 at 05:45:43PM -0700, Dhinakaran Pandiyan > > > > wrote: > > > > > > > > > > On Thu, 2018-05-24 at 16:53 -0700, Lucas De Marchi wrote: > > > > > > > > > > > > On Mon, May 21, 2018 at 05:25:39PM -0700, Paulo Zanoni wrote: > > > > > > > > > > > > > > > > > > > > > From: Anusha Srivatsa > > > > > > > > > > > > > > This patch addresses Interrupts from south display engine > > > > > > > (SDE). > > > > > > > > > > > > > > ICP has two registers - SHOTPLUG_CTL_DDI and > > > > > > > SHOTPLUG_CTL_TC. > > > > > > > Introduce these registers and their intended values. > > > > > > > > > > > > > > Introduce icp_irq_handler(). > > > > > > > > > > > > > > Cc: Paulo Zanoni > > > > > > > Cc: Dhinakaran Pandiyan > > > > > > > Cc: Ville Syrjala > > > > > > > Signed-off-by: Anusha Srivatsa > > > > > > > [Paulo: coding style bikesheds and rebases]. > > > > > > > Signed-off-by: Paulo Zanoni > > > > > > > --- > > > > > > > drivers/gpu/drm/i915/i915_irq.c | 134 > > > > > > > +++- > > > > > > > drivers/gpu/drm/i915/i915_reg.h | 40 > > > > > > > 2 files changed, 172 insertions(+), 2 deletions(-) > > > > > > > > > > > > > > diff --git a/drivers/gpu/drm/i915/i915_irq.c > > > > > > > b/drivers/gpu/drm/i915/i915_irq.c > > > > > > > index 9bcec5fdb9d0..6b109991786f 100644 > > > > > > > --- a/drivers/gpu/drm/i915/i915_irq.c > > > > > > > +++ b/drivers/gpu/drm/i915/i915_irq.c > > > > > > > @@ -122,6 +122,15 @@ static const u32 > > > > > > > hpd_tc_gen11[HPD_NUM_PINS] = > > > > > > > { > > > > > > > [HPD_PORT_F] = GEN11_TC4_HOTPLUG > > > > > > > }; > > > > > > > > > > > > > > +static const u32 hpd_icp[HPD_NUM_PINS] = { > > > > > > > + [HPD_PORT_A] = ICP_DDIA_HOTPLUG, > > > > > > > + [HPD_PORT_B] = ICP_DDIB_HOTPLUG, > > > > > > > + [HPD_PORT_C] = ICP_TC1_HOTPLUG, > > > > > > > + [HPD_PORT_D] = ICP_TC2_HOTPLUG, > > > > > > > + [HPD_PORT_E] = ICP_TC3_HOTPLUG, > > > > > > > + [HPD_PORT_F] = ICP_TC4_HOTPLUG > > > > > > > +}; > > > > > > > + > > > > > > > /* IIR can theoretically queue up two events. Be paranoid. > > > > > > > */ > > > > > > > #define GEN8_IRQ_RESET_NDX(type, which) do { \ > > > > > > > I915_WRITE(GEN8_##type##_IMR(which), 0x); > > > > > > > \ > > > > > > > @@ -1586,6 +1595,34 @@ static bool > > > > > > > bxt_port_hotplug_long_detect(enum port port, u32 val) > > > > > > > } > > > > > > > } > > > > > > > > > > > > > > +static bool icp_ddi_port_hotplug_long_detect(enum port > > > > > > > port, u32 > > > > > > > val) > > > > > > > +{ > > > > > > > + switch (port) { > > > > > > > + case PORT_A: > > > > > > > + return val & ICP_DDIA_HPD_LONG_DETECT; > > > > > > > + case PORT_B: > > > > > > > + return val & ICP_DDIB_HPD_LONG_DETECT; > > > > > > > + default: > > > > > > > + return false; > > > > > > > + } > > > > > > > +} > > > > > > > + > > > > > > > +static bool icp_tc_port_hotplug_long_detect(enum port > > > > > > > port, u32 > > > > > > > val) > > > > > > > +{ > > > > > > > + switch (port) { > > > > > > > + case PORT_C: > > > > > > > + return val & > > > > > > > ICP_TC_HPD_LONG_DETECT(PORT_TC1); > > > > > > > + case PORT_D: > > > > > > > + return val & > > > > > > > ICP_TC_HPD_LONG_DETECT(PORT_TC2); > > > > > > > + case PORT_E: > > > > > > > + return val & > > > > > > > ICP_TC_HPD_LONG_DETECT(PORT_TC3); > > > > > > > + case PORT_F: > > > > > > > + return val & > > > > > > > ICP_TC_HPD_LONG_DETECT(PORT_TC4); > > > > > > > + default: > > > > > > > + return false; > > > > > > > + } > > > > > > > +} > > > > > > > + > > > > > > > static bool spt_port_hotplug2_long_detect(enum port port, > > > > > > > u32 val) > > > > > > > { > > > > > > > switch (port) { > > > > > > > @@ -2377,6 +2414,43 @@ static void cpt_irq_handler(struct > > > > > > > drm_i915_private *dev_priv, u32 pch_iir) > > > > > > > cpt_serr_int_handler(dev_priv); > > > > > > > } > > > > > > > > > > > > > > +static void icp_irq_handler(struct drm_i915_private > > > > > > > *dev_priv, u32 > > > > > > > pch_iir) > > > > > > > +{ > > > > > > > + u32 ddi_hotplug_trigger = pch_iir & > > > > > > > ICP_SDE_DDI_MASK; > > > > > > > + u32 tc_hotplug_trigger = pch_iir & > > > > > > > ICP_SDE_TC_MASK; > > > > > > > + u32 pin_mask = 0, long_mask = 0; > > > > > > > + > > > > > > > + if (ddi_hotplug_trigger) { > > > > > > > + u32 dig_hotplug_reg; > > > > > > > + > > > > > > > + dig_hotplug_reg = > > > > > > > I915_READ(SHOTPLUG_CTL_DDI); > > > > > > > + I915_WRITE(SHOTPLUG_CTL_DDI, > > > > > > > dig_hotplug_reg); > > > > > > > + > > > > > > > + intel_get_hpd_pins(dev_priv, &pin_mask, >
Re: [Intel-gfx] [PATCH] drm/i915/audio: Add 801Mhz clock entries to dp_aud_n_m table
On Fri, 08 Jun 2018, Jani Nikula wrote: > On Thu, 07 Jun 2018, Radhakrishna Sripada > wrote: >> From: "Sripada, Radhakrishna" >> >> Expand the Maud/Naud table according to DP 1.4 spec to include entries for >> 810 MHz clock. This is required for audio to work with HBR3. >> >> Cc: Dhinakaran Pandiyan >> Cc: Jani Nikula >> Signed-off-by: Radhakrishna Sripada > > Reviewed-by: Jani Nikula And pushed, thanks for the patch. > > >> --- >> drivers/gpu/drm/i915/intel_audio.c | 10 ++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/drivers/gpu/drm/i915/intel_audio.c >> b/drivers/gpu/drm/i915/intel_audio.c >> index 3ea566f99450..6d1c33066987 100644 >> --- a/drivers/gpu/drm/i915/intel_audio.c >> +++ b/drivers/gpu/drm/i915/intel_audio.c >> @@ -59,6 +59,7 @@ >> */ >> >> /* DP N/M table */ >> +#define LC_810M 81 >> #define LC_540M 54 >> #define LC_270M 27 >> #define LC_162M 162000 >> @@ -99,6 +100,15 @@ static const struct dp_aud_n_m dp_aud_n_m[] = { >> { 128000, LC_540M, 4096, 33750 }, >> { 176400, LC_540M, 3136, 18750 }, >> { 192000, LC_540M, 2048, 11250 }, >> +{ 32000, LC_810M, 1024, 50625 }, >> +{ 44100, LC_810M, 784, 28125 }, >> +{ 48000, LC_810M, 512, 16875 }, >> +{ 64000, LC_810M, 2048, 50625 }, >> +{ 88200, LC_810M, 1568, 28125 }, >> +{ 96000, LC_810M, 1024, 16875 }, >> +{ 128000, LC_810M, 4096, 50625 }, >> +{ 176400, LC_810M, 3136, 28125 }, >> +{ 192000, LC_810M, 2048, 16875 }, >> }; >> >> static const struct dp_aud_n_m * -- Jani Nikula, Intel Open Source Graphics Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH V2] drm/i915/glk: Add Quirk for GLK NUC HDMI port issues.
Am Wed, 13 Jun 2018 14:48:49 -0700 schrieb clinton.a.tay...@intel.com: > From: Clint Taylor > > On GLK NUC platforms the HDMI retiming buffer needs additional disabled > time to correctly sync to a faster incoming signal. > > When measured on a scope the highspeed lines of the HDMI clock turn off > for ~400uS during a normal resolution change. The HDMI retimer on the > GLK NUC appears to require at least a full frame of quiet time before a > new faster clock can be correctly sync'd. The worst case scenario appears > to be 23.98Hz modes which requires a wait of 41.25ms. Add a quirk to the > driver for GLK NUC that waits 42ms. > > V2: Add more devices to the quirk list > > Cc: Imre Deak > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105887 > Signed-off-by: Clint Taylor Tested-by: Daniel Scheller on an ASRock J5005-ITX with a 0x3184 GLK GPU for the last five days, HDMI signal issues when the pixel clock goes up are gone. > --- > drivers/gpu/drm/i915/i915_drv.h | 1 + > drivers/gpu/drm/i915/intel_ddi.c | 8 > drivers/gpu/drm/i915/intel_display.c | 19 +++ > 3 files changed, 28 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index be8c2f0..da196b4 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -656,6 +656,7 @@ enum intel_sbi_destination { > #define QUIRK_BACKLIGHT_PRESENT (1<<3) > #define QUIRK_PIN_SWIZZLED_PAGES (1<<5) > #define QUIRK_INCREASE_T12_DELAY (1<<6) > +#define QUIRK_INCREASE_DDI_DISABLED_TIME (1<<7) > > struct intel_fbdev; > struct intel_fbc_work; > diff --git a/drivers/gpu/drm/i915/intel_ddi.c > b/drivers/gpu/drm/i915/intel_ddi.c > index ca73387..bc3d012 100644 > --- a/drivers/gpu/drm/i915/intel_ddi.c > +++ b/drivers/gpu/drm/i915/intel_ddi.c > @@ -1791,6 +1791,9 @@ void intel_ddi_enable_transcoder_func(const struct > intel_crtc_state *crtc_state) > I915_WRITE(TRANS_DDI_FUNC_CTL(cpu_transcoder), temp); > } > > +/* Quirk time computed based on 24fps frame time of 41.25ms */ > +#define DDI_DISABLED_QUIRK_TIME 42 > + > void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv, > enum transcoder cpu_transcoder) > { > @@ -1800,6 +1803,11 @@ void intel_ddi_disable_transcoder_func(struct > drm_i915_private *dev_priv, > val &= ~(TRANS_DDI_FUNC_ENABLE | TRANS_DDI_PORT_MASK | > TRANS_DDI_DP_VC_PAYLOAD_ALLOC); > val |= TRANS_DDI_PORT_NONE; > I915_WRITE(reg, val); > + > + if (dev_priv->quirks & QUIRK_INCREASE_DDI_DISABLED_TIME) { > + msleep(DDI_DISABLED_QUIRK_TIME); > + DRM_DEBUG_KMS("Quirk Increase DDI disabled time\n"); > + } > } > > int intel_ddi_toggle_hdcp_signalling(struct intel_encoder *intel_encoder, > diff --git a/drivers/gpu/drm/i915/intel_display.c > b/drivers/gpu/drm/i915/intel_display.c > index 8251e18..40e0306 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -14749,6 +14749,17 @@ static void quirk_increase_t12_delay(struct > drm_device *dev) > DRM_INFO("Applying T12 delay quirk\n"); > } > > +/* GeminiLake NUC HDMI outputs require additional off time > + * this allows the onboard retimer to correctly sync to signal > + */ > +static void quirk_increase_ddi_disabled_time(struct drm_device *dev) > +{ > + struct drm_i915_private *dev_priv = to_i915(dev); > + > + dev_priv->quirks |= QUIRK_INCREASE_DDI_DISABLED_TIME; > + DRM_INFO("Applying Increase DDI Disabled quirk\n"); > +} > + > struct intel_quirk { > int device; > int subsystem_vendor; > @@ -14835,6 +14846,14 @@ static int intel_dmi_reverse_brightness(const struct > dmi_system_id *id) > > /* Toshiba Satellite P50-C-18C */ > { 0x191B, 0x1179, 0xF840, quirk_increase_t12_delay }, > + > + /* GeminiLake NUC */ > + { 0x3185, 0x8086, 0x2072, quirk_increase_ddi_disabled_time }, > + { 0x3184, 0x8086, 0x2072, quirk_increase_ddi_disabled_time }, > + /* ASRock ITX*/ > + { 0x3185, 0x1849, 0x2212, quirk_increase_ddi_disabled_time }, > + { 0x3184, 0x1849, 0x2212, quirk_increase_ddi_disabled_time }, > + > }; > > static void intel_init_quirks(struct drm_device *dev) Best regards, Daniel Scheller -- https://github.com/herrnst ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/psr: Kill delays when activating psr back.
On Wed, 2018-06-13 at 16:49 -0700, Dhinakaran Pandiyan wrote: > On Wed, 2018-06-13 at 12:26 -0700, Rodrigo Vivi wrote: > > > > The immediate enabling was actually not an issue for the > > HW perspective for core platforms that have HW tracking. > > HW will wait few identical idle frames before transitioning > > to actual psr active anyways. > > > > Now that we removed VLV/CHV out of the picture completely > > we can safely remove any delays. > > > > Note that this patch also remove the delayed activation > > on HSW and BDW introduced by commit 'd0ac896a477d > > ("drm/i915: Delay first PSR activation.")'. This was > > introduced to fix a blank screen on VLV/CHV and also > > masked some frozen screens on other core platforms. > > Probably the same that we are now properly hunting and fixing. > > > > v2:(DK): Remove unnecessary WARN_ONs and make some other > > VLV | CHV more readable. > > v3: Do it regardless the timer rework. > > v4: (DK/CI): Add VLV || CHV check on cancel work at psr_disable. > > v5: Kill remaining items and fully rework activation functions. > > v6: Rebase on top of VLV/CHV clean-up and keep the reactivation > > on a regular non-delayed work to avoid extra delays on exit > > calls and allow us to add few more safety checks before > > real activation. > We have to implement this bspec step in the disable sequence now that > you are removing the delay - > "Wait for SRD_STATUS to show SRD is Idle. This will take up to one > full > frame time (1/refresh rate), plus SRD exit training time (max of > 6ms), > plus SRD aux channel handshake (max of 1.5ms)." > > Otherwise, we can end up re-enabling right after a disable in > psr_exit() > > > > > > > > Cc: Dhinakaran Pandiyan > > Signed-off-by: Rodrigo Vivi > > --- > > drivers/gpu/drm/i915/i915_debugfs.c | 2 -- > > drivers/gpu/drm/i915/i915_drv.h | 2 +- > > drivers/gpu/drm/i915/intel_psr.c| 29 +++-- > > > > 3 files changed, 8 insertions(+), 25 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c > > b/drivers/gpu/drm/i915/i915_debugfs.c > > index 769ab9745834..948b973af067 100644 > > --- a/drivers/gpu/drm/i915/i915_debugfs.c > > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > > @@ -2660,8 +2660,6 @@ static int i915_edp_psr_status(struct > > seq_file > > *m, void *data) > > seq_printf(m, "Enabled: %s\n", yesno((bool)dev_priv- > > > > > > psr.enabled)); > > seq_printf(m, "Busy frontbuffer bits: 0x%03x\n", > > dev_priv->psr.busy_frontbuffer_bits); > > - seq_printf(m, "Re-enable work scheduled: %s\n", > > - yesno(work_busy(&dev_priv->psr.work.work))); > > > > if (dev_priv->psr.psr2_enabled) > > enabled = I915_READ(EDP_PSR2_CTL) & > > EDP_PSR2_ENABLE; > > diff --git a/drivers/gpu/drm/i915/i915_drv.h > > b/drivers/gpu/drm/i915/i915_drv.h > > index be8c2f0823c4..19defe73b156 100644 > > --- a/drivers/gpu/drm/i915/i915_drv.h > > +++ b/drivers/gpu/drm/i915/i915_drv.h > > @@ -613,7 +613,7 @@ struct i915_psr { > > bool sink_support; > > struct intel_dp *enabled; > > bool active; > > - struct delayed_work work; > > + struct work_struct work; > > unsigned busy_frontbuffer_bits; > > bool sink_psr2_support; > > bool link_standby; > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > b/drivers/gpu/drm/i915/intel_psr.c > > index 71dfe541740f..ef0f4741a95d 100644 > > --- a/drivers/gpu/drm/i915/intel_psr.c > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > @@ -671,21 +671,7 @@ void intel_psr_enable(struct intel_dp > > *intel_dp, > > dev_priv->psr.enable_source(intel_dp, crtc_state); > > dev_priv->psr.enabled = intel_dp; > > > > - if (INTEL_GEN(dev_priv) >= 9) { > > - intel_psr_activate(intel_dp); > > - } else { > > - /* > > - * FIXME: Activation should happen immediately > > since > > this > > - * function is just called after pipe is fully > > trained and > > - * enabled. > > - * However on some platforms we face issues when > > first > > - * activation follows a modeset so quickly. > > - * - On HSW/BDW we get a recoverable frozen > > screen until > > - * next exit-activate sequence. > > - */ > > - schedule_delayed_work(&dev_priv->psr.work, > > - msecs_to_jiffies(intel_dp- > > > > > > panel_power_cycle_delay * 5)); > > - } > > + intel_psr_activate(intel_dp); > > > > unlock: > > mutex_unlock(&dev_priv->psr.lock); > > @@ -768,8 +754,6 @@ void intel_psr_disable(struct intel_dp > > *intel_dp, > > > > dev_priv->psr.enabled = NULL; > > mutex_unlock(&dev_priv->psr.lock); > > - > > - cancel_delayed_work_sync(&dev_priv->psr.work); > > } > > > > static bool psr_wait_for_idle(struct drm_i915_private *dev_priv) > > @@ -805,10 +789,13 @@ static bool psr_wait_for_idle(struct > > drm_i915_private *dev_priv) > > static vo