From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46E00C3A5A2 for ; Thu, 22 Aug 2019 06:50:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22D08233A0 for ; Thu, 22 Aug 2019 06:50:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731845AbfHVGut (ORCPT ); Thu, 22 Aug 2019 02:50:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44212 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727553AbfHVGus (ORCPT ); Thu, 22 Aug 2019 02:50:48 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 681C73082E57; Thu, 22 Aug 2019 06:50:48 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-60.ams2.redhat.com [10.36.116.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 06203610C6; Thu, 22 Aug 2019 06:50:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 42AF197A1; Thu, 22 Aug 2019 08:50:42 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Cc: tzimmermann@suse.de, Gerd Hoffmann , David Airlie , Daniel Vetter , virtualization@lists.linux-foundation.org (open list:DRM DRIVER FOR BOCHS VIRTUAL GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v4 4/4] drm/bochs: move bochs_hw_setformat() call Date: Thu, 22 Aug 2019 08:50:41 +0200 Message-Id: <20190822065041.11941-5-kraxel@redhat.com> In-Reply-To: <20190822065041.11941-1-kraxel@redhat.com> References: <20190822065041.11941-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 22 Aug 2019 06:50:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Call it from bochs_hw_setfb(). This also allows to make bochs_hw_setformat static. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs.h | 2 -- drivers/gpu/drm/bochs/bochs_hw.c | 5 +++-- drivers/gpu/drm/bochs/bochs_kms.c | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs.h b/drivers/gpu/drm/bochs/bochs.h index fa36a358a5dc..50fda96444e1 100644 --- a/drivers/gpu/drm/bochs/bochs.h +++ b/drivers/gpu/drm/bochs/bochs.h @@ -78,8 +78,6 @@ void bochs_hw_fini(struct drm_device *dev); void bochs_hw_setmode(struct bochs_device *bochs, struct drm_display_mode *mode); -void bochs_hw_setformat(struct bochs_device *bochs, - const struct drm_format_info *format); void bochs_hw_setfb(struct bochs_device *bochs, struct drm_framebuffer *fb, int x, int y); diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c index 0749e9de1a4d..da68072be6ae 100644 --- a/drivers/gpu/drm/bochs/bochs_hw.c +++ b/drivers/gpu/drm/bochs/bochs_hw.c @@ -228,8 +228,8 @@ void bochs_hw_setmode(struct bochs_device *bochs, VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED); } -void bochs_hw_setformat(struct bochs_device *bochs, - const struct drm_format_info *format) +static void bochs_hw_setformat(struct bochs_device *bochs, + const struct drm_format_info *format) { DRM_DEBUG_DRIVER("format %c%c%c%c\n", (format->format >> 0) & 0xff, @@ -269,4 +269,5 @@ void bochs_hw_setfb(struct bochs_device *bochs, bochs_dispi_write(bochs, VBE_DISPI_INDEX_VIRT_WIDTH, vwidth); bochs_dispi_write(bochs, VBE_DISPI_INDEX_X_OFFSET, vx); bochs_dispi_write(bochs, VBE_DISPI_INDEX_Y_OFFSET, vy); + bochs_hw_setformat(bochs, fb->format); } diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 334e458cbc31..d02104fddf82 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -35,7 +35,6 @@ static void bochs_plane_update(struct bochs_device *bochs, bochs_hw_setfb(bochs, state->fb, state->crtc_x, state->crtc_y); - bochs_hw_setformat(bochs, state->fb->format); } static void bochs_pipe_enable(struct drm_simple_display_pipe *pipe, -- 2.18.1