Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4765727ybi; Tue, 28 May 2019 02:05:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2E7NBLZqKluXMmuRxnsC+lmygF3w36+8ikFtwStVt9ycM4rTTTZOeWrb6bvtt0vo3dTLZ X-Received: by 2002:a63:2c4a:: with SMTP id s71mr114491129pgs.343.1559034329634; Tue, 28 May 2019 02:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559034329; cv=none; d=google.com; s=arc-20160816; b=ujLK4lWQBVjmrFP1zqGdGcWb+/Ef6eMpTVtpSG/VQh4ZiAavX79ZWiPJHsxlbYzgZo r16ZMmLKs9lb0k9Ri3gvVVQ2buFrw6+WSwqttfu9yMbSc9oNPioe42aYJMU8pfTHLEPn cZOSwhupX6UkReU3n7nEpE0ygIWp1qrSpOMGMHaHiwp8hDd1Zp1C/BSq+Ex9ks0J4rjx ExaQ87KwJ858Pa7sV1uYQ5tUlbJLkJd0be4OlncfXLz1PLT2J6//KKEGIYQsxpFpv560 541zpKNmILRWgf8fYcxBbe/kF7EkJK+YPP7cDdH4jX7BZyWa0uogKGffgBW46+xfRCIb efdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=l8PYij8neDId3ryticKg/a8o/KS0Lg5p8XO7y5/XF6o=; b=VxLnSX//Sn9OmDJZ+3cyRbc7PWHk34hfMW46IpTEXVc/E55L5H7ayG0vq4mivmFfox fx+ekA64iwbTW4buLAu7z1e3JfG+RZ3lQWATiVu4wi43AlbDfDHxc/ehfBcKmK4HkvPe cr2dMioOfv0sK953si92nu3fqd3KMUkT2IxL3Q9JM+VEiXkVUEJRfa8D2P+ZlKPvYww2 VB73syAkU++wH8EwxbhBlJEuyRKasSFRiOQ9nNsHpBeNgUynLlgq0ONTJHRtW2G1YJjj 1F8hn/863X57Z5pe7ozJUzUuDL97aqW5Mcm40HCfyYYqfRXX/7945jep937UTBXE++3T PY+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=jHDbHakQ; 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 a11si2575319pju.82.2019.05.28.02.05.13; Tue, 28 May 2019 02:05:29 -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=@ffwll.ch header.s=google header.b=jHDbHakQ; 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 S1727178AbfE1JDn (ORCPT + 99 others); Tue, 28 May 2019 05:03:43 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:38937 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727146AbfE1JDm (ORCPT ); Tue, 28 May 2019 05:03:42 -0400 Received: by mail-ed1-f67.google.com with SMTP id e24so30646785edq.6 for ; Tue, 28 May 2019 02:03:41 -0700 (PDT) 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=l8PYij8neDId3ryticKg/a8o/KS0Lg5p8XO7y5/XF6o=; b=jHDbHakQeNwnznvXASvVWl7yvcYBqpw2pEJjIlODz4RNjgcrPAWF5fDWm+8CRW99mj +7xQ5CZDwyO//HITpeFemyBkOaJ0JKfiLJv+ZlmHcyvjUsvZpGih+aUcSqpRGHs/pn05 cki+OyKVOY+239GGqpg6Av8ilLiYl6+XuyA2U= 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=l8PYij8neDId3ryticKg/a8o/KS0Lg5p8XO7y5/XF6o=; b=raxsNUUjnS3qXdvaWx018sQynWzKEXBsf+AV/XonqFG06wHJP7kGA0aqo5JGOX10Vt UnjNl10DsPsb6N2iBtr1nkfVo+cg6hKZvP3bTpJ0Rgq1exOto8lKFOu0DpUeK42nO+78 KJG6yfknhcpoffyVVyaJm5UqW72efyCVtE58X93hTuAhX9qmc6ry4wjaT2X5HmS3Fx0g zP7xBIwc8veJePVZKjXim+zzxe5J73EYY+blbdeoEnDjBB0w3pIK+WbxBmgoabNYUE8Y F0znp5Y18JEZiznPJRxnozn1lioN+HgJ/Zx3/QhJuK/slfqmEN3JxLalKmyQGjy54Qgb dxKQ== X-Gm-Message-State: APjAAAVXgQ3Q5f/RP5ot2tenaxCgjzkBeLvje9+DJT/ZcYJl/I60k0bL 5OINdh0Rw35JAMKdzAQ4AL6LLTiu7zw= X-Received: by 2002:a50:8a46:: with SMTP id i64mr126933097edi.177.1559034220244; Tue, 28 May 2019 02:03:40 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id x49sm4072656edm.25.2019.05.28.02.03.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 02:03:39 -0700 (PDT) From: Daniel Vetter To: LKML Cc: DRI Development , Intel Graphics Development , linux-fbdev@vger.kernel.org, Daniel Thompson , Bartlomiej Zolnierkiewicz , Daniel Vetter , Daniel Vetter , Geert Uytterhoeven , Sam Ravnborg , Maarten Lankhorst , Markus Elfring , Wolfram Sang Subject: [PATCH 20/33] fbdev/sh_mob: Remove fb notifier callback Date: Tue, 28 May 2019 11:02:51 +0200 Message-Id: <20190528090304.9388-21-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190528090304.9388-1-daniel.vetter@ffwll.ch> References: <20190528090304.9388-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This seems to be entirely defunct: - The FB_EVEN_SUSPEND/RESUME events are only sent out by fb_set_suspend. Which is supposed to be called by drivers in their suspend/resume hooks, and not itself call into drivers. Luckily sh_mob doesn't call fb_set_suspend, so this seems to do nothing useful. - The notify hook calls sh_mobile_fb_reconfig() which in turn can call into the fb notifier. Or attempt too, since that would deadlock. So looks like leftover hacks from when this was originally introduced in commit 6011bdeaa6089d49c02de69f05980da7bad314ab Author: Guennadi Liakhovetski Date: Wed Jul 21 10:13:21 2010 +0000 fbdev: sh-mobile: HDMI support for SH-Mobile SoCs So let's just remove it. Signed-off-by: Daniel Vetter Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: Markus Elfring Cc: Geert Uytterhoeven Cc: Wolfram Sang --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 38 -------------------------- 1 file changed, 38 deletions(-) diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index 1437695415c9..015a02a29d37 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -213,7 +213,6 @@ struct sh_mobile_lcdc_priv { struct sh_mobile_lcdc_chan ch[2]; struct sh_mobile_lcdc_overlay overlays[4]; - struct notifier_block notifier; int started; int forced_fourcc; /* 2 channel LCDC must share fourcc setting */ }; @@ -2239,37 +2238,6 @@ static const struct dev_pm_ops sh_mobile_lcdc_dev_pm_ops = { * Framebuffer notifier */ -/* locking: called with info->lock held */ -static int sh_mobile_lcdc_notify(struct notifier_block *nb, - unsigned long action, void *data) -{ - struct fb_event *event = data; - struct fb_info *info = event->info; - struct sh_mobile_lcdc_chan *ch = info->par; - - if (&ch->lcdc->notifier != nb) - return NOTIFY_DONE; - - dev_dbg(info->dev, "%s(): action = %lu, data = %p\n", - __func__, action, event->data); - - switch(action) { - case FB_EVENT_SUSPEND: - sh_mobile_lcdc_display_off(ch); - sh_mobile_lcdc_stop(ch->lcdc); - break; - case FB_EVENT_RESUME: - mutex_lock(&ch->open_lock); - sh_mobile_fb_reconfig(info); - mutex_unlock(&ch->open_lock); - - sh_mobile_lcdc_display_on(ch); - sh_mobile_lcdc_start(ch->lcdc); - } - - return NOTIFY_OK; -} - /* ----------------------------------------------------------------------------- * Probe/remove and driver init/exit */ @@ -2297,8 +2265,6 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev) struct sh_mobile_lcdc_priv *priv = platform_get_drvdata(pdev); unsigned int i; - fb_unregister_client(&priv->notifier); - for (i = 0; i < ARRAY_SIZE(priv->overlays); i++) sh_mobile_lcdc_overlay_fb_unregister(&priv->overlays[i]); for (i = 0; i < ARRAY_SIZE(priv->ch); i++) @@ -2688,10 +2654,6 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev) goto err1; } - /* Failure ignored */ - priv->notifier.notifier_call = sh_mobile_lcdc_notify; - fb_register_client(&priv->notifier); - return 0; err1: sh_mobile_lcdc_remove(pdev); -- 2.20.1