From patchwork Wed Aug 14 18:46:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 171355 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1203773ily; Wed, 14 Aug 2019 11:48:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5VzlkbkcjFv958yZ1aQwtARR9F8W+tsv2NY6bDubYBXmokOpPkMHfrupuc4GUTxsggPzQ X-Received: by 2002:a63:f941:: with SMTP id q1mr506116pgk.350.1565808483037; Wed, 14 Aug 2019 11:48:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565808483; cv=none; d=google.com; s=arc-20160816; b=BzjN/w8DJpeCyJ4bxBy+RTHsDMoU0mFlAFSv5jeYsc/o4Ho9iEUFvbgeAyiKQYW4ik yVssmozD5gRdSZ2mb7IS7IH8v/v+ZEiDvyBbSuoQpb8m9YRQZNY93BChZZMMlXyGWF9F q7YjZPphnCTCv50nSecNC3PKXPlDf1wwe2/B5DZ0g9EuenzXAEKV/AugxEcWJheuwmhX 5niNQo5dZnSjFyYc1QsYmTMH4szs30k50NWz0BKmvBt4+1eBLBaGC5lyWMFEjIWgo0Gu pCGMe4KTwt1rNyd9nShPjIE/1zP38s+/FEmpujEqG14HlIE4y9b+lKOYbIeWaQJRbMsp nu1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=LsxdKXlIE7uZ+/6eqxu7c+cok0i20/tbrH/8RDl0m7Y=; b=gHuCeekHw2phSH780TcoTcaCzav1P5R1OBEX/LEfewTRG6LRTEM3VKA9HI1x2el6k4 N8W/gVPzpLdz3jBs76/a8nbuDh5FOaE9zHk2LQJ42E+wwl/Mfx/ACWaM2Kv+Oss+XYwU 6+e+HmFsjyVzOK36+aKm0oXmEB0JoUSQfmDflgjGBMyafHWQQXTj0XmMc4qM3rn1MOcb ngGztRa+ND+3C8lcyKAc10EqwQ9Hn3iXP0OCTHqa5nnK03dieme9BPmPD4wS9I5qXLy9 TfcTttFU/BzaLl5wDJyeh9iQFtHdkArOVbpLLJ4DuwLgcqmfjRLv7HfTfMExZkRItKNN O1gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=phHUUaiC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p8si260052pff.37.2019.08.14.11.48.02; Wed, 14 Aug 2019 11:48:03 -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; dkim=pass header.i=@linaro.org header.s=google header.b=phHUUaiC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728533AbfHNSrp (ORCPT + 28 others); Wed, 14 Aug 2019 14:47:45 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39319 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729529AbfHNSrm (ORCPT ); Wed, 14 Aug 2019 14:47:42 -0400 Received: by mail-pl1-f193.google.com with SMTP id z3so4259326pln.6 for ; Wed, 14 Aug 2019 11:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LsxdKXlIE7uZ+/6eqxu7c+cok0i20/tbrH/8RDl0m7Y=; b=phHUUaiCNqUXb2OQDy2PL5HiT4EhT3jgLrPghrja3apIV/sP47ECUK+syGDP5dxS4A u+j4PGs/2h04W3SConQAkYMRWPkN+ePriNra7FScCzMkt73oDq1S0URnJY56t67cEP8L 6Kde0bxm6ML74X5v2uYA4015JBOAg83kGePtdvjL3cba7JLAtSvNzHe++HBCOCCTGQ7M SdC5xiGI5kyWlBMRbN+p0GHUTH0QG9Kgu13fRBviu4FHdV9f6YQcgZcIwfyqaPamriYd cEKPVXU80fB+TBz/Yiz15pMIdJJF1l+oRZmcJ68sbU8zBUbcVVaqT7RShmx2KXd9TI3D cE3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LsxdKXlIE7uZ+/6eqxu7c+cok0i20/tbrH/8RDl0m7Y=; b=jzXlCrxNQ8ftwOw8uC439sK4cvANaf1ADpTHCuBrdnRbgC1uXpimfUKUFydgwagVeF 7cApsxAkb516uZHbXjdVVdiNfQMV93ym+yAG3PjAx8dHsADjsh9gSwwXQN3jSHJW9owv pEIW8NtKFwdKWHnSnUMAOnHhdCFRg0t2VCXunkoOfx5ClLD+0XmB+2kpOJyE/ZgPR0ev khiUOyNrgcKThp6w1jfySauJW0WRJ6dPrP5rPE2PwY++4HYaLDES+YjlmskjbSoiy52/ qSZKF8fhfXLNUTNVxpPuBjTgasY4sZVQnu9tj9pVGZMXBULYJoiPY0ugoJw5b5efGpOx R9QQ== X-Gm-Message-State: APjAAAX2N2vtL6ez7C9D19qTACNvPeLseMtjRHpFqStZHn4SOBefWrHo IVxgig/o1h2+UopEp9eNnrnm8BKuetY= X-Received: by 2002:a17:902:2f24:: with SMTP id s33mr734052plb.314.1565808461082; Wed, 14 Aug 2019 11:47:41 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id y16sm610855pfc.36.2019.08.14.11.47.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 14 Aug 2019 11:47:40 -0700 (PDT) From: John Stultz To: lkml Cc: Xu YiPing , Rongrong Zou , Xinliang Liu , David Airlie , Daniel Vetter , dri-devel , Sam Ravnborg , John Stultz Subject: [RESEND][PATCH v3 22/26] drm: kirin: Fix dev->driver_data setting Date: Wed, 14 Aug 2019 18:46:58 +0000 Message-Id: <20190814184702.54275-23-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190814184702.54275-1-john.stultz@linaro.org> References: <20190814184702.54275-1-john.stultz@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xu YiPing As part of refactoring the kirin driver to better support different hardware revisions, this patch changes the dev->driver_data to point to a drm_device, not ade_data. Thus we set the driver data to drm device after alloc. Cc: Rongrong Zou Cc: Xinliang Liu Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel Cc: Sam Ravnborg Reviewed-by: Sam Ravnborg Signed-off-by: Xu YiPing [jstultz: Reworded commit message] Signed-off-by: John Stultz --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 0bdcac981d8b..09dc2c07533d 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -998,7 +998,6 @@ static int ade_drm_init(struct platform_device *pdev) DRM_ERROR("failed to alloc ade_data\n"); return -ENOMEM; } - platform_set_drvdata(pdev, ade); ctx = ade_hw_ctx_alloc(pdev, &ade->crtc.base); if (IS_ERR(ctx)) { diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index 1c9658e9565e..f1853b84ab58 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -43,8 +43,6 @@ static int kirin_drm_kms_init(struct drm_device *dev) { int ret; - dev_set_drvdata(dev->dev, dev); - /* dev->mode_config initialization */ drm_mode_config_init(dev); dev->mode_config.min_width = 0; @@ -139,6 +137,7 @@ static int kirin_drm_bind(struct device *dev) drm_dev = drm_dev_alloc(driver_data->driver, dev); if (IS_ERR(drm_dev)) return PTR_ERR(drm_dev); + dev_set_drvdata(dev, drm_dev); ret = kirin_drm_kms_init(drm_dev); if (ret)