From patchwork Thu Mar 28 07:25:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lowry Li (Arm Technology China)" X-Patchwork-Id: 10874561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 07D89139A for ; Thu, 28 Mar 2019 07:25:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4EC2288E8 for ; Thu, 28 Mar 2019 07:25:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C81C528B0C; Thu, 28 Mar 2019 07:25:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 50D53288E8 for ; Thu, 28 Mar 2019 07:25:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BEE16896B0; Thu, 28 Mar 2019 07:25:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130085.outbound.protection.outlook.com [40.107.13.85]) by gabe.freedesktop.org (Postfix) with ESMTPS id D6D7D896B0 for ; Thu, 28 Mar 2019 07:25:03 +0000 (UTC) Received: from DB7PR08MB3530.eurprd08.prod.outlook.com (20.177.120.80) by DB7PR08MB3532.eurprd08.prod.outlook.com (20.177.120.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.18; Thu, 28 Mar 2019 07:25:01 +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.1750.014; Thu, 28 Mar 2019 07:25:01 +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 Subject: [RFC PATCH] drm/komeda: fixing of DMA mapping sg segment warning Thread-Topic: [RFC PATCH] drm/komeda: fixing of DMA mapping sg segment warning Thread-Index: AQHU5Tdaj2sOzmoqEEaVRCerOJix/w== Date: Thu, 28 Mar 2019 07:25:00 +0000 Message-ID: <1553757859-13506-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: HK0PR03CA0075.apcprd03.prod.outlook.com (2603:1096:203:72::15) To DB7PR08MB3530.eurprd08.prod.outlook.com (2603:10a6:10:49::16) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 1.9.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4136f773-35d4-44d3-d567-08d6b34e7ccc x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4618075)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DB7PR08MB3532; x-ms-traffictypediagnostic: DB7PR08MB3532: nodisclaimer: True x-microsoft-antispam-prvs: x-forefront-prvs: 0990C54589 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(346002)(136003)(376002)(396003)(199004)(189003)(386003)(110136005)(2906002)(6512007)(86362001)(2201001)(14454004)(316002)(25786009)(2616005)(478600001)(54906003)(476003)(4326008)(305945005)(8936002)(256004)(81156014)(97736004)(486006)(72206003)(71190400001)(14444005)(81166006)(8676002)(50226002)(105586002)(106356001)(71200400001)(3846002)(7736002)(26005)(186003)(6116002)(6636002)(68736007)(6486002)(102836004)(36756003)(99286004)(6436002)(6506007)(2501003)(52116002)(53936002)(55236004)(66066001)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR08MB3532; H:DB7PR08MB3530.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: 8ejJ4crURF8DGuiOVOwhelNMBvBbOkwjANyfvS1oaP4PqaEr5GKvCwW/43HzIqDsUJkhnWHGz4Rnhep8GKzZ+9VAC/jAYhMybuocXxuuMzL/b/2h4lwnCj6Z7O/CMsxswEEL6JQWQkYTdxXCQwimwlLt0xyjJAkUEwtFV5MjbWv7rMqm98Hf3naNZBcOk5q4TsLnp6GC9OZNPrB5CdR0IGP8m9N14yfSD5NlwQaGQ9AmxY19UQwzZC8+wzFDODzkVrA+3Nab0eu4OsabDF+MPfUUhaS/H2imo6D2caPC1+aI89FtyyTwQyvH5nGh+FJQGRJcx9oyJoaGWZyIM1IqSaSpmtVqHUKptoR1z0bfqigmoh38Wotoc1qhxbwVBNEMyCaLMw5lQ/D/Aa2nZ1qqftfL+Qs/8gkyXc3qNZcnAzA= MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4136f773-35d4-44d3-d567-08d6b34e7ccc X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2019 07:25:01.1600 (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: DB7PR08MB3532 X-Mailman-Original-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=YyX2kz54UWvJwMSXFpx9NAYTFnCVmfZtzGcWXicjrgo=; b=kLOMuVLPluxBPq2tZESO8tG4qH8msPqRhT6OFsp+qe/oM1JQZbECINQF40sNGifJieVo4/o7kHIsBMNU/f3u+ssf9RpvZ1cOLPtz6z73kd0cJMxuqkleDfUt+nBNjffuG+tw7f20tnQZk3uQTEdn3sQ1DX+vV/3MsKeSPMG6u+Q= X-Mailman-Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Lowry.Li@arm.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ayan Halder , "Jonathan Chai \(Arm Technology China\)" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Julien Yin \(Arm Technology China\)" , nd Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Fixing the DMA mapping sg segment warning, which shows "DMA-API: mapping sg segment longer than device claims to support [len=921600] [max=65536]". Fixed by setting the max segment size at Komeda driver. Signed-off-by: Lowry Li --- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 4 ++++ drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 1 + 2 files changed, 5 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; } + dev->dma_parms = &mdev->dma_parms; + dma_set_max_seg_size(dev, DMA_BIT_MASK(32)); + err = 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 0c3e32b..d8cfa92 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h @@ -146,6 +146,7 @@ enum { */ struct komeda_dev { struct device *dev; + struct device_dma_parameters dma_parms; u32 __iomem *reg_base; struct komeda_chip_info chip;