From patchwork Tue May 28 09:02:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10964263 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D358376 for ; Tue, 28 May 2019 09:03:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3CDF271FD for ; Tue, 28 May 2019 09:03:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7AD1285D2; Tue, 28 May 2019 09:03:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 519EB271FD for ; Tue, 28 May 2019 09:03:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 894A189E50; Tue, 28 May 2019 09:03:36 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id B774989E0E for ; Tue, 28 May 2019 09:03:30 +0000 (UTC) Received: by mail-ed1-x542.google.com with SMTP id g57so15791228edc.12 for ; Tue, 28 May 2019 02:03:30 -0700 (PDT) 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=3WPeIDAqtSnPbDcxMeR1LaTs5pcjbLLnzUOYFaYwyy4=; b=MOO3XpbWbCmFXoCvT+YRbWJRVWWqtV0Zay7MH7UzGy9Hq8RttnyQa0WIVrPbGxmkSI /4PJR3cnGXy8UArkW4BUzV2nis96Z/f0WBiPIGQs4VM4xTj3SDXx+edzUJhrQjZ6FKm4 SRiIjHrjLOTPTiVGpLKSgfIQnJNSspuo1NbanxCkuYzyqS4o8Hh68Yv3sRX7MOAl9otd 59rSSJ+FUxhyJJXT6MpTL/PvmSvC0DH4Ih/JMHxqXcLUB90SmaIi7gMx4KiDbmP1PPDH nYzFgqCSA6YQUzDwCeFFKJPQR8AptvDiaJ/uuWm0ZWBQVHULsMggPFr5m5kNJkEY8Cb8 +v9g== X-Gm-Message-State: APjAAAWMJqs7QLl7ln5J+kwk1DlGkJA+5GfM4xxfa+Z7FokWX3l1MhFg dBTMaHWuE9iiLwBV2NYPciW67g== X-Google-Smtp-Source: APXvYqwMsg+ox2j7/vocxj31v97alIwDq1JoAS4rf3ZZsaq9cI9N6Nbl/phYJ9vu/CPVcy0X+VXgjw== X-Received: by 2002:a05:6402:12ce:: with SMTP id k14mr1550281edx.169.1559034208108; Tue, 28 May 2019 02:03:28 -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.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 02:03:27 -0700 (PDT) From: Daniel Vetter To: LKML Date: Tue, 28 May 2019 11:02:42 +0200 Message-Id: <20190528090304.9388-12-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 X-Mailman-Original-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=3WPeIDAqtSnPbDcxMeR1LaTs5pcjbLLnzUOYFaYwyy4=; b=KjLil2b0YP+O0+LLoKZvoQsb+o+ksT4MFgBy/gHuXSCAAGP6P6cA5C0cJ0Q064y4qh MGbSN9Y6fh5TrgSLKOYg3g3hchsqbQ/zTnXkZdsWXQ2yOLHhKkE88weQaBaJDRahFgfh kXldbmLz0TAZjV2rhJuHrpHFHPulmv4hUL1sE= Subject: [Intel-gfx] [PATCH 11/33] fbdev/sh_mobile: remove sh_mobile_lcdc_display_notify X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Thompson , Geert Uytterhoeven , Bartlomiej Zolnierkiewicz , Daniel Vetter , Intel Graphics Development , linux-fbdev@vger.kernel.org, DRI Development , Sam Ravnborg Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP It's dead code, and removing it avoids me having to understand what it's doing with lock_fb_info. v2: Also remove sh_mobile_lcdc_must_reconfigure, now unused (Sam). Signed-off-by: Daniel Vetter Reviewed-by: Geert Uytterhoeven (v1) Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Geert Uytterhoeven Cc: Daniel Vetter Cc: Sam Ravnborg --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 82 -------------------------- drivers/video/fbdev/sh_mobile_lcdcfb.h | 5 -- 2 files changed, 87 deletions(-) diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index dc46be38c970..1437695415c9 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -534,89 +534,9 @@ static void sh_mobile_lcdc_display_off(struct sh_mobile_lcdc_chan *ch) ch->tx_dev->ops->display_off(ch->tx_dev); } -static bool -sh_mobile_lcdc_must_reconfigure(struct sh_mobile_lcdc_chan *ch, - const struct fb_videomode *new_mode) -{ - dev_dbg(ch->info->dev, "Old %ux%u, new %ux%u\n", - ch->display.mode.xres, ch->display.mode.yres, - new_mode->xres, new_mode->yres); - - /* It can be a different monitor with an equal video-mode */ - if (fb_mode_is_equal(&ch->display.mode, new_mode)) - return false; - - dev_dbg(ch->info->dev, "Switching %u -> %u lines\n", - ch->display.mode.yres, new_mode->yres); - ch->display.mode = *new_mode; - - return true; -} - static int sh_mobile_lcdc_check_var(struct fb_var_screeninfo *var, struct fb_info *info); -static int sh_mobile_lcdc_display_notify(struct sh_mobile_lcdc_chan *ch, - enum sh_mobile_lcdc_entity_event event, - const struct fb_videomode *mode, - const struct fb_monspecs *monspec) -{ - struct fb_info *info = ch->info; - struct fb_var_screeninfo var; - int ret = 0; - - switch (event) { - case SH_MOBILE_LCDC_EVENT_DISPLAY_CONNECT: - /* HDMI plug in */ - console_lock(); - if (lock_fb_info(info)) { - - - ch->display.width = monspec->max_x * 10; - ch->display.height = monspec->max_y * 10; - - if (!sh_mobile_lcdc_must_reconfigure(ch, mode) && - info->state == FBINFO_STATE_RUNNING) { - /* First activation with the default monitor. - * Just turn on, if we run a resume here, the - * logo disappears. - */ - info->var.width = ch->display.width; - info->var.height = ch->display.height; - sh_mobile_lcdc_display_on(ch); - } else { - /* New monitor or have to wake up */ - fb_set_suspend(info, 0); - } - - - unlock_fb_info(info); - } - console_unlock(); - break; - - case SH_MOBILE_LCDC_EVENT_DISPLAY_DISCONNECT: - /* HDMI disconnect */ - console_lock(); - if (lock_fb_info(info)) { - fb_set_suspend(info, 1); - unlock_fb_info(info); - } - console_unlock(); - break; - - case SH_MOBILE_LCDC_EVENT_DISPLAY_MODE: - /* Validate a proposed new mode */ - fb_videomode_to_var(&var, mode); - var.bits_per_pixel = info->var.bits_per_pixel; - var.grayscale = info->var.grayscale; - ret = sh_mobile_lcdc_check_var(&var, info); - break; - } - - return ret; -} - /* ----------------------------------------------------------------------------- * Format helpers */ @@ -2540,8 +2460,6 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch) unsigned int max_size; unsigned int i; - ch->notify = sh_mobile_lcdc_display_notify; - /* Validate the format. */ format = sh_mobile_format_info(cfg->fourcc); if (format == NULL) { diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.h b/drivers/video/fbdev/sh_mobile_lcdcfb.h index b8e47a8bd8ab..589400372098 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.h +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.h @@ -87,11 +87,6 @@ struct sh_mobile_lcdc_chan { unsigned long base_addr_c; unsigned int line_size; - int (*notify)(struct sh_mobile_lcdc_chan *ch, - enum sh_mobile_lcdc_entity_event event, - const struct fb_videomode *mode, - const struct fb_monspecs *monspec); - /* Backlight */ struct backlight_device *bl; unsigned int bl_brightness;