Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2283184ybl; Thu, 19 Dec 2019 10:59:37 -0800 (PST) X-Google-Smtp-Source: APXvYqxObxImraMr9fKzw8QRTotvf3ij8Z4oaE2M6ntCXM8IG3hSN5zwaEGaMWecpt7MLeS4k0Lc X-Received: by 2002:a9d:518b:: with SMTP id y11mr9852520otg.349.1576781977439; Thu, 19 Dec 2019 10:59:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781977; cv=none; d=google.com; s=arc-20160816; b=ko8wbPNUEum+cfRKlzgQ0OSQiDAfwS3hmg6GDetgeNePXAHeZMTdSc/auZg8KOprVb nYbl0vceCLZWYtyABaXOdkcpjoU9kbtOlJtKo324Tbo9j9CLdnFAJx8ztd0AlBLcBU7g 8RAEZHm8JKDS68RX4oXwbFiE/Tl38tjgFel3cF2KALzqoLS+m+FLYl7DnkOyECMYhfhw 6eHRqVDZvekanFVPOPdDgSOVRz3TF1oma1sg28bQ4ZmlNpS1xbXL2PmYkzKBpDY4YhRV rC0ljKwck1OrqTjK7Hiy26GcDRJg72AdV6gZhtWeaKOgV62E2q5ui2p1xAQmoecVeeCS f9+Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BwwTjpRaOhv2l6bxXPBKR3w1Fl+o933WzO2muXSUsEw=; b=rQzWYFZn3M+dwNj14Bblk1kM+rrdodG4Y6bi304rrrve3rWE02+KotTRsUn22P2Vth 7E0Wm1uTNYjVXIY9mhZ/y9osniUq41C3RXPcX20vjkZKLqv63DadarHj6INnipzDk1xd FekJ+JHss2O8xgo0q0ZyWsyGzJ/BjGjrRyZgKwyIMsZcQ8uvYCmPVTCqWD37zaw5t2VY BhDg+y5+ERKMTZJBaxPtDM7midKRbtdcvSj+fvCZQXHwEByPPA0yQ0g9zfMJI9vbZqnQ TcsaWIe7GwMqdkNaoryNuTb9dkFPXgcEt478FWy0reQUXm152C7jWan0+96DWb+dWrXj jB2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2wSHA+3p; 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 w7si3290105oie.196.2019.12.19.10.59.25; Thu, 19 Dec 2019 10:59:37 -0800 (PST) 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=@kernel.org header.s=default header.b=2wSHA+3p; 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 S1730384AbfLSSzG (ORCPT + 99 others); Thu, 19 Dec 2019 13:55:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:50804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730613AbfLSSzF (ORCPT ); Thu, 19 Dec 2019 13:55:05 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 09F132465E; Thu, 19 Dec 2019 18:55:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781704; bh=I4FicGF1nduQhWKADf+S3DKjlXW9oqIQD8OotutLefg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2wSHA+3p2yCqgBTvysPl5M0dF6auMbTECHKj4jiCODJQhPoLNDsEEssHaePUO6Kq/ pwflQ6I4+lH9SxZ6tinWN+0v32c78VVkOzGMP9m2vi7Zw9Zy+jg2ASLedryfFuyAER Hc1er0BWoYyLOEPAIVh6kfHoMd02q/+oen/ZZ2lI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Zimmermann , Daniel Vetter , John Donnelly , Gerd Hoffmann , Dave Airlie , Maarten Lankhorst , Maxime Ripard , David Airlie , Sam Ravnborg , "Y.C. Chen" , Neil Armstrong , Thomas Gleixner , =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= , Andrzej Pietrasiewicz , dri-devel@lists.freedesktop.org Subject: [PATCH 5.4 47/80] drm/mgag200: Store flags from PCI driver data in device structure Date: Thu, 19 Dec 2019 19:34:39 +0100 Message-Id: <20191219183114.978179449@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183031.278083125@linuxfoundation.org> References: <20191219183031.278083125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Zimmermann commit d6d437d97d54c85a1a93967b2745e31dff03365a upstream. The flags field in struct mga_device has been unused so far. We now use it to store flag bits from the PCI driver. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin") Cc: John Donnelly Cc: Gerd Hoffmann Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Sam Ravnborg Cc: "Y.C. Chen" Cc: Neil Armstrong Cc: Thomas Gleixner Cc: "José Roberto de Souza" Cc: Andrzej Pietrasiewicz Cc: dri-devel@lists.freedesktop.org Cc: # v5.3+ Link: https://patchwork.freedesktop.org/patch/msgid/20191126101529.20356-3-tzimmermann@suse.de Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/mgag200/mgag200_drv.h | 8 ++++++++ drivers/gpu/drm/mgag200/mgag200_main.c | 1 + 2 files changed, 9 insertions(+) --- a/drivers/gpu/drm/mgag200/mgag200_drv.h +++ b/drivers/gpu/drm/mgag200/mgag200_drv.h @@ -160,6 +160,7 @@ enum mga_type { }; #define MGAG200_TYPE_MASK (0x000000ff) +#define MGAG200_FLAG_MASK (0x00ffff00) #define IS_G200_SE(mdev) (mdev->type == G200_SE_A || mdev->type == G200_SE_B) @@ -195,6 +196,13 @@ mgag200_type_from_driver_data(kernel_ulo { return (enum mga_type)(driver_data & MGAG200_TYPE_MASK); } + +static inline unsigned long +mgag200_flags_from_driver_data(kernel_ulong_t driver_data) +{ + return driver_data & MGAG200_FLAG_MASK; +} + /* mgag200_mode.c */ int mgag200_modeset_init(struct mga_device *mdev); void mgag200_modeset_fini(struct mga_device *mdev); --- a/drivers/gpu/drm/mgag200/mgag200_main.c +++ b/drivers/gpu/drm/mgag200/mgag200_main.c @@ -94,6 +94,7 @@ static int mgag200_device_init(struct dr struct mga_device *mdev = dev->dev_private; int ret, option; + mdev->flags = mgag200_flags_from_driver_data(flags); mdev->type = mgag200_type_from_driver_data(flags); /* Hardcode the number of CRTCs to 1 */