From patchwork Wed Feb 19 10:21:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11390967 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C8B4930 for ; Wed, 19 Feb 2020 10:22:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5E4BC24658 for ; Wed, 19 Feb 2020 10:22:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="ir3v3waj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726270AbgBSKWT (ORCPT ); Wed, 19 Feb 2020 05:22:19 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45807 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726484AbgBSKWS (ORCPT ); Wed, 19 Feb 2020 05:22:18 -0500 Received: by mail-wr1-f65.google.com with SMTP id g3so27482379wrs.12 for ; Wed, 19 Feb 2020 02:22:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6Bml+TgDz4wJQmY4Y0AO2RIjQQM/6g6ZVi6uO1lLgNg=; b=ir3v3wajtlCr4ILbn3QkFY7+TQrLgFx5ZRWnKzIRCOzBcBy0cWrnSuvsyR7UMSzfNo WPyiyRY5rHw3+mA5WrhwF0SB3GFy8c38ZVz9qVfe3bIB6ir1dk//KmkDAjMJGJ79MmiU UnymP+61UPdw9TisDpey+V6p+jNzbxRVfP4P0= 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:mime-version:content-transfer-encoding; bh=6Bml+TgDz4wJQmY4Y0AO2RIjQQM/6g6ZVi6uO1lLgNg=; b=DlYKzyk7GoHc+Thckx2HJobDGNX1QiCxaqkWA3m5X3EH1I6sLc1oUMw8hflMYnObsw VH7adihByD7BdSm4X2/YfY3JwXGfd+L97NGsPlT1RdMd4vcyZwYRpatLUOxntu/L2X/C ZcgD5Jcj4Pgy6F3sJ9Oh0OBsqFiVABOQv9bQfQnY8bDctwYVYRbC2yRhReJvtNC4IDSQ wn1ah0Zx9Q47Iwxq5zaFB5istCz/0tRSu71fqwlfeteDLIdNqul9zuXkEAR1Ou5vq4YY Qoz/iZ/P4+grE9Wnmz/9xcaZuXiEs8pwFWBTYOJN3A1nSvGty5EyALnM82rYzhj98LSS DuJQ== X-Gm-Message-State: APjAAAX5gbdEtY9Ui4dUlzx68HRQoqaykc5Jqe6YTypVB+wHF4oQNdfw n5Fh6bQHCfSMVYLzhBq0P19baw== X-Google-Smtp-Source: APXvYqyFLn/iv1hus4X3HQJntx7j4Ea6eI8toIqgHSqju1nZFaJhtuHG7/Wo/6j5JXhJDOzdm+HWfg== X-Received: by 2002:adf:eec3:: with SMTP id a3mr33086987wrp.337.1582107735503; Wed, 19 Feb 2020 02:22:15 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s23sm2370339wra.15.2020.02.19.02.22.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 02:22:14 -0800 (PST) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , Daniel Vetter , Daniel Vetter , Laurent Pinchart , Kieran Bingham , linux-renesas-soc@vger.kernel.org Subject: [PATCH 37/52] drm/rcar-du: Drop explicit drm_mode_config_cleanup call Date: Wed, 19 Feb 2020 11:21:07 +0100 Message-Id: <20200219102122.1607365-38-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> References: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org It's right above the drm_dev_put(). Aside: Another driver with a bit much devm_kzalloc, which should probably use drmm_kzalloc instead ... Signed-off-by: Daniel Vetter Cc: Laurent Pinchart Cc: Kieran Bingham Cc: linux-renesas-soc@vger.kernel.org Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_kms.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index 654e2dd08146..3e67cf70f040 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c @@ -530,7 +530,6 @@ static int rcar_du_remove(struct platform_device *pdev) drm_dev_unregister(ddev); drm_kms_helper_poll_fini(ddev); - drm_mode_config_cleanup(ddev); drm_dev_put(ddev); diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c index fcfd916227d1..dcdc1580b511 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c @@ -712,7 +712,9 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu) unsigned int i; int ret; - drm_mode_config_init(dev); + ret = drm_mode_config_init(dev); + if (ret) + return ret; dev->mode_config.min_width = 0; dev->mode_config.min_height = 0; From patchwork Wed Feb 19 10:21:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11390973 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AC448930 for ; Wed, 19 Feb 2020 10:22:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C7482464E for ; Wed, 19 Feb 2020 10:22:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="S8G+9qla" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726497AbgBSKWW (ORCPT ); Wed, 19 Feb 2020 05:22:22 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39124 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726484AbgBSKWW (ORCPT ); Wed, 19 Feb 2020 05:22:22 -0500 Received: by mail-wm1-f68.google.com with SMTP id c84so6137741wme.4 for ; Wed, 19 Feb 2020 02:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ra/jYUSiXamgYu/JamVQr8pWXrAQtMQY8c7jRMMc6pY=; b=S8G+9qlagL5yIxvDS2Cmne8waOo0yaG0iNuzqxZupk4N2TnpZOeD9Y+aBIzJ89UiyC yMXxqMPId9KcRWO43mwxgBpTIwZx/8M+Ez3vr0pbRlhmimOiJemxIuG0PsCnUqm+hYYV hasVGlBcvKMJ2cVFWasJDiqAsucEUXpFD26Zw= 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:mime-version:content-transfer-encoding; bh=Ra/jYUSiXamgYu/JamVQr8pWXrAQtMQY8c7jRMMc6pY=; b=EMmRX0ecoj+VdfriBWWRVLXgfk0Gaeg/JcU8RKopHHqZJacl12roeJa6FsbIoln+CW JjGBftmOQsV2iCqPhS6eNWoPXWbLKJPJoTHIovPONdHIOgoFfiJO+yp0qMb84FZnIpx1 bS2lCsZIugzmufAsnQjHg4q1dQavZQN8NLi8v/2uoKUyfnntBQGNyvlz2tdrU0obsHHG JPJjyln5fsAaNhvBhmPyfiptvaZIOu4LpUpBB4X+dEc+xta0qVrvhWSn21dKq1ZbdX9i qO3hjz6ulGy2KHDSoCi/DKcOB29epAb2LcLLayveM1rtoPUwHXXOKzLEKJ0kXzZnya90 1jiw== X-Gm-Message-State: APjAAAUEUjhqcpuMLWpirJOT5MeP4YTHwVObPV9J1tPu+5rR28kBK2Xk blwYBTzSJJEfZ76mVpA4gT+GKA== X-Google-Smtp-Source: APXvYqyXrsEWE44mHqV6H9DQnZaeWEEjB0A4IvWm1mBkRUT8/uZfDnbxEm/1kdjWKDQVjddy+Vgj8A== X-Received: by 2002:a7b:c3d1:: with SMTP id t17mr9100246wmj.27.1582107739143; Wed, 19 Feb 2020 02:22:19 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s23sm2370339wra.15.2020.02.19.02.22.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 02:22:18 -0800 (PST) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , Daniel Vetter , Daniel Vetter , Laurent Pinchart , Kieran Bingham , linux-renesas-soc@vger.kernel.org Subject: [PATCH 40/52] drm/shmob: Drop explicit drm_mode_config_cleanup call Date: Wed, 19 Feb 2020 11:21:10 +0100 Message-Id: <20200219102122.1607365-41-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> References: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org It's right above the drm_dev_put(). Aside: Another driver with a bit much devm_kzalloc, which should probably use drmm_kzalloc instead ... Signed-off-by: Daniel Vetter Cc: Laurent Pinchart Cc: Kieran Bingham Cc: linux-renesas-soc@vger.kernel.org Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 2 -- drivers/gpu/drm/shmobile/shmob_drm_kms.c | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c index b8c0930959c7..ae9d6b8d3ca8 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c @@ -192,7 +192,6 @@ static int shmob_drm_remove(struct platform_device *pdev) drm_dev_unregister(ddev); drm_kms_helper_poll_fini(ddev); - drm_mode_config_cleanup(ddev); drm_irq_uninstall(ddev); drm_dev_put(ddev); @@ -288,7 +287,6 @@ static int shmob_drm_probe(struct platform_device *pdev) drm_irq_uninstall(ddev); err_modeset_cleanup: drm_kms_helper_poll_fini(ddev); - drm_mode_config_cleanup(ddev); err_free_drm_dev: drm_dev_put(ddev); diff --git a/drivers/gpu/drm/shmobile/shmob_drm_kms.c b/drivers/gpu/drm/shmobile/shmob_drm_kms.c index c51197b6fd85..e6e34bb75ba0 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_kms.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_kms.c @@ -126,7 +126,11 @@ static const struct drm_mode_config_funcs shmob_drm_mode_config_funcs = { int shmob_drm_modeset_init(struct shmob_drm_device *sdev) { - drm_mode_config_init(sdev->ddev); + int ret; + + ret = drm_mode_config_init(sdev->ddev); + if (ret) + return ret; shmob_drm_crtc_create(sdev); shmob_drm_encoder_create(sdev);