[Intel-gfx] Uevent for retraining in case of link training failure in atomic commit phase
Hi, I am working on adding a link rate fallback in case of link training failure. If the link training fails at a specific link rate/lane count in atomic commit phase, I validate the modes again based on the link rate lower than the failed link rate and prune the invalid modes accordingly to update the connector->modes list. I then send a hotplug uevent to the userspace, expecting it to detect the change in the mode list and trigger a modeset during which the link would be retrained to a lower link rate. After looking at the userspace debug logs, I see that after it recieves this uevent on link failure, xf86-video-intel/src/sna/sna_mode_display.c/sna_mode_discover(), calls output_check_status() which only detects a state change if it is changed from connected to disconnected or vice versa. So change in the modelist does not get detected as connector status changed and it notifies "state retained", does not call RRGetInfo() and does not trigger a new modeset. If in case of link train failure, I force the connector status to be disconnected then it clears the state, disables all the PLLs, triggers a new modeset. However during this time, the CTS test times out (10ms) and hence compliance fails. Is there any other way, we can force the userspace to detect a change in the connector state so that it triggers a full modeset without forcing the connector state to be disconnected? The pieces of /var/log/Xorg.0.log that capture the sna_mode_discover are pasted here: http://paste.ubuntu.com/23337284/ In this log, the third call to sna_mode_discover maps to the uevent sent due to link failure where it indicates state retained and does not do anything further. The Kernel dmesg log in case of forcing the connector status to disconnected is: http://paste.ubuntu.com/23337285/ Please let me know if any of you have suggestions, I am not a userspace expert. This test is done with Ubuntu 16.04 and CTS run using DPR-120 test 4.3.1.3 Regards Manasi ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [Regression report] Weekly regression report WW42
This weeknew regressions +---+---+++ | BugId | Summary | Created on | Bisect | +---+---+++ | 98213 | REGRESSION: GPU hangs when enable_fbc=1 | 2016-10-12 | No | +---+---+++ Previous regressions +---+---+++ | BugId | Summary | Created on | Bisect | +---+---+++ | 98036 | [BYT] constant screen flicker and rendering e | 2016-10-03 | No | | 97994 | [REGRESS] [BISECT] [i915] Monitor resolution | 2016-09-30 | Yes| | | 97918 | [bdw regression 4.8] Severe graphics regressi | 2016-09-25 | No | | 97878 | [SKL][REGRESSION][BISECTED] Dropped frames an | 2016-09-20 | Yes| | 97867 | [HSW][Regression] 4.6.7 and beyond causes scr | 2016-09-19 | No | | 97450 | [SKL] [regression] Random display flickering | 2016-08-23 | No | | 97017 | [SKL GT3e guc bisected] ~10% performance drop | 2016-07-21 | Yes| | 96938 | [HSW modeset regression] i915/drm locks up wh | 2016-07-15 | No | | 96916 | Regression: screen flashes with PSR enabled | 2016-07-13 | No | | 96800 | [regression] The drm-intel-nightly branch no | 2016-07-04 | No | | 96736 | kernel 4.6 regression: PSR causes screen to f | 2016-06-29 | No | | 96704 | kernel 4.6 regression: PSR on Haswell causes | 2016-06-28 | No | | 96645 | [regression 4.7] [BISECT]Low package c-states | 2016-06-22 | Yes| | 96428 | [IVB bisected] [drm:intel_dp_aux_ch] *ERROR* | 2016-06-07 | Yes| | 95736 | [IVB bisected] *ERROR* uncleared fifo underru | 2016-05-24 | Yes| | 95197 | [i915] regression in 4.6-rc5: GPU HANG: ecode | 2016-04-28 | No | | 95097 | [hdmi regression ilk] no signal to TV | 2016-04-24 | No | | 94590 | [KBL] igt/kms_fbcon_fbt/psr-suspend regressio | 2016-03-17 | No | | 94430 | [HSW+nvidia] regression: display becomes "dis | 2016-03-07 | No | | 94337 | Linux 4.5 regression: FIFO underruns on Skyla | 2016-02-29 | No | | 93971 | video framerate performance regression with U | 2016-02-02 | No | | 93802 | [IVB bisected] switching to tty1 causes fifo | 2016-01-20 | Yes| | 93782 | [i9xx TV][BISECT] vblank wait timeout on crtc | 2016-01-19 | Yes| | 93486 | [HP Compaq dc7800 Small Form Factor PC][REGRE | 2015-12-23 | No | | 93393 | Regression for Skylake modesetting in kernel | 2015-12-16 | No | | 93263 | 945GM regression since 4.3| 2015-12-05 | No | | 92414 | [Intel-gfx] As of kernel 4.3-rc1 system will | 2015-10-10 | Yes| | 92237 | [SNB]Horrible noise (audio) via DisplayPort [ | 2015-10-02 | No | | 92050 | [regression]/bug introduced by commit [0e572f | 2015-09-19 | No | | 91974 | [bisected] unrecoverable black screen after k | 2015-09-11 | Yes| | 91959 | [865g Linux regression] GPU hang and disabled | 2015-09-10 | No | | 90134 | [BSW Bisected]GFXBench3_gl_driver/GFXBench3_g | 2015-04-22 | Yes| | 90112 | [BSW bisected] OglGSCloth/Lightsmark/CS/ Port | 2015-04-20 | Yes| | 89872 | [ HSW Bisected ] VGA was white screen when re | 2015-04-02 | Yes| | 89632 | [i965 regression]igt/kms_universal_plane/univ | 2015-03-18 | No | | 89629 | [i965 regression]igt/kms_rotation_crc/sprite- | 2015-03-18 | No | | 87726 | [BDW Bisected] OglDrvCtx performance reduced | 2014-12-26 | Yes| | 87725 | [BDW Bisected] OglBatch7 performance reduced | 2014-12-26 | Yes| | 87131 | [PNV regression] igt/gem_exec_lut_handle take | 2014-12-09 | No | +---+---+++ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/dp: Increase cdclk when DP audio is enabled with 4 lanes and HBR2
> -Original Message- > From: Pandiyan, Dhinakaran > Sent: Saturday, October 15, 2016 4:36 AM > To: Yang, Libin> Cc: intel-...@freedesktop.org; Nikula, Jani ; Kp, Jeeja > ; libin.y...@linux.intel.com > Subject: Re: [Intel-gfx] [PATCH] drm/i915/dp: Increase cdclk when DP audio is > enabled with 4 lanes and HBR2 > > On Fri, 2016-10-14 at 03:09 +, Yang, Libin wrote: > > Tested-by: Libin Yang > > > > Regards, > > Libin > > > > > > Thanks Libin. Can you confirm the max. BCLK frequency we set for the audio > controller? Currently, we don't support HBR audio. We only test 48KHz, 44.1KHz and 32KHz. For the BDW/HSW, audio requires that gfx driver should notify audio driver that cdclk is changed. Currently , eld notify will notify the audio the change of cdclk. I will ask our QA to do a full test on 48KHz, 44.1KHz and 32KHz. Regards, Libin > > > -DK > > > -Original Message- > > > From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On > > > Behalf Of Dhinakaran Pandiyan > > > Sent: Friday, October 14, 2016 2:04 AM > > > To: intel-...@freedesktop.org > > > Cc: Nikula, Jani ; Kp, Jeeja > > > ; Libin Yang ; > > > Pandiyan, Dhinakaran > > > Subject: [Intel-gfx] [PATCH] drm/i915/dp: Increase cdclk when DP > > > audio is enabled with 4 lanes and HBR2 > > > > > > According to BSpec, cdclk has to be not less than 432 MHz with DP > > > audio enabled, port width x4, and link rate HBR2 (5.4 GHz) > > > > > > Having a lower cdclk triggers pipe underruns, which then lead to > > > displays continuously cycling off and on. This is essential for DP > > > MST audio as the link is trained at HBR2 and 4 lanes by default. > > > > > > This should fix https://bugs.freedesktop.org/show_bug.cgi?id=97907 > > > > > > Signed-off-by: Dhinakaran Pandiyan > > > --- > > > drivers/gpu/drm/i915/intel_display.c | 47 > > > +--- > > > 1 file changed, 43 insertions(+), 4 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c > > > b/drivers/gpu/drm/i915/intel_display.c > > > index cfcb03f..6a05183 100644 > > > --- a/drivers/gpu/drm/i915/intel_display.c > > > +++ b/drivers/gpu/drm/i915/intel_display.c > > > @@ -6603,14 +6603,43 @@ static int > > > valleyview_modeset_calc_cdclk(struct > > > drm_atomic_state *state) > > > return 0; > > > } > > > > > > +static bool cdclk_min_for_dp_audio(struct drm_atomic_state *state) > > > +{ > > > + > > > + struct drm_crtc_state *crtc_state; > > > + struct drm_crtc *crtc; > > > + int i; > > > + > > > + /* BSpec says "Do not use DisplayPort with CDCLK less than 432 MHz, > > > + * audio enabled, port width x4, and link rate HBR2 (5.4 GHz), or else > > > + * there may be audio corruption or screen corruption." > > > + */ > > > + > > > + for_each_crtc_in_state(state, crtc, crtc_state, i) { > > > + struct intel_crtc_state *pipe_config = > > > + to_intel_crtc_state(crtc_state); > > > + > > > + return (intel_crtc_has_dp_encoder(pipe_config) && > > > + pipe_config->has_audio && > > > + pipe_config->port_clock == 54 && > > > + pipe_config->lane_count == 4); > > > + } > > > + > > > + return false; > > > +} > > > + > > > static int bxt_modeset_calc_cdclk(struct drm_atomic_state *state) { > > > int max_pixclk = ilk_max_pixel_rate(state); > > > + int cdclk, min_cdclk = 0; > > > struct intel_atomic_state *intel_state = > > > to_intel_atomic_state(state); > > > > > > - intel_state->cdclk = intel_state->dev_cdclk = > > > - bxt_calc_cdclk(max_pixclk); > > > + if (cdclk_min_for_dp_audio(state)) > > > + min_cdclk = bxt_calc_cdclk(432000); > > > + > > > + cdclk = bxt_calc_cdclk(max_pixclk); > > > + intel_state->cdclk = intel_state->dev_cdclk = max(min_cdclk, > > > +cdclk); > > > > > > if (!intel_state->active_crtcs) > > > intel_state->dev_cdclk = bxt_calc_cdclk(0); @@ -10374,7 > > > +10403,10 @@ static int broadwell_modeset_calc_cdclk(struct > > > drm_atomic_state *state) > > > struct drm_i915_private *dev_priv = to_i915(state->dev); > > > struct intel_atomic_state *intel_state = to_intel_atomic_state(state); > > > int max_pixclk = ilk_max_pixel_rate(state); > > > - int cdclk; > > > + int cdclk, min_cdclk = 0; > > > + > > > + if (cdclk_min_for_dp_audio(state)) > > > + min_cdclk = broadwell_calc_cdclk(432000); > > > > > > /* > > >* FIXME should also account for plane ratio @@ -10382,6 +10414,8 > > > @@ static int broadwell_modeset_calc_cdclk(struct drm_atomic_state > *state) > > >*/ > > > cdclk = broadwell_calc_cdclk(max_pixclk); > > > > > > + cdclk = max(min_cdclk, cdclk); > > > + > > > if (cdclk > dev_priv->max_cdclk_freq) { > > > DRM_DEBUG_KMS("requested
Re: [Intel-gfx] [PATCH v3 00/10] Start of skl watermark cleanup
Pushed patches 1-4 in this series (with some very small style changes to make checkpatch happy), drm-intel-nightly also rebuilt. On Fri, 2016-10-14 at 17:31 -0400, Lyude wrote: > While it (mostly) works, the code for handling watermarks on Skylake > has been > kind of ugly for a while. As well a lot of it isn't that friendly to > atomic > transactions, Lots of copy paste, redundant wm values, etc. While > this isn't a > full cleanup, it's a good start. As well, we add a couple of features > for > making debugging watermarks a little easier. > > Rebased for latest nightly, new r-bs added + some changes > > Lyude (10): > drm/i915/skl: Move per-pipe ddb allocations into crtc states > drm/i915/skl: Remove linetime from skl_wm_values > drm/i915/gen9: Make skl_wm_level per-plane > drm/i915/gen9: Cleanup skl_pipe_wm_active_state > drm/i915/gen9: Get rid of redundant watermark values > drm/i915/gen9: Add ddb changes to atomic debug output > drm/i915/gen9: Make skl_pipe_wm_get_hw_state() reusable > drm/i915/gen9: Add skl_wm_level_equals() > drm/i915/gen9: Actually verify WM levels in verify_wm_state() > drm/i915/gen9: Don't wrap strings in verify_wm_state() > > drivers/gpu/drm/i915/i915_drv.h | 10 +- > drivers/gpu/drm/i915/intel_display.c | 138 --- > drivers/gpu/drm/i915/intel_drv.h | 24 +- > drivers/gpu/drm/i915/intel_pm.c | 466 +-- > > drivers/gpu/drm/i915/intel_sprite.c | 8 +- > 5 files changed, 355 insertions(+), 291 deletions(-) > -- Cheers, Lyude ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 7/8] dim: remove integration-tree remotes
With the remotes stored in nightly.conf and git worktrees we can avoid hard-coding them in even more places. Signed-off-by: Daniel Vetter--- dim | 12 1 file changed, 12 deletions(-) diff --git a/dim b/dim index 7e3708599943..92841b046c2c 100755 --- a/dim +++ b/dim @@ -80,8 +80,6 @@ today=`date +%Y-%m-%d` drm_intel_ssh=ssh://git.freedesktop.org/git/drm-intel drm_intel_git=git://anongit.freedesktop.org/drm-intel drm_upstream_git=git://people.freedesktop.org/~airlied/linux -sound_upstream_git=git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git -driver_core_upstream_git=git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git linux_upstream_git=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git # email aliases @@ -1146,16 +1144,6 @@ function dim_setup else remote=`get_remote_name $drm_upstream_git` fi - if git remote | grep sound-upstream > /dev/null ; then - git config remote.sound-upstream.url $sound_upstream_git - else - remote=`get_remote_name $sound_upstream_git` - fi - if git remote | grep driver-core-upstream > /dev/null ; then - git config remote.driver-core-upstream.url $driver_core_upstream_git - else - remote=`get_remote_name $driver_core_upstream_git` - fi echo "dim setup successfully completed!" } -- 2.9.3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 4/8] dim: support git worktree for aux checkouts
If available by default. This saves quite a pile of disk-space that imo making it the default is justified. Note that this will break the rebuild-nightly script for now, follow-up patches will fix that. Signed-off-by: Daniel Vetter--- dim | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/dim b/dim index d911ed21777a..7addd0d29696 100755 --- a/dim +++ b/dim @@ -1067,15 +1067,24 @@ function setup_aux_checkout # name remote echo "Setting up $dir ..." if [ ! -d $dir ]; then - git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir - cd $dir - git config remote.origin.url $remote_url - echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates - git repack -a -d -l - remote=origin + if git help worktree &> /dev/null ; then + cd $DIM_PREFIX/$DIM_DRM_INTEL + remote=`get_remote_name $remote_url` + if ! git branch | grep $name > /dev/null ; then + git branch --track $name $remote/$name + fi + git worktree add ../$dir $name + else + git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir + cd $dir + git config remote.origin.url $remote_url + echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates + git repack -a -d -l + remote=origin + fi else cd $dir - remote=`get_remote_name $drm_intel_ssh` + remote=`get_remote_name $remote_url` fi if ! git branch | grep $name > /dev/null ; then git checkout -t $remote/$name -- 2.9.3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 6/8] dim: autodetect branches in rebuild-nightly
Needs new url-mapping information in nightly.conf to work properly. Signed-off-by: Daniel Vetter--- dim | 48 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/dim b/dim index 3bd5416327a8..7e3708599943 100755 --- a/dim +++ b/dim @@ -230,20 +230,30 @@ function dim_commit_add_tag done } +function map_nightly_remote +{ + local nightly_remote=$1 + local remote_url=`eval echo "\\\$nightly_remote_url_${nightly_remote/-/_}"` + + get_remote_name $remote_url +} + function update_linux_next { cd $DIM_PREFIX/drm-intel-nightly + local nightly_origin=`map_nightly_remote origin` + # always update drm-intel-fixes echo -n "Pushing drm-intel-fixes to for-linux-next-fixes... " - git push $DRY_RUN origin +origin/drm-intel-fixes:for-linux-next-fixes >& /dev/null + git push $DRY_RUN $nightly_origin +$nightly_origin/drm-intel-fixes:for-linux-next-fixes >& /dev/null echo "Done." - if git merge-base --is-ancestor origin/drm-intel-next-fixes origin/drm-intel-fixes ; then + if git merge-base --is-ancestor $nightly_origin/drm-intel-next-fixes $nightly_origin/drm-intel-fixes ; then # -fixes has caught up to dinf, i.e. we're out of the merge # window. Push the next queue. echo -n "Out of merge window. Pushing drm-intel-next-queued to for-linux-next... " - git push $DRY_RUN origin +origin/drm-intel-next-queued:for-linux-next >& /dev/null + git push $DRY_RUN $nightly_origin +$nightly_origin/drm-intel-next-queued:for-linux-next >& /dev/null echo "Done." else # dinf is ahead of -fixes, i.e. drm-next has already closed for @@ -251,7 +261,7 @@ function update_linux_next # for the current -next cycle. Push dinf echo -n "Pushing drm-intel-next-fixes to for-linux-next... " - git push $DRY_RUN origin +origin/drm-intel-next-fixes:for-linux-next >& /dev/null + git push $DRY_RUN $nightly_origin +$nightly_origin/drm-intel-next-fixes:for-linux-next >& /dev/null echo "Done." fi } @@ -267,11 +277,20 @@ function check_conflicts true } +function rr_cache_dir +{ + if [ -d $DIM_PREFIX/drm-intel-nightly/.git/rr-cache/ ] ; then + echo $DIM_PREFIX/drm-intel-nightly/.git/rr-cache/ + else + echo $DIM_PREFIX/$DIM_DRM_INTEL/.git/rr-cache/ + fi +} + function update_rerere_cache { cd $DIM_PREFIX/drm-intel-rerere/ git pull - cp rr-cache/* $DIM_PREFIX/drm-intel-nightly/.git/rr-cache/ -r + cp rr-cache/* `rr_cache-dir` -r cd - } @@ -302,9 +321,10 @@ function dim_rebuild_nightly fi for remote in $(echo $nightly_branches | tr " " "\n" | sed 's|/.*$||g' | sort -u); do - echo -n "Fetching $remote... " + local nightly_remote=`map_nightly_remote $remote` + echo -n "Fetching $remote (as $nightly_remote) ... " # git fetch returns 128 if there's nothing to be fetched - git fetch $remote >& /dev/null || true + git fetch $nightly_remote >& /dev/null || true echo "Done." done @@ -324,12 +344,14 @@ function dim_rebuild_nightly if [[ -n $sha1 ]] ; then echo -n "Using override sha1: $sha1... " else - sha1=$branch + local remote=${branch%%/*} + local nightly_remote=`map_nightly_remote $remote` + sha1=`echo $branch | sed -e s/^$remote/$nightly_remote/` fi if [ $first == 1 ] ; then + git reset --hard $sha1 &> /dev/null echo "Reset. Done." - git reset --hard $sha1 >& /dev/null first=0 elif git merge --rerere-autoupdate --ff-only $sha1 >& /dev/null ; then # nothing to do if just fast-forward @@ -365,14 +387,16 @@ function dim_rebuild_nightly git commit --quiet -m "$integration_branch: $time integration manifest" echo "Done." + local nightly_origin=`map_nightly_remote origin` + echo -n "Pushing $integration_branch... " - git push $DRY_RUN origin +HEAD >& /dev/null && echo "Done." + git push $DRY_RUN $nightly_origin +HEAD >& /dev/null && echo "Done." echo -n "Updating rerere cache... " cd $rerere if git branch | grep rerere-cache | grep '\*' >& /dev/null ; then git pull >& /dev/null - cp $DIM_PREFIX/$integration_branch/.git/rr-cache/* rr-cache -r + cp `rr_cache_dir` rr-cache -r git add *.patch >& /dev/null || true git
[Intel-gfx] [PATCH 1/8] dim: Extract TODO
Just maybe a bit more visibility, the scripts are growing. Signed-off-by: Daniel Vetter--- TODO | 27 +++ dim | 17 - qf | 11 --- 3 files changed, 27 insertions(+), 28 deletions(-) create mode 100644 TODO diff --git a/TODO b/TODO new file mode 100644 index ..ac0f27763dfa --- /dev/null +++ b/TODO @@ -0,0 +1,27 @@ +dim: +- extract the integration tree logic and make it generally useful, maybe for a + drm-integration tree ... +- Improve nightly-forget to forget a specific merge instead of just the first + dinq/dif merge. +- add option to check-patch to check stdin +- integrate ninja-check? Or too much checkers considered harmful? + https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2014-May/000554.html +- add patchwork Link: also after manually resolving conflicts in drm + apply-resolved +- pull in dim extract-tags tool from Ville +- allow dim rebuild-nightly to pull branches from local trees in dry-run mode. + This is useful to confirm a backmerge is indeed correct, by comparing the + resulting -nightly with the old one. Current the branch must be pushed out + first for rebuild-nightly to pick it up, which means the merge can't be + fixed any more. + +qf: +- get better at preventing and cleaning up a mess when switching branches + while there's still applied quilt patches around ... +- combine quilt annotate and git blame into one tool +- use the index a bit more to e.g. stage all applied quilt patches, then use + the output of git diff to refresh a quilt patch +- use git commit-tree and git write-tree in the setup code instead of the + current high-level hacks +- track/restore the topmost patch maybe? +- synchronize quilt notes in qf push and qf fetch diff --git a/dim b/dim index 5fb3a0fee7ff..57ad4fcf9767 100755 --- a/dim +++ b/dim @@ -27,23 +27,6 @@ # drm-intel-next maintainer script -# TODO -# - extract the integration tree logic and make it generally useful, maybe for a -# drm-integration tree ... -# - Improve nightly-forget to forget a specific merge instead of just the first -# dinq/dif merge. -# - add option to check-patch to check stdin -# - integrate ninja-check? Or too much checkers considered harmful? -# https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2014-May/000554.html -# - add patchwork Link: also after manually resolving conflicts in drm -# apply-resolved -# - pull in dim extract-tags tool from Ville -# - allow dim rebuild-nightly to pull branches from local trees in dry-run mode. -# This is useful to confirm a backmerge is indeed correct, by comparing the -# resulting -nightly with the old one. Current the branch must be pushed out -# first for rebuild-nightly to pick it up, which means the merge can't be -# fixed any more. - # fail on any goof-up set -e diff --git a/qf b/qf index 4e9cb03f31fe..31b9f3bae0a2 100755 --- a/qf +++ b/qf @@ -26,17 +26,6 @@ # quilt git flow script -# TODO -# - get better at preventing and cleaning up a mess when switching branches -# while there's still applied quilt patches around ... -# - combine quilt annotate and git blame into one tool -# - use the index a bit more to e.g. stage all applied quilt patches, then use -# the output of git diff to refresh a quilt patch -# - use git commit-tree and git write-tree in the setup code instead of the -# current high-level hacks -# - track/restore the topmost patch maybe? -# - synchronize quilt notes in qf push and qf fetch - # config QUILT_PREFIX=quilt/ -- 2.9.3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 8/8] dim: Split out drm-nightly.git
This is a prep step to eventually split out the drm-misc branches all into their own repo. To get there we first need to split out the integration tree mangling. Since dim doesn't auto-update and since the transition is a good reason to switch over to worktrees and it's tricky it's not scripted. The following needs to be done when dim rebuild-nightly fails: - Make sure you have the latest dim version. - Good to also check you have a recent-ish git. Latest dim supports git worktree to save on disk space needed for .git metadata. It's much more robust than the git alternates storage trick we've used thus far. Note that git worktree is still optional (but that's not a recommended setup). - Delete $DIM_PREFIX/{drm-intel-rerere,drm-intel-nightly,maintainer-tools} It's not strictly needed to kill the maintainer-tools checkout too, but might as well switch it over to git worktree too. - Make sure you don't have any branches left over for drm-intel-rerere and drm-intel-nightly anywhere (since they need to switch their remotes). - run dim setup and enjoy the new awesomeness. If it breaks, I'm guilty ;-) Signed-off-by: Daniel Vetter--- dim | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/dim b/dim index 92841b046c2c..d8f8a87b95c2 100755 --- a/dim +++ b/dim @@ -78,6 +78,7 @@ dim=$(basename $0) today=`date +%Y-%m-%d` drm_intel_ssh=ssh://git.freedesktop.org/git/drm-intel +drm_nightly_ssh=ssh://git.freedesktop.org/git/drm-nightly drm_intel_git=git://anongit.freedesktop.org/drm-intel drm_upstream_git=git://people.freedesktop.org/~airlied/linux linux_upstream_git=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git @@ -506,6 +507,8 @@ function dim_apply_next_fixes function dim_cherry_pick { + local nightly_remote=`get_remote_name $drm_nightly_ssh` + if [[ "x$1" = "x" ]]; then echo "usage: $dim $subcommand commit-ish" exit 1 @@ -514,9 +517,9 @@ function dim_cherry_pick sha_short=${sha:0:8} # need latest -nightly - git fetch $DIM_DRM_INTEL_REMOTE + git fetch $nightly_remote echo Possible fixup patches for your cherry-pick: - git log --grep=$sha_short --pretty=oneline $sha..$DIM_DRM_INTEL_REMOTE/drm-intel-nightly + git log --grep=$sha_short --pretty=oneline $sha..$nightly_remote/drm-intel-nightly $DRY git cherry-pick -s -x -e $1 } @@ -885,15 +888,17 @@ function dim_for_each_workdirs function dim_update_next { + local nightly_remote=`get_remote_name $drm_nightly_ssh` + assert_branch drm-intel-next-queued git pull --ff-only - if ! git branch --merged $DIM_DRM_INTEL_REMOTE/drm-intel-nightly | grep drm-intel-fixes &> /dev/null ; then + if ! git branch --merged $nightly_remote/drm-intel-nightly | grep drm-intel-fixes &> /dev/null ; then echo "drm-intel-fixes not merged into -nigthly, please update!" exit 2 fi - if ! git branch --merged $DIM_DRM_INTEL_REMOTE/drm-intel-nightly | grep drm-intel-next-queued &> /dev/null ; then + if ! git branch --merged $nightly_remote/drm-intel-nightly | grep drm-intel-next-queued &> /dev/null ; then echo "drm-intel-next-queued not merged into -nigthly, please update!" exit 2 fi @@ -915,6 +920,8 @@ function dim_update_next function dim_update_next_continue { + local nightly_remote=`get_remote_name $drm_nightly_ssh` + assert_branch drm-intel-next-queued git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE drm-intel-next-queued:drm-intel-next @@ -923,7 +930,7 @@ function dim_update_next_continue git push $DRY_RUN -f $DIM_DRM_INTEL_REMOTE $tag echo "Updating -testing to latest -nightly" - git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$DIM_DRM_INTEL_REMOTE/drm-intel-nightly:drm-intel-testing + git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$nightly_remote/drm-intel-nightly:drm-intel-testing $DRY git tag -f drm-intel-testing-$today $DIM_DRM_INTEL_REMOTE/drm-intel-testing $DRY git push -f $DIM_DRM_INTEL_REMOTE drm-intel-testing-$today @@ -1129,15 +1136,16 @@ function dim_setup # check remote configuration remote=`get_remote_name $linux_upstream_git` remote=`get_remote_name $drm_intel_ssh` + remote=`get_remote_name $drm_nightly_ssh` remote=`get_remote_name $drm_upstream_git` cd .. setup_aux_checkout maintainer-tools $drm_intel_ssh maintainer-tools - setup_aux_checkout rerere-cache $drm_intel_ssh drm-intel-rerere + setup_aux_checkout rerere-cache $drm_nightly_ssh drm-intel-rerere - setup_aux_checkout drm-intel-nightly $drm_intel_ssh drm-intel-nightly + setup_aux_checkout drm-intel-nightly $drm_nightly_ssh drm-intel-nightly cd drm-intel-nightly if git remote | grep drm-upstream > /dev/null
[Intel-gfx] [PATCH 5/8] dim: Nuke nightly-forget
With our proliferation of branches it's become long useless. Nowadays my MO is to revert the offending commit in the rerere-cache branch explicitly, remove drm-intel-nightly/.git/rr-cache and then re-run rebuild-nightly. That works much better, hence nuke this helper. Signed-off-by: Daniel Vetter--- TODO | 2 -- dim | 9 - 2 files changed, 11 deletions(-) diff --git a/TODO b/TODO index ac0f27763dfa..c1c6e20eb0e3 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,6 @@ dim: - extract the integration tree logic and make it generally useful, maybe for a drm-integration tree ... -- Improve nightly-forget to forget a specific merge instead of just the first - dinq/dif merge. - add option to check-patch to check stdin - integrate ninja-check? Or too much checkers considered harmful? https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2014-May/000554.html diff --git a/dim b/dim index 7addd0d29696..3bd5416327a8 100755 --- a/dim +++ b/dim @@ -390,15 +390,6 @@ function dim_rebuild_nightly update_linux_next } -function dim_nightly_forget -{ - cd $DIM_PREFIX/drm-intel-nightly - git fetch origin >& /dev/null - git reset --hard origin/drm-intel-next-queued >& /dev/null - git merge origin/drm-intel-fixes - git rerere forget -} - # push branch $1, rebuild nightly. the rest of the arguments are passed to git # push. function dim_push_branch -- 2.9.3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 2/8] dim: Autocheck for up-to-dateness
Exits script to annoy people roughly every 100th time ... Also switch to the magic @{upstream} reference, in case the remote is not called origin (which is pretty normal in case of using git worktree). Signed-off-by: Daniel Vetter--- dim | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dim b/dim index 57ad4fcf9767..192d6ee10838 100755 --- a/dim +++ b/dim @@ -176,13 +176,17 @@ function dim_uptodate exit 1 fi - if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show origin/maintainer-tools:dim |\ + if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show @{upstream}:dim |\ diff "$using" - >& /dev/null; then echo "$dim: not running upstream version of the script." >&2 exit 1 fi } +if [[ "$((`date +%s` % 100))" -eq "0" ]] ; then +dim_uptodate +fi + # get message id from file # $1 = file message_get_id () -- 2.9.3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 3/8] dim: autodetect remotes, first part for dim_setup
The goals here are multiple: - simpler configuration through autodetection - allows seamless upgrading to git worktree for the aux checkouts - eventually I want to split up drm-misc into a separate remote ... And yes this is just a start. Signed-off-by: Daniel Vetter--- dim | 112 +++- 1 file changed, 58 insertions(+), 54 deletions(-) diff --git a/dim b/dim index 192d6ee10838..d911ed21777a 100755 --- a/dim +++ b/dim @@ -187,6 +187,24 @@ if [[ "$((`date +%s` % 100))" -eq "0" ]] ; then dim_uptodate fi +function get_remote_name +{ + local remote_url=$1 + + local remote=`git remote -v | grep $remote_url | \ + head -n1 | sed -e 's/^\(.*\)\t.*/\1/'` + + if [[ $remote == "" ]] ; then + echo No git remote for $remote_url found in `pwd`. + echo Please set it up using + echo $ git remote add '' $remote_url + echo with a name of your choice. + exit 1 + fi + + echo $remote +} + # get message id from file # $1 = file message_get_id () @@ -1039,8 +1057,36 @@ function dim_update_branches update_rerere_cache } +function setup_aux_checkout # name remote +{ + local name=$1 + local remote_url=$2 + local dir=$3 + local remote + + echo "Setting up $dir ..." + + if [ ! -d $dir ]; then + git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir + cd $dir + git config remote.origin.url $remote_url + echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates + git repack -a -d -l + remote=origin + else + cd $dir + remote=`get_remote_name $drm_intel_ssh` + fi + if ! git branch | grep $name > /dev/null ; then + git checkout -t $remote/$name + fi + cd .. +} + function dim_setup { + local remote + if [ ! -d $DIM_PREFIX ]; then echo "please set up your repository directory with:" echo "mkdir -p $DIM_PREFIX" @@ -1057,76 +1103,34 @@ function dim_setup exit 1 fi cd $DIM_DRM_INTEL - if ! git remote -v | grep "^origin[[:space:]]" | grep $linux_upstream_git > /dev/null; then - echo "please set up remote origin for $linux_upstream_git" - exit 1 - fi - if ! git remote -v | grep "^$DIM_DRM_INTEL_REMOTE[[:space:]]" | grep $drm_intel_ssh > /dev/null; then - echo "please set up remote $DIM_DRM_INTEL_REMOTE for $drm_intel_ssh with:" - echo "git remote add $DIM_DRM_INTEL_REMOTE $drm_intel_ssh" - echo "or update your configuration." - exit 1 - fi - if ! git remote -v | grep "^$DIM_DRM_UPSTREAM_REMOTE[[:space:]]" | grep $drm_upstream_git > /dev/null; then - echo "please set up remote $DIM_DRM_UPSTREAM_REMOTE for $drm_upstream_git with:" - echo "git remote add $DIM_DRM_UPSTREAM_REMOTE $drm_upstream_git" - echo "or update your configuration." - exit 1 - fi - cd .. - echo "Setting up maintainer-tools ..." - if [ ! -d maintainer-tools ]; then - git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh maintainer-tools - fi - cd maintainer-tools - git config remote.origin.url $drm_intel_ssh - echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates - git repack -a -d -l - if ! git branch | grep maintainer-tools > /dev/null ; then - git checkout -t origin/maintainer-tools - fi - cd .. + # check remote configuration + remote=`get_remote_name $linux_upstream_git` + remote=`get_remote_name $drm_intel_ssh` + remote=`get_remote_name $drm_upstream_git` - echo "Setting up drm-intel-rerere ..." - if [ ! -d drm-intel-rerere ]; then - git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh drm-intel-rerere - fi - cd drm-intel-rerere - git config remote.origin.url $drm_intel_ssh - echo "$DIM_PREFIX/$DIM_DRM_INTEL/.git/objects" > .git/objects/info/alternates - git repack -a -d -l - if ! git branch | grep rerere-cache > /dev/null ; then - git checkout -t origin/rerere-cache - fi cd .. - echo "Setting up drm-intel-nightly ..." - if [ ! -d drm-intel-nightly ]; then - git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $drm_intel_ssh drm-intel-nightly - fi + setup_aux_checkout maintainer-tools $drm_intel_ssh maintainer-tools + + setup_aux_checkout rerere-cache $drm_intel_ssh drm-intel-rerere + + setup_aux_checkout drm-intel-nightly
[Intel-gfx] [PATCH 0/8] dim: move -nigthly into drm-nighly.git
Hi all, This is the first step to split out the drm-misc trees into their own git repo. This just moves the integration trees into drm-nightly.git. Those are separate since I really like the idea of sharing one integration tree related to gfx. Next up is teaching all the branch related dim commands to figure out the right remote. But I think it'd be good to frist roll out this change, actually splitting out drm-misc.git will then not affect any of the drm-intel committers. Cheers, Daniel Daniel Vetter (8): dim: Extract TODO dim: Autocheck for up-to-dateness dim: autodetect remotes, first part for dim_setup dim: support git worktree for aux checkouts dim: Nuke nightly-forget dim: autodetect branches in rebuild-nightly dim: remove integration-tree remotes dim: Split out drm-nightly.git TODO | 25 dim | 227 +++ qf | 11 3 files changed, 144 insertions(+), 119 deletions(-) create mode 100644 TODO -- 2.9.3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx