From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BC1CECAAD5 for ; Tue, 6 Sep 2022 16:46:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbiIFQqK (ORCPT ); Tue, 6 Sep 2022 12:46:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237818AbiIFQpf (ORCPT ); Tue, 6 Sep 2022 12:45:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 351A26D566 for ; Tue, 6 Sep 2022 09:25:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BC770B8190D for ; Tue, 6 Sep 2022 16:25:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19859C433C1; Tue, 6 Sep 2022 16:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662481529; bh=6C/lamlPqxrzNNBi6SXQ1069Kmm1yvenbzktxkyeNs0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y0jQnAnjJa2sx2VodrEZgbojnaO1HIvBiMG/X+J7YYsnkAMeRedFhpUDfpSXZ/R9N aqAXNd6gmQUy+r5dj4fItM5mxjzQPZ4xZ+5aO9AfBak8XieFhWQzPFtMkaajEhyunk mbbG61e4+2xbsHwpxvwarcEJ7d8ypAoDjGitI59MS/zHsiXwjYs9jgcH5Fegr5SzjO Qe/S7giOYItujrt9kQ2KaJQHvvvcOONef2HmAG6jP6O39EXJSLY87pOASPFXRYDrk1 Mwj17z/+25Iz5b0pNX62Q4ZOC0l6IV5VX5jmVzYxJS8zpr4aQooW1Xl+3LlK9Brsfj PlNZjSyJ1Torw== Date: Tue, 6 Sep 2022 09:25:27 -0700 From: Nathan Chancellor To: kernel test robot Cc: Arun R Murthy , llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: drivers/gpu/drm/i915/display/intel_display.c:7539:3: warning: unannotated fall-through between switch labels Message-ID: References: <202209061654.YJExKpEK-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202209061654.YJExKpEK-lkp@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 06, 2022 at 04:28:30PM +0800, kernel test robot wrote: > tree: https://github.com/intel-lab-lkp/linux/commits/UPDATE-20220906-121942/Arun-R-Murthy/drm-i915-Support-Async-Flip-on-Linear-buffers/20220426-200801 > head: 1e44191e6045780c15f33c16961af128c076bd4c > commit: 1e44191e6045780c15f33c16961af128c076bd4c drm/i915: Support Async Flip on Linear buffers > date: 4 hours ago > config: i386-randconfig-a004 > compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/1e44191e6045780c15f33c16961af128c076bd4c > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review UPDATE-20220906-121942/Arun-R-Murthy/drm-i915-Support-Async-Flip-on-Linear-buffers/20220426-200801 > git checkout 1e44191e6045780c15f33c16961af128c076bd4c > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/i915/ > > If you fix the issue, kindly add following tag where applicable > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > >> drivers/gpu/drm/i915/display/intel_display.c:7539:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > case I915_FORMAT_MOD_X_TILED: > ^ > drivers/gpu/drm/i915/display/intel_display.c:7539:3: note: insert 'break;' to avoid fall-through > case I915_FORMAT_MOD_X_TILED: > ^ > break; > 1 warning generated. > > > vim +7539 drivers/gpu/drm/i915/display/intel_display.c > > b0b2bed2a1305c Ville Syrjälä 2022-02-14 7458 > b0b2bed2a1305c Ville Syrjälä 2022-02-14 7459 static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct intel_crtc *crtc) > 30ff93af9e19db Karthik B S 2020-09-21 7460 { > 30ff93af9e19db Karthik B S 2020-09-21 7461 struct drm_i915_private *i915 = to_i915(state->base.dev); > 30ff93af9e19db Karthik B S 2020-09-21 7462 const struct intel_crtc_state *old_crtc_state, *new_crtc_state; > 30ff93af9e19db Karthik B S 2020-09-21 7463 const struct intel_plane_state *new_plane_state, *old_plane_state; > 30ff93af9e19db Karthik B S 2020-09-21 7464 struct intel_plane *plane; > 30ff93af9e19db Karthik B S 2020-09-21 7465 int i; > 30ff93af9e19db Karthik B S 2020-09-21 7466 > 0826edb6a5e5b3 José Roberto de Souza 2021-10-29 7467 old_crtc_state = intel_atomic_get_old_crtc_state(state, crtc); > 0826edb6a5e5b3 José Roberto de Souza 2021-10-29 7468 new_crtc_state = intel_atomic_get_new_crtc_state(state, crtc); > 0826edb6a5e5b3 José Roberto de Souza 2021-10-29 7469 > b0b2bed2a1305c Ville Syrjälä 2022-02-14 7470 if (!new_crtc_state->uapi.async_flip) > b0b2bed2a1305c Ville Syrjälä 2022-02-14 7471 return 0; > b0b2bed2a1305c Ville Syrjälä 2022-02-14 7472 > 6b4e414ce8dab7 Ville Syrjälä 2022-02-14 7473 if (!new_crtc_state->hw.active) { > 6b4e414ce8dab7 Ville Syrjälä 2022-02-14 7474 drm_dbg_kms(&i915->drm, > 6b4e414ce8dab7 Ville Syrjälä 2022-02-14 7475 "[CRTC:%d:%s] not active\n", > 6b4e414ce8dab7 Ville Syrjälä 2022-02-14 7476 crtc->base.base.id, crtc->base.name); > 30ff93af9e19db Karthik B S 2020-09-21 7477 return -EINVAL; > 30ff93af9e19db Karthik B S 2020-09-21 7478 } > 30ff93af9e19db Karthik B S 2020-09-21 7479 > 6b4e414ce8dab7 Ville Syrjälä 2022-02-14 7480 if (intel_crtc_needs_modeset(new_crtc_state)) { > 6b4e414ce8dab7 Ville Syrjälä 2022-02-14 7481 drm_dbg_kms(&i915->drm, > 6b4e414ce8dab7 Ville Syrjälä 2022-02-14 7482 "[CRTC:%d:%s] modeset required\n", > 6b4e414ce8dab7 Ville Syrjälä 2022-02-14 7483 crtc->base.base.id, crtc->base.name); > 30ff93af9e19db Karthik B S 2020-09-21 7484 return -EINVAL; > 30ff93af9e19db Karthik B S 2020-09-21 7485 } > 6b4e414ce8dab7 Ville Syrjälä 2022-02-14 7486 > 30ff93af9e19db Karthik B S 2020-09-21 7487 if (old_crtc_state->active_planes != new_crtc_state->active_planes) { > 30ff93af9e19db Karthik B S 2020-09-21 7488 drm_dbg_kms(&i915->drm, > 6b4e414ce8dab7 Ville Syrjälä 2022-02-14 7489 "[CRTC:%d:%s] Active planes cannot be in async flip\n", > 6b4e414ce8dab7 Ville Syrjälä 2022-02-14 7490 crtc->base.base.id, crtc->base.name); > 30ff93af9e19db Karthik B S 2020-09-21 7491 return -EINVAL; > 30ff93af9e19db Karthik B S 2020-09-21 7492 } > 30ff93af9e19db Karthik B S 2020-09-21 7493 > 30ff93af9e19db Karthik B S 2020-09-21 7494 for_each_oldnew_intel_plane_in_state(state, plane, old_plane_state, > 30ff93af9e19db Karthik B S 2020-09-21 7495 new_plane_state, i) { > 0826edb6a5e5b3 José Roberto de Souza 2021-10-29 7496 if (plane->pipe != crtc->pipe) > 0826edb6a5e5b3 José Roberto de Souza 2021-10-29 7497 continue; > 0826edb6a5e5b3 José Roberto de Souza 2021-10-29 7498 > 30ff93af9e19db Karthik B S 2020-09-21 7499 /* > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7500 * Only async flip capable planes should be in the state > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7501 * if we're really about to ask the hardware to perform > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7502 * an async flip. We should never get this far otherwise. > 30ff93af9e19db Karthik B S 2020-09-21 7503 */ > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7504 if (drm_WARN_ON(&i915->drm, > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7505 new_crtc_state->do_async_flip && !plane->async_flip)) > 30ff93af9e19db Karthik B S 2020-09-21 7506 return -EINVAL; > 30ff93af9e19db Karthik B S 2020-09-21 7507 > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7508 /* > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7509 * Only check async flip capable planes other planes > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7510 * may be involved in the initial commit due to > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7511 * the wm0/ddb optimization. > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7512 * > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7513 * TODO maybe should track which planes actually > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7514 * were requested to do the async flip... > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7515 */ > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7516 if (!plane->async_flip) > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7517 continue; > 2e08437160d1e8 Ville Syrjälä 2022-02-14 7518 > 30ff93af9e19db Karthik B S 2020-09-21 7519 /* > 30ff93af9e19db Karthik B S 2020-09-21 7520 * FIXME: This check is kept generic for all platforms. > 244dba4cb59637 Lucas De Marchi 2021-07-28 7521 * Need to verify this for all gen9 platforms to enable > 30ff93af9e19db Karthik B S 2020-09-21 7522 * this selectively if required. > 30ff93af9e19db Karthik B S 2020-09-21 7523 */ > 30ff93af9e19db Karthik B S 2020-09-21 7524 switch (new_plane_state->hw.fb->modifier) { > 1e44191e604578 Arun R Murthy 2022-09-06 7525 case DRM_FORMAT_MOD_LINEAR: > 1e44191e604578 Arun R Murthy 2022-09-06 7526 /* > 1e44191e604578 Arun R Murthy 2022-09-06 7527 * FIXME: Async on Linear buffer is supported on ICL as > 1e44191e604578 Arun R Murthy 2022-09-06 7528 * but with additional alignment and fbc restrictions > 1e44191e604578 Arun R Murthy 2022-09-06 7529 * need to be taken care of. These aren't applicable for > 1e44191e604578 Arun R Murthy 2022-09-06 7530 * gen12+. > 1e44191e604578 Arun R Murthy 2022-09-06 7531 */ > 1e44191e604578 Arun R Murthy 2022-09-06 7532 if (DISPLAY_VER(i915) < 12) { > 1e44191e604578 Arun R Murthy 2022-09-06 7533 drm_dbg_kms(&i915->drm, > 1e44191e604578 Arun R Murthy 2022-09-06 7534 "[PLANE:%d:%s] Modifier does not support async flips\n", > 1e44191e604578 Arun R Murthy 2022-09-06 7535 plane->base.base.id, plane->base.name); > 1e44191e604578 Arun R Murthy 2022-09-06 7536 return -EINVAL; > 1e44191e604578 Arun R Murthy 2022-09-06 7537 } This new case statement should have an explicit 'break' at the end per Documentation/process/deprecated.rst: All switch/case blocks must end in one of: * break; * fallthrough; * continue; * goto