Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4770584ybi; Tue, 28 May 2019 02:10:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwywwEPIcyhSdWy+mZ/BFFns7ndgFGMB/lGZl+/jK2C0Uxs8SISTf6PB4R6SdQry/ywFW/1 X-Received: by 2002:a17:90a:9202:: with SMTP id m2mr4331055pjo.37.1559034619034; Tue, 28 May 2019 02:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559034619; cv=none; d=google.com; s=arc-20160816; b=IokxF5qHUAAPVotQOuvcBHxdpG6jJJT+1DcHNmJAwZj+bxjSyhjz2X48QB6NM9Y8qm gpQx5BQ1JFBDS8XDyM3a6wHkHcI0g7Eupf3y3dY/qirkYEWTi2XbMCBhl7mhM+tdgnKQ FVPuHMkdjGA3vD4V40cdWHHohWhC227bctyG3fxfmNViogGxB/Uy57Sr/aUL81KqwVHb csi0J87ygFUCG04ldrZCCBg0xFQAiBFKN7IDavbtQiwAVV2pDczTuZXFEJl4I8ZiGYJm O4bVTiXZJ/CuNVHLF2RsH8i6MdHvT3hjwB+UnkjIOHW0cQmguO6/bszEd6eyFTTxKNfg vX0Q== 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=3WPeIDAqtSnPbDcxMeR1LaTs5pcjbLLnzUOYFaYwyy4=; b=AOq656ZbLdE7JjtL4ZWMcnx9zxiAMjtnJe9+IJanewD7q9J1/5cQBj1BnbuBAAYgsq KVJJ1nj1aJYWj7nzfScL5aI3mfFoZ2ogBw4CZqK0LCFXdpVioOutKQDTtvML5mTVGKTO /ac2kcd9z01onR4JzfZ+vPwFooA5DJ3aQ4VsSMtVThjZrl/otVkRUDje+FJ3jbWhEahy hYF+1BgZkq15bDBXMOUbxBprVoEcCzu1qEeV+qveflylzihK6Ue14i1GapGDiIf+p+tQ oujRjbxWKvH9WjG+mvDvydxVU9lYdIbDpR4oFryGxbOnNFNI9wVfvttJ96ggo40DEb4W eEoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=KjLil2b0; 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.10.02; Tue, 28 May 2019 02:10:19 -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=KjLil2b0; 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 S1727215AbfE1JGg (ORCPT + 99 others); Tue, 28 May 2019 05:06:36 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:35982 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726458AbfE1JD3 (ORCPT ); Tue, 28 May 2019 05:03:29 -0400 Received: by mail-ed1-f67.google.com with SMTP id a8so30638942edx.3 for ; Tue, 28 May 2019 02:03:29 -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=3WPeIDAqtSnPbDcxMeR1LaTs5pcjbLLnzUOYFaYwyy4=; b=KjLil2b0YP+O0+LLoKZvoQsb+o+ksT4MFgBy/gHuXSCAAGP6P6cA5C0cJ0Q064y4qh MGbSN9Y6fh5TrgSLKOYg3g3hchsqbQ/zTnXkZdsWXQ2yOLHhKkE88weQaBaJDRahFgfh kXldbmLz0TAZjV2rhJuHrpHFHPulmv4hUL1sE= 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=MbReNSdMeHfMOAV3j9a9C4UkYeH8tHDqMFc1fXUrZhfVxkIPthuPTzhlJEibFwuZ6I nayudIiFSkxygZe9mRPEGINjbob1VHdCiGCPWW8Uwd2rM6Gl/gtUYUP+M+K4l1khpfXz lfaxoBYGrSPpcTfOZYATiAWOaBC1iLzHaYJ68y44mbQOJkxG3EX7fkDn02yExMOPRXLB LReOwfROcpnfjljrGia+arWxMnIABl55BW+X9wxTzEcr9LOevJ33sKYTjpZUjPZDVBTI /pzsTNSKS86BOW62tYmeKaPhD9gl8H5s8pkuoxndgeoBdH2Ft0TcYh2Qbf74yccrORZF c3lw== X-Gm-Message-State: APjAAAUXeUbOzyZQCaF2ZciTRdUwG+EwMxtPaXwZ9HKqa23wj6aw5U1C b7fUzzbo3JK8CeIqj04nHkIwYYw2a+c= 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 Cc: DRI Development , Intel Graphics Development , linux-fbdev@vger.kernel.org, Daniel Thompson , Bartlomiej Zolnierkiewicz , Daniel Vetter , Geert Uytterhoeven , Sam Ravnborg , Maarten Lankhorst Subject: [PATCH 11/33] fbdev/sh_mobile: remove sh_mobile_lcdc_display_notify 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.20.1