From patchwork Thu Mar 29 10:40:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 132561 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1577588ljb; Thu, 29 Mar 2018 03:40:49 -0700 (PDT) X-Google-Smtp-Source: AIpwx49w+RbWA9/NzMmD67pf4QciSCtLPy99xuBPPN9o9sOI+V2/ki5qT8z0OzCaQ3SOp+uH3+sG X-Received: by 2002:a17:902:aa86:: with SMTP id d6-v6mr6167103plr.375.1522320048993; Thu, 29 Mar 2018 03:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522320048; cv=none; d=google.com; s=arc-20160816; b=XsJwxZh6WvjxsWxTbuDDXe+qfgMPqI6nAPXFG0gdegutfsClOhBPYXLBPYeOc3WBps tNKjzRA/b7i5540idwphCPb8L06YzRMeyM7eVjZflNxHY3BG217I30raJN5P/B14ZRyy V7KqabnDkFUjrsuB8yRh3I6EKoCC0qnNfuxbKWJVRoZa+Ff/x4Vxa+MGhDtePCke8t10 DdrWQdYqlNaaY7fyuiSzzbqZyQwUNSnrwZKm0C9JGK84taVS/mlogZATJr/Ooq7i4pG/ WZbUgkAeiuorqCKtolfZ5l9yqu3HqYjnMrETRCqrF0C3qX/A98cYg5kIGtMp0QdrkOe4 LlcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=CSX46dT/Iq3dLaqG0OHtkH7AexLTBiqcCU6PbXKDG0U=; b=MGzu/Vm5eD8wyw8CHTXOSh50B6Y/wEv4WDcUNJLKa8cVnG9DBKwJN+pkq+fvH5X3sW ZHjZg0dLMeTDVTbs61nzHAKWyetKVMfh3xDhKyqq1hP9+M/dMHB1vT9ICWovsHsBBdjm Nomgag247iC8v8nMSSWYBJXVjkYkcli+zEtbNpuTG72wTp4RMmKo9F8lbQ2Agz3RkHkX YVE06K3uv4P72B3qMkDobICWgZsn8NeVTH1KijbBHvRRtmedu6EdJLovG+lDy2FTJUJj JQPd4L9k0uPbmM2eUFgk+CEpHWIxvMS+S5RFhlytTrtXpIb/Gd58ONUpaO6aPTfnXlr4 /Hkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=GfgNbFLi; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id y11si2348375pfk.380.2018.03.29.03.40.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Mar 2018 03:40:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=GfgNbFLi; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 760DD6E6AD; Thu, 29 Mar 2018 10:40:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by gabe.freedesktop.org (Postfix) with ESMTPS id 582A96E6AD for ; Thu, 29 Mar 2018 10:40:44 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w2TAegab000860; Thu, 29 Mar 2018 05:40:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1522320042; bh=fi6QRLniQrJ/7hhfK60ngm+xAXkhLlHii33mGMAfiaM=; h=From:To:CC:Subject:Date; b=GfgNbFLiCfH7ARtIAPKpyfEDq5Z3JcztAeWO1KqERX4fat70jWd2b+P9xgzxjD2wE d2+4jGp8qmcuYMD3uw2gb8LP6OYIdrk0XOaoKYlVgqdeMnP4S72/cAZPI/Ea4CEAiy bdXZVo5eYLjUsovLWn8kc02X/nDl4cbroXp2Fz2k= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2TAegJW003126; Thu, 29 Mar 2018 05:40:42 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 29 Mar 2018 05:40:41 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 29 Mar 2018 05:40:41 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2TAeeE4012628; Thu, 29 Mar 2018 05:40:40 -0500 From: Tomi Valkeinen To: Subject: [PATCH 1/3] drm/omap: fix uninitialized ret variable Date: Thu, 29 Mar 2018 13:40:36 +0300 Message-ID: <20180329104038.29154-1-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.16.2 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" audio_config function for both HDMI4 and HDMI5 return uninitialized value as the error code if the display is not currently enabled. For some reason this has not caused any issues. Signed-off-by: Tomi Valkeinen Reviewed-by: Emil Velikov Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index 97c88861d67a..5879f45f6fc9 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c @@ -679,7 +679,7 @@ static int hdmi_audio_config(struct device *dev, struct omap_dss_audio *dss_audio) { struct omap_hdmi *hd = dev_get_drvdata(dev); - int ret; + int ret = 0; mutex_lock(&hd->lock); diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index d28da9ac3e90..ae1a001d1b83 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c @@ -671,7 +671,7 @@ static int hdmi_audio_config(struct device *dev, struct omap_dss_audio *dss_audio) { struct omap_hdmi *hd = dev_get_drvdata(dev); - int ret; + int ret = 0; mutex_lock(&hd->lock); From patchwork Thu Mar 29 10:40:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 132562 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1577619ljb; Thu, 29 Mar 2018 03:40:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx48mLrqs8hoikypZQc1yIFWBJhfltE7uG1sacbeCGSWBpyzK1aXjYSCDhzr20fEJe5KnRe30 X-Received: by 10.99.171.11 with SMTP id p11mr5050150pgf.176.1522320050966; Thu, 29 Mar 2018 03:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522320050; cv=none; d=google.com; s=arc-20160816; b=00wSCEnkP5NMoC0Btvg2aIg7dQNS9zHaZ6fnPPvtgQbYeRr7KCU8jb7MNqzrWZn8Sq UyaAx3rmJppUps0zzksikZlObyOu6Vlqkak0391XiEYAnNiKTtS4Ihu9ql82mK6FovuE e3XP5kOM3hGMAMyYZVqNxExZSuIgnW+haDbHpxMTED2GwtJR18XYGVAQMmMKvPbWqyxo oGVks1bkv+a85xK5xWsxzhCsg9j2DJxCcZAQcmdaQG/2eKu1/aZsfeYU9Al02neb5saX bTiYfTf/DhlfGZ+nBshTEfRHoqn2KS7KTmE5HpuE9eCJnk7pjr92a3SAmh13SRO721y+ qmQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=MtZiu4MvwIk0BY1VsWcfCS/JzGNtON6ihsokR16/tes=; b=q7xAnGOvkNavV5hJ2N5qwKmWUC6SXpxOmKfkv5eWvKhJyok9ESP1Kk+gYW1/p4k0BN lajGWWN9iUB+PD4EBNUr1nlp2uMS54lvQcukG9DZxdLRF5YyRGc6zJFy5nR5CQEK/V3E gL7LAAlraLQkCiMob6yaGJvsEY60Zm2jXfkW9UY79ApMJ/du/iWUUHjXwf223y6ND2ul Jlf4rtd2MP5zycc7XGPzo3T7Xl3PZW6s5ifcWiXqxuivTZFnFVcUWe2PR4N1XgphA5Qr uV4KmSvSmj+6evnLIkw3bemHarB7tMDcj1TGnFyHcVClOpFQm0RSsAkimKEkDOlIwaDj Fc3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=H4ByTTm6; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id d6-v6si5402395plo.661.2018.03.29.03.40.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Mar 2018 03:40:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=H4ByTTm6; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 07AF06E6E9; Thu, 29 Mar 2018 10:40:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by gabe.freedesktop.org (Postfix) with ESMTPS id ECCC06E6AD for ; Thu, 29 Mar 2018 10:40:45 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w2TAehOh000864; Thu, 29 Mar 2018 05:40:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1522320043; bh=q+2O/CFnMnXYvSj9vwyuBHDlYvG3+1bartSnyvDxjng=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=H4ByTTm6ZhTQEevzNJk3xNjWeszzXWhAZFVpD77uv9+QZ3CjuMX2Nq4fHPq+Ca6Sa BP4+IA0JfWidAAdqORdtD6N9jJ98Nh8pik2CbDcZSRCpqBoOEiU71kHhKUN3gehdxN 3Th/KBujx7R5PbfjAQRqqVNkyhuy5pty6xRe9+jo= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2TAehOJ003155; Thu, 29 Mar 2018 05:40:43 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 29 Mar 2018 05:40:43 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 29 Mar 2018 05:40:43 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2TAeeE5012628; Thu, 29 Mar 2018 05:40:42 -0500 From: Tomi Valkeinen To: Subject: [PATCH 2/3] drm/omap: fix possible NULL ref issue in tiler_reserve_2d Date: Thu, 29 Mar 2018 13:40:37 +0300 Message-ID: <20180329104038.29154-2-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180329104038.29154-1-tomi.valkeinen@ti.com> References: <20180329104038.29154-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" tiler_reserve_2d allocates memory but does not check if it got the memory. Add the check and return ENOMEM on failure. Signed-off-by: Tomi Valkeinen Reviewed-by: Emil Velikov Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c index c40f90d2db82..28d93ece191e 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -532,6 +532,9 @@ struct tiler_block *tiler_reserve_2d(enum tiler_fmt fmt, u16 w, unsigned long flags; u32 slot_bytes; + if (!block) + return ERR_PTR(-ENOMEM); + BUG_ON(!validfmt(fmt)); /* convert width/height to slots */ From patchwork Thu Mar 29 10:40:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 132563 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1577708ljb; Thu, 29 Mar 2018 03:40:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+9SApBXoXQ0qSWh9sdlYuKUW4Sxjg0Gcg68gNKD8mrBgpz8xX2+Zb4fHpz5bVpceybkBgT X-Received: by 10.101.89.6 with SMTP id f6mr5039378pgu.178.1522320057116; Thu, 29 Mar 2018 03:40:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522320057; cv=none; d=google.com; s=arc-20160816; b=bu3Zc443flyFI/eXKYU+8zHYWfPOAy7JImK4/DQlBa0Nn3vooKv4F7paPgEAx5nwN7 UelMuRhX1Gl+5aSFUD2r01YGZM5y+/4IRgcCZuOVAhsdU+w0TKYBQh6lzhwLaYJuIE3U RQMuloawUjKRLDhtwRdkc+fWFhsrhjbhl9jK/0+GLn28OzfKUwXFAka6Fwe/rjXlX57Y aNCb/ZMCgztFkytnjznvAfmDxw53PRNm+bryZ8IoJyr7GdyjHc22ic4E8l7aO22Ik7X+ rg3F3knxdEj+dY56XUHKD6zvtiA3tMFYIwO4L3Oe9Lhhe7xR2Ap+HQpoUZxKst59XGEX fe8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=Js10bxU8OWtrB8+dDHGgT5L34iCHXSt3KNu/1bbD/dw=; b=RlBBowwtjLwtOIhDMg4Q8+5HKnEcL7k0KLESR6QfUEMcy+FfW27GCjyih+hJON46YG fHA5z+Te4H26BB18Yf16XFbtW9Fg4DQNMoiTWJx2Z5B2t4oYPu0+sf5L29YDORZtH/ik wqWSLpuhOYcuEUuHacQXlUwrMBHPKFp+sM6BdaHBTe04zt2FWCql/yR5rrQ32CY4iAAZ wsGaboXWUBOPjXvWjiHNRB48IKaYxDyMIQ6brmJCwYsauaxpmreORq7SZ/XZHtrbqf2Q sDF7YUtAAOw4q1pBZvHxogsjj+LlSnAjg+82WbJAYcqR1o+rCAF9UJm32K/r0bRyO2RH /pbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=YcI72Z8a; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id p12-v6si5378696plo.194.2018.03.29.03.40.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Mar 2018 03:40:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=YcI72Z8a; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B4EBF6E6F2; Thu, 29 Mar 2018 10:40:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94DA46E6F2 for ; Thu, 29 Mar 2018 10:40:47 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w2TAeirX011079; Thu, 29 Mar 2018 05:40:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1522320044; bh=iylmZDhRFJvbnHz7lBQP7WIvMrgqFehJQH8aumDIoPo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=YcI72Z8aRx6AQM3nWo29/he4BYsrmcpWuVOwMmwYxxhDkdzVAVhPfXicQSAPzDA4r H1PVJUKN3v1dTQXaSnt8yERpfvqt5Yz9729Thrm6+i3dxTHRZd5aO7CxM5uT31Pmzg Ne9cvCHGmpq8Vh3T7xacw/S9ldw6JNfTYrIhj8qM= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2TAeibV003173; Thu, 29 Mar 2018 05:40:44 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 29 Mar 2018 05:40:44 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 29 Mar 2018 05:40:44 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2TAeeE6012628; Thu, 29 Mar 2018 05:40:43 -0500 From: Tomi Valkeinen To: Subject: [PATCH 3/3] drm/omap: remove unused function Date: Thu, 29 Mar 2018 13:40:38 +0300 Message-ID: <20180329104038.29154-3-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180329104038.29154-1-tomi.valkeinen@ti.com> References: <20180329104038.29154-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" omap_framebuffer_get_next_connector() is not used, remove it. Signed-off-by: Tomi Valkeinen Reviewed-by: Emil Velikov --- drivers/gpu/drm/omapdrm/omap_fb.c | 27 --------------------------- drivers/gpu/drm/omapdrm/omap_fb.h | 2 -- 2 files changed, 29 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c index 5fd22ca73913..b54bcaad5cd1 100644 --- a/drivers/gpu/drm/omapdrm/omap_fb.c +++ b/drivers/gpu/drm/omapdrm/omap_fb.c @@ -309,33 +309,6 @@ void omap_framebuffer_unpin(struct drm_framebuffer *fb) mutex_unlock(&omap_fb->lock); } -/* iterate thru all the connectors, returning ones that are attached - * to the same fb.. - */ -struct drm_connector *omap_framebuffer_get_next_connector( - struct drm_framebuffer *fb, struct drm_connector *from) -{ - struct drm_device *dev = fb->dev; - struct list_head *connector_list = &dev->mode_config.connector_list; - struct drm_connector *connector = from; - - if (!from) - return list_first_entry_or_null(connector_list, typeof(*from), - head); - - list_for_each_entry_from(connector, connector_list, head) { - if (connector != from) { - struct drm_encoder *encoder = connector->encoder; - struct drm_crtc *crtc = encoder ? encoder->crtc : NULL; - if (crtc && crtc->primary->fb == fb) - return connector; - - } - } - - return NULL; -} - #ifdef CONFIG_DEBUG_FS void omap_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m) { diff --git a/drivers/gpu/drm/omapdrm/omap_fb.h b/drivers/gpu/drm/omapdrm/omap_fb.h index 94ad5f9e4404..c20cb4bc714d 100644 --- a/drivers/gpu/drm/omapdrm/omap_fb.h +++ b/drivers/gpu/drm/omapdrm/omap_fb.h @@ -38,8 +38,6 @@ int omap_framebuffer_pin(struct drm_framebuffer *fb); void omap_framebuffer_unpin(struct drm_framebuffer *fb); void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, struct drm_plane_state *state, struct omap_overlay_info *info); -struct drm_connector *omap_framebuffer_get_next_connector( - struct drm_framebuffer *fb, struct drm_connector *from); bool omap_framebuffer_supports_rotation(struct drm_framebuffer *fb); void omap_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m);