Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2350434pxb; Mon, 20 Sep 2021 19:45:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIu+a1mCpBzVMNz0hA4eB2DmB7Si+77ydgAooPZIhWyUn6K18YapbLhq6silSR3w27G8D2 X-Received: by 2002:a50:d98d:: with SMTP id w13mr16201033edj.51.1632192329182; Mon, 20 Sep 2021 19:45:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192329; cv=none; d=google.com; s=arc-20160816; b=TI7isPdzORPNS3s5lEa5WFSRNtOQz/4ZEE25TuQ7yJs4e/1b28gkxyrYP0JWqmJBBQ mofSBXQ7JA9YiaS275DmgykkxklLvZVt2TlEnlqepOB8B5zeiJIKLqd+9g8B1xtf9ROr oOhNl2l46ScdCCRG7BD1BAEkcdsGIkSL22pjQ2L9MwXLNUcfWZFUIiop21+L2X36LUHn P/Sy9LNM5FUXZ7fGy00q+xPbu/82a9r4WeuOWcy1dyMpn4CE9BnT+R/zNqVWyMVOtqC5 hjyhUHrP6u3ZpKWD3wh8sf2/O59EBOB0OzVbDHNPrkIb8d3PG81OEXtFJV/XDcwSissI v0dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Xso133cpFJsRMAjmbCAGmjCOs9Ttg5hHJ/aC8hlILCI=; b=LCJXgEb4oe878InvUScuePyPj7gSW19DC4dkZyF0iRwY4+HGLbNRAhJFSIqzTXHXhz gTjjYI+QBJ3x9G/+/JkG1uPD4WCfoXWc9qmd0UisilxjAqUZ+I49AhGQdX52m5ONwO5w ZIeu63Us+egIbD8QK7DGFLW24ZTSXhjoQc00ZJXyP1yaTPZ8Oa/EzgOkaLH9UnGdBqcU YIju/P9E91Tzs0y1p7Sctyux0kCv4cavuB5zPKkRrAaerkms2dEIkAmQ4ZAS2hpvysbQ vpH0mP8kT+S4AZepfH/5ZPqH/xf7z2JKZOfXOdO8XvNftw51SdeYhkWCmJTxVDNgEtRV 42kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hTWHOGdf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t26si4547750edi.360.2021.09.20.19.45.05; Mon, 20 Sep 2021 19:45:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hTWHOGdf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352102AbhITSYJ (ORCPT + 99 others); Mon, 20 Sep 2021 14:24:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:40368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359525AbhITSQR (ORCPT ); Mon, 20 Sep 2021 14:16:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F62161A87; Mon, 20 Sep 2021 17:22:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158521; bh=Qs+rCZgSbeIX30we6YkEYJZERXgavSYfK3BMtfypwMU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hTWHOGdfPubqLGuCnlj12jshzGdx4IoS4xWuFpxf1ZlA+W2Wz/ofgUdTWuAc3XMcg zcAB0KmqDBq3MIGONQQ7c2ZOyYSz8LqEqJEUWfKsQYpfjB0R9GjWQQgRtnw1qh1eNw 9bqq/llXASqrpOLvdR64yCYOuDeI0/7tU9YBygl4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Heidelberg , Rob Clark Subject: [PATCH 5.4 187/260] drm/msi/mdp4: populate priv->kms in mdp4_kms_init Date: Mon, 20 Sep 2021 18:43:25 +0200 Message-Id: <20210920163937.468950314@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Heidelberg commit cb0927ab80d224c9074f53d1a55b087d12ec5a85 upstream. Without this fix boot throws NULL ptr exception at msm_dsi_manager_setup_encoder on devices like Nexus 7 2013 (MDP4 v4.4). Fixes: 03436e3ec69c ("drm/msm/dsi: Move setup_encoder to modeset_init") Cc: Signed-off-by: David Heidelberg Link: https://lore.kernel.org/r/20210811170631.39296-1-david@ixit.cz Signed-off-by: Rob Clark Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c @@ -405,6 +405,7 @@ struct msm_kms *mdp4_kms_init(struct drm { struct platform_device *pdev = to_platform_device(dev->dev); struct mdp4_platform_config *config = mdp4_get_config(pdev); + struct msm_drm_private *priv = dev->dev_private; struct mdp4_kms *mdp4_kms; struct msm_kms *kms = NULL; struct msm_gem_address_space *aspace; @@ -419,7 +420,8 @@ struct msm_kms *mdp4_kms_init(struct drm mdp_kms_init(&mdp4_kms->base, &kms_funcs); - kms = &mdp4_kms->base.base; + priv->kms = &mdp4_kms->base.base; + kms = priv->kms; mdp4_kms->dev = dev;