Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1800430iob; Fri, 29 Apr 2022 13:12:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx71jFtpzZsrIEkkkvDaur9ppGdCM27hMuyl+r9YOvM5pTASQwM60kRa4bIVY7p0h/5Tnt0 X-Received: by 2002:a63:9044:0:b0:3ab:28cd:4d0b with SMTP id a65-20020a639044000000b003ab28cd4d0bmr830940pge.150.1651263165774; Fri, 29 Apr 2022 13:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651263165; cv=none; d=google.com; s=arc-20160816; b=gnSChodv3KlwfunxarDLmHNKUJTykYVGOu+0/jB5/69p/uYi6pzAqR21rUsWitc5eV 9kYJvjqeUKw9cL5hwkhlNYaGjh4zzXzqcTYKDzUFkkTLHTul7dqvlfjnxzJ+dWEAxk67 rH/Qb+oGLxQ0/6+YEbeZCiU9NqRdTPDH/hyhaGSuY43ip09l5ZwunQLmWrHw9ywzGA2m c+k88WIPqqVcNdG26DsU4zVAUwhhS928XZsMHDPAphxt313ACPy36fBgwVOST38OYOER Q4zBjQNe3YtypbhA1mdGZVFTM+8Rv6dJlOk7I9sCi+hiMoTIjhpt4qLTdx9vkkDbXw8z Cahw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tOl03ECMEn4YtYdNKQOLjABy+3U2mCnQjDfJteHnEJE=; b=Wj+VTe5UKHGoPo8+6Gj0D6bS2i7D4TSH1RMAHU2Y0hyt4mLMxUGZupFzIzGzEApTLJ bxsJ+RRGriEY+0f8n2c0oJd7hbWsBIIbqwS5ZMG2rY4YA1hTfjspGFx1V56AYY9Mj+3A AUOyTahzqn0cfMbfy8UZ8C4ki2vAaTfE9BwRO+PZbEWjOX3ptUYbtS4c7kwp4UgORX89 1HlGxwglwgkl1UTcvt+r/TNY9QpCah6Jg1hWSPZ6brAM+CCBZVDFiTNFn7FainIapj9T nx+pIZMBDlfuhov/bU7bhuFxnJHJ1ewIp40Y0+j9qQhDgWZ8tji04ZtTs/NBYTjVF2y7 oXdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=j7Pmz35W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hg24-20020a17090b301800b001cab382d4e3si10483197pjb.49.2022.04.29.13.12.30; Fri, 29 Apr 2022 13:12:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=j7Pmz35W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376807AbiD2N62 (ORCPT + 99 others); Fri, 29 Apr 2022 09:58:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376528AbiD2N4o (ORCPT ); Fri, 29 Apr 2022 09:56:44 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D102CE4B8; Fri, 29 Apr 2022 06:51:54 -0700 (PDT) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23TDYhSl008429; Fri, 29 Apr 2022 13:51:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=tOl03ECMEn4YtYdNKQOLjABy+3U2mCnQjDfJteHnEJE=; b=j7Pmz35WyQRuo8W4Jv8jTL/s6ga4cYNzB191f21SnmzbeCDozXjZWok1S2wqsoArywKV YX/fA7WlUfzwX2ikQP9vN62z51+E1eHLITaLhqnujDsZrrDdErwClKjbn/6J5iUQKrRo zCjKr4iXoqWD5ildcqxcmGm3/NZ81oynpOfgfZyNHuLOHAIWlsvtwkhntdb4C6JBvb73 VFp8RdMhz4ukezenQtZRfqLaqzkgTplb4546RcfAJRXFpdMjmeXaCUI7+56p+giND56Y Zgj0nHmSEQZ4Dy/OTd5fAuF8k0g8c6PmNDUkwT5EsI7EHbYMGDw/QLnZCs3KGKPqVRMI sg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3fqu6p511r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Apr 2022 13:51:47 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 23TDEqGJ010914; Fri, 29 Apr 2022 13:51:46 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3fqu6p5111-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Apr 2022 13:51:46 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23TDRowh013390; Fri, 29 Apr 2022 13:51:44 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma03fra.de.ibm.com with ESMTP id 3fm938yatn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Apr 2022 13:51:44 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23TDpg4726345980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Apr 2022 13:51:42 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EB8964C040; Fri, 29 Apr 2022 13:51:41 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 88B5F4C044; Fri, 29 Apr 2022 13:51:41 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 29 Apr 2022 13:51:41 +0000 (GMT) From: Niklas Schnelle To: Arnd Bergmann Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, Arnd Bergmann , Dave Airlie , Gerd Hoffmann , David Airlie , Daniel Vetter , virtualization@lists.linux-foundation.org (open list:DRM DRIVER FOR QXL VIRTUAL GPU), spice-devel@lists.freedesktop.org (open list:DRM DRIVER FOR QXL VIRTUAL GPU), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS) Subject: [PATCH 31/37] drm: handle HAS_IOPORT dependencies Date: Fri, 29 Apr 2022 15:50:53 +0200 Message-Id: <20220429135108.2781579-56-schnelle@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220429135108.2781579-1-schnelle@linux.ibm.com> References: <20220429135108.2781579-1-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: T5f3POypuR3DXhIqnVvnwVD5pm7bTljv X-Proofpoint-ORIG-GUID: 88UZj_djQHbMNnuH__xJuymd1-WRkzX0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-29_06,2022-04-28_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 spamscore=0 malwarescore=0 adultscore=0 mlxlogscore=567 priorityscore=1501 suspectscore=0 phishscore=0 clxscore=1015 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204290078 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In a future patch HAS_IOPORT=n will result in inb()/outb() and friends not being declared. We thus need to add HAS_IOPORT as dependency for those drivers using them. There is also a direct and hard coded use in cirrus.c which according to the comment is only necessary during resume. Let's just skip this as for example s390 which doesn't have I/O port support also doesen't support suspend/resume. Co-developed-by: Arnd Bergmann Signed-off-by: Niklas Schnelle --- drivers/gpu/drm/qxl/Kconfig | 1 + drivers/gpu/drm/tiny/Kconfig | 1 + drivers/gpu/drm/tiny/cirrus.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/qxl/Kconfig b/drivers/gpu/drm/qxl/Kconfig index ca3f51c2a8fe..d0e0d440c8d9 100644 --- a/drivers/gpu/drm/qxl/Kconfig +++ b/drivers/gpu/drm/qxl/Kconfig @@ -2,6 +2,7 @@ config DRM_QXL tristate "QXL virtual GPU" depends on DRM && PCI && MMU + depends on HAS_IOPORT select DRM_KMS_HELPER select DRM_TTM select DRM_TTM_HELPER diff --git a/drivers/gpu/drm/tiny/Kconfig b/drivers/gpu/drm/tiny/Kconfig index 627d637a1e7e..7102783809c3 100644 --- a/drivers/gpu/drm/tiny/Kconfig +++ b/drivers/gpu/drm/tiny/Kconfig @@ -13,6 +13,7 @@ config DRM_ARCPGU config DRM_BOCHS tristate "DRM Support for bochs dispi vga interface (qemu stdvga)" depends on DRM && PCI && MMU + depends on HAS_IOPORT select DRM_KMS_HELPER select DRM_VRAM_HELPER select DRM_TTM diff --git a/drivers/gpu/drm/tiny/cirrus.c b/drivers/gpu/drm/tiny/cirrus.c index c8e791840862..0dc4788c5399 100644 --- a/drivers/gpu/drm/tiny/cirrus.c +++ b/drivers/gpu/drm/tiny/cirrus.c @@ -306,8 +306,10 @@ static int cirrus_mode_set(struct cirrus_device *cirrus, cirrus_set_start_address(cirrus, 0); +#ifdef CONFIG_HAS_IOPORT /* Unblank (needed on S3 resume, vgabios doesn't do it then) */ outb(0x20, 0x3c0); +#endif drm_dev_exit(idx); return 0; -- 2.32.0