Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1046002yba; Thu, 4 Apr 2019 03:10:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWBKt3B7p3o/SydCW7oKkZLSwY2Y1qCy1MT287QjTi0I0EwkFAXGMFK67ZA5yAHQ1DIekx X-Received: by 2002:a17:902:5a2:: with SMTP id f31mr5278213plf.119.1554372614288; Thu, 04 Apr 2019 03:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554372614; cv=none; d=google.com; s=arc-20160816; b=pDmo/Kowg1BwJU59JwopjXJ+k77xJRTpshGMVDCOxUBEXa2FfjrEj4FeKaFUaJsEkw KCWUMYcYfjcnMYX28uhis6S845xB2V491drJ7ar43oYrhRLzN3PyEael7kwMdWkGZa1c zvTDwxup+nG9gbj+0JBFgIFl53QzZ/FNX8NaOfn2iPek1xnEYCaELGZbVggnqF5dx6xU QrQ5bAJif/lroyOGD3wV4uat8sCOtaD6QZ3YbFfgj+69g4vNrVZZSMOAZGkBYfQr9cyt IGGhuTDaHVhNaGXw5R+6jYDfGzzrVn4cN038wAtoGdqWD6LZWhjEwAQRIAYOQEoQM1E2 Cbtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :nodisclaimer:content-language:accept-language:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=wUPvzulVhCdlCdmvWuxofD/x4xXNPy318UhPbEunRgY=; b=wiW3O4vvpU7pG/uz3It0XlbQz2yvCyaGD6kN+DvvD13b0Ws+Eu/P28lLejnx2dbLb7 gq8YQjknoQ1n7etbhkZbN3NujjtXzaIlmOdCsDG24fuRLwPQyK1uP11hl/fwiyLcTm+I +S57ojWCxhGDLSyCzmezXczkr/CBT/9kXkFvbwcxIqws6OSTgLN2YKqqmP2inivIu8HT RfXKXq+YVdwm6Q1nkyjnClXfMnQjDMvMVUFrmLFEdVMTqU/7hZWqDY2+nnMYymiUYj4/ QtdGq7UsCroPxqdjSq+wIFuDDOJSW/CGE43e07ZTjVbyg/YW3V+9+rPQZnIqGfdbhEIn 2ROA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=YXIMb923; 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 a17si14875267pgk.572.2019.04.04.03.09.59; Thu, 04 Apr 2019 03:10:14 -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=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=YXIMb923; 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 S1728768AbfDDKIJ (ORCPT + 99 others); Thu, 4 Apr 2019 06:08:09 -0400 Received: from mail-eopbgr130087.outbound.protection.outlook.com ([40.107.13.87]:34571 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727053AbfDDKII (ORCPT ); Thu, 4 Apr 2019 06:08:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wUPvzulVhCdlCdmvWuxofD/x4xXNPy318UhPbEunRgY=; b=YXIMb923SPpf2p+FtQcvjZMuX29lJF9VgTu+sIL6hhNFLWcWudjEABoIs1RIDDahzuMsPBHt6Y2A/D1iyKi5i7zJ/EIYNnH+8FjlvVvJPYS1RaTXOMQSHp2OpSVdDOiPZsaOnp3L+r4mOvrVSGEfSSyVlRM0pWBhrDMbDuB7zFs= Received: from DB7PR08MB3530.eurprd08.prod.outlook.com (20.177.120.80) by DB7PR08MB3450.eurprd08.prod.outlook.com (20.176.238.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.17; Thu, 4 Apr 2019 10:08:04 +0000 Received: from DB7PR08MB3530.eurprd08.prod.outlook.com ([fe80::899e:4160:166b:923a]) by DB7PR08MB3530.eurprd08.prod.outlook.com ([fe80::899e:4160:166b:923a%3]) with mapi id 15.20.1771.011; Thu, 4 Apr 2019 10:08:04 +0000 From: "Lowry Li (Arm Technology China)" To: Liviu Dudau , "james qian wang (Arm Technology China)" , "maarten.lankhorst@linux.intel.com" , "seanpaul@chromium.org" , "airlied@linux.ie" , Brian Starkey CC: "Julien Yin (Arm Technology China)" , "Jonathan Chai (Arm Technology China)" , Ayan Halder , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , nd Subject: [RFC PATCH v2] drm/komeda: fixing of DMA mapping sg segment warning Thread-Topic: [RFC PATCH v2] drm/komeda: fixing of DMA mapping sg segment warning Thread-Index: AQHU6s5KQMOVm+DvoUynXnNB4vwxrA== Date: Thu, 4 Apr 2019 10:08:04 +0000 Message-ID: <1554372474-3594-1-git-send-email-lowry.li@arm.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [113.29.88.7] x-clientproxiedby: HK2PR0401CA0010.apcprd04.prod.outlook.com (2603:1096:202:2::20) To DB7PR08MB3530.eurprd08.prod.outlook.com (2603:10a6:10:49::16) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Lowry.Li@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 1.9.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 01d32956-b61f-4bfc-de1e-08d6b8e56d19 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:DB7PR08MB3450; x-ms-traffictypediagnostic: DB7PR08MB3450: x-ms-exchange-purlcount: 4 nodisclaimer: True x-microsoft-antispam-prvs: x-forefront-prvs: 0997523C40 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(366004)(346002)(39860400002)(396003)(376002)(189003)(199004)(4326008)(7736002)(71200400001)(66066001)(97736004)(53936002)(72206003)(25786009)(478600001)(5660300002)(966005)(68736007)(3846002)(6512007)(6506007)(105586002)(110136005)(6116002)(106356001)(26005)(316002)(8676002)(36756003)(50226002)(81156014)(186003)(14454004)(256004)(14444005)(2501003)(486006)(54906003)(2906002)(2201001)(6486002)(2616005)(52116002)(386003)(6436002)(476003)(6306002)(102836004)(8936002)(6636002)(55236004)(71190400001)(305945005)(99286004)(81166006)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR08MB3450;H:DB7PR08MB3530.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: h1VJVuuthXOeXNF+wZ9XtNDhy+fcoV2j+sRnM0VlnuPJQFn3vFvf95grWmwBe5TZcloCwUgxzJkyZlNO776vAJ5gN16bbV7iHNz5ASQrQRCyogIF4opmsBPBKJ0KZj63eVbyLO6tVPkJaN+6aRhyVo4RVavfipYTx4O4g7qu42X4OISi1wfb8lqHy8CM/XpyH+ZAHO895i6NWsdxf/Cv5AfMrfXu1B8adEreH5KUDby7W8R0xJXn8kx5ngnPrx01mnO0PZuKUVUJk+Nan78cTQXm6RLBbtvTVW00Ix/Y1dKcWoR6QKT1PNyt6MdLLxxOlSQDJt9G8LSjsN5TafgVeOVlG4GaKwGwjhfcCRQNtfuN5xC69ppPfhhr8XECn9yMFSvJXT9NWZbg/E1eQKbP4aV902zbsM3kStCX75j2AgQ= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01d32956-b61f-4bfc-de1e-08d6b8e56d19 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Apr 2019 10:08:04.1520 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3450 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixing the DMA mapping sg segment warning, which shows "DMA-API: mapping sg segment longer than device claims to support [len=3D921600] [max=3D65536= ]". Fixed by setting the max segment size at Komeda driver. This patch depends on: - https://patchwork.freedesktop.org/series/54448/ - https://patchwork.freedesktop.org/series/54449/ - https://patchwork.freedesktop.org/series/54450/ - https://patchwork.freedesktop.org/series/58976/ Changes since v1: - Adds member description - Adds patch denpendency in the comment Signed-off-by: Lowry Li (Arm Technology China) --- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 4 ++++ drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/= drm/arm/display/komeda/komeda_dev.c index 7f25e6a..b4902ae 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c @@ -8,6 +8,7 @@ #include #include #include +#include #ifdef CONFIG_DEBUG_FS #include #include @@ -245,6 +246,9 @@ struct komeda_dev *komeda_dev_create(struct device *dev= ) goto err_cleanup; } =20 + dev->dma_parms =3D &mdev->dma_parms; + dma_set_max_seg_size(dev, DMA_BIT_MASK(32)); + err =3D sysfs_create_group(&dev->kobj, &komeda_sysfs_attr_group); if (err) { DRM_ERROR("create sysfs group failed.\n"); diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/= drm/arm/display/komeda/komeda_dev.h index 29e03c4..83ace71 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h @@ -149,6 +149,8 @@ struct komeda_dev { struct device *dev; /** @reg_base: the base address of komeda io space */ u32 __iomem *reg_base; + /** @dma_parms: the dma parameters of komeda */ + struct device_dma_parameters dma_parms; =20 /** @chip: the basic chip information */ struct komeda_chip_info chip; --=20 1.9.1