Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2066526ybd; Sun, 23 Jun 2019 23:42:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHN0W6NCsQVsaIZOXB1sAevMinM5vvCw/jmauN4SF6oVVtriTwWaVO8/eDQoJKlHMTtERt X-Received: by 2002:a63:9502:: with SMTP id p2mr21502056pgd.12.1561358533530; Sun, 23 Jun 2019 23:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561358533; cv=none; d=google.com; s=arc-20160816; b=ksY52RKWvIGtS2fL0o8Kh4Ldt2DuIMdPOVIbY1EZR7oKPXwfOwCLljCdgx+kyYX12u 8tDmcKtbodwfzgGQJI1CBMOCyIUmyYYsp1OQGrMqdJTK/WH5Mbuqycpd8qjs1AaQGeFC ZRsao6/Iaff5/7FTEkJlfe6N08BH+Zd9E5mpa4wZ9mB0kJ2gBn8SR02vW9nhRUhhsihD iUcmEpzBQWzjJfQnfDJaOMJb21F/Z61RlcY9ZqlsMEyq/zZhN1SQ7UCchMRbLloMZdZ6 yhShK5QdL1c3P/V4BU9+dwhyTNTKju/U519rmhiCtIAUAnXUwj5HyPC8DE5D437kgCcL VPPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=AYGF1B1wgNiWhJIprLBXwgicVsIi1OkXITZ6qkiuJPc=; b=k8j6+ixGMkQ1A50nCSCYwEOnRNR6g+FW0TOfCX5ZzWQi5HABa4zzWJb9L+1VaC7GVS sETfzoGgJSicM3Bm9/VZgKCYgRev5n2GshckbmvFsqXMxyRbAZMnHjHH4D5ne4poibn1 j2DBybyN7kKcHU37g6f3BxAGyuWn75Vz/MfW4wsmpkqIVraLYQsHmLdCeIb4r6Rrzk6U 80blcsvg7NQREiXD1s/jpPx1CEQTbdr4xgBtcx+fZOsPRToUc/2iy2bkpUjuwVYTFvsQ pjXr+KMQYoranA1bYZDR+D6PvM7Fi9WIGdecXZkLQnrXVj9spPC89PkCYJwYEd2NSrHg Wt5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t187si9455814pgc.586.2019.06.23.23.41.57; Sun, 23 Jun 2019 23:42:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726987AbfFXGe3 (ORCPT + 99 others); Mon, 24 Jun 2019 02:34:29 -0400 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]:49827 "EHLO alexa-out-blr-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726472AbfFXGe3 (ORCPT ); Mon, 24 Jun 2019 02:34:29 -0400 X-Greylist: delayed 368 seconds by postgrey-1.27 at vger.kernel.org; Mon, 24 Jun 2019 02:34:27 EDT Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 24 Jun 2019 11:57:44 +0530 X-IronPort-AV: E=McAfee;i="6000,8403,9297"; a="10448682" Received: from dhar-linux.qualcomm.com ([10.204.66.25]) by ironmsg01-blr.qualcomm.com with ESMTP; 24 Jun 2019 11:57:20 +0530 Received: by dhar-linux.qualcomm.com (Postfix, from userid 2306995) id 0BF223649; Mon, 24 Jun 2019 11:57:18 +0530 (IST) From: Shubhashree Dhar To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org Cc: Shubhashree Dhar , linux-kernel@vger.kernel.org, robdclark@gmail.com, seanpaul@chromium.org, hoegsberg@chromium.org, abhinavk@codeaurora.org, jsanka@codeaurora.org, chandanu@codeaurora.org, nganji@codeaurora.org, jshekhar@codeaurora.org Subject: drm/msm/dpu: Correct dpu encoder spinlock initialization Date: Mon, 24 Jun 2019 11:57:12 +0530 Message-Id: <1561357632-15361-1-git-send-email-dhar@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dpu encoder spinlock should be initialized during dpu encoder init instead of dpu encoder setup which is part of commit. There are chances that vblank control uses the uninitialized spinlock if not initialized during encoder init. Change-Id: I5a18b95fa47397c834a266b22abf33a517b03a4e Signed-off-by: Shubhashree Dhar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 5f085b5..22938c7 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -2195,8 +2195,6 @@ int dpu_encoder_setup(struct drm_device *dev, struct drm_encoder *enc, if (ret) goto fail; - spin_lock_init(&dpu_enc->enc_spinlock); - atomic_set(&dpu_enc->frame_done_timeout, 0); timer_setup(&dpu_enc->frame_done_timer, dpu_encoder_frame_done_timeout, 0); @@ -2250,6 +2248,7 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev, drm_encoder_helper_add(&dpu_enc->base, &dpu_encoder_helper_funcs); + spin_lock_init(&dpu_enc->enc_spinlock); dpu_enc->enabled = false; return &dpu_enc->base; -- 1.9.1