Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1611495pxy; Fri, 23 Apr 2021 12:15:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4NwNkAbHHot+aOlgsWd33F4mTVMQqGb5S8k7BDM4btJhc7fvbZVkEWzJPC6FD1X49NCRM X-Received: by 2002:a05:6402:254c:: with SMTP id l12mr6120074edb.278.1619205335297; Fri, 23 Apr 2021 12:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619205335; cv=none; d=google.com; s=arc-20160816; b=E1Mf/qpWM3v/Z+SRz3+k+avgzO3QHxWbwf7nAdqq/SoglvPA44pQ/YQDCGTp2pCFEu wbJHBRUHEuGIGn7FC70HAu6nc6Y62XRpd/W1w6cbg9/lKdmH/COwbWdOIyyhU7bUgPWo D0E559aw3RhBnRseVsM+tFGAsIcH5B1mo0AagMXjNgacg0e+jJNStFCQWsyVz3R8gWaY GIIYysLAnfB4l0lzmhf/a/mBGXjCSY4Vtlnjt5VDl9O7ewDYfTr1x6Y0TYBKF/gaC7/g iXXaBfs2KFcRHq587VmMTZkDv3y5B2inDMiSn/HmR1x0CQvQflxTOe/HStQ/sLFkANmc xy6A== 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=PiGI3myDVeLMq9GsTguuYbk0A7yStjg2eQhCDVfOEQY=; b=iNRgcpL2eLFOulOK9JSbrkFlTDxMixWnNjhDdpmDJjJc105TYAeV9cojgHtseJsAVl dANsHiJOlisq/gLU4lmt4UTNzOrCY7lOPUqeQ3sLJShPzWVgtlIN0KFpnT6z/8zpKsKE p2NoZnCUkCYgxFCNVjHfca/p/naVkd9YvWDUhil6VYXC0lxkb8CVCc3PEky2YcOE65uH EdY9x5o1vaaMZlt+1oaviWcVZqU0FNI/3c6YodctyP4r1Zje1QrCaf7oXtEx4D2C/SdF 2SRPlofBYSoshI6/HRLiywIlGKiAGLuyr52eK+JzrVay2LTYdXqiuNbrV/8+3rB0f209 exIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marek-ca.20150623.gappssmtp.com header.s=20150623 header.b=DWzTq3eg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nc38si6096025ejc.570.2021.04.23.12.15.11; Fri, 23 Apr 2021 12:15:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@marek-ca.20150623.gappssmtp.com header.s=20150623 header.b=DWzTq3eg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243768AbhDWTMl (ORCPT + 99 others); Fri, 23 Apr 2021 15:12:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243751AbhDWTMk (ORCPT ); Fri, 23 Apr 2021 15:12:40 -0400 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81E86C061574 for ; Fri, 23 Apr 2021 12:12:03 -0700 (PDT) Received: by mail-qk1-x731.google.com with SMTP id o5so50703265qkb.0 for ; Fri, 23 Apr 2021 12:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PiGI3myDVeLMq9GsTguuYbk0A7yStjg2eQhCDVfOEQY=; b=DWzTq3eg0IbdDQvqfaFhQmhIGoIvmyqq6SW2iUme8FM7yZjWOixBh34TBi9My2y/cG xYYjK+Y4scVUxuF79TXAPOxnyhucsXgaHzlJv0YzaQXhEe+3TQ9oO7obCCoCjoI7IlHZ Vk0CLw0Isl2ZE9ZtHcawKjRZsWUixj+WM26qVsLinOQrozGuf7AnfzwBwkdqC3pkVv0j pPpSx791zPpHZx9ACX+6oZtf8xyF7KaShxjG9ARa8QJNOCBb54nA5l2NC5UdjPeUGU4J 0qp3G65Q+VgzhA7XcxriT74sY/a+ShwNI9pV9HwAQQ27wdZXSZwCMO9xm9BM+GUrNrUv 5dYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PiGI3myDVeLMq9GsTguuYbk0A7yStjg2eQhCDVfOEQY=; b=jYseyeY8cjVZLV3CsgVOtGkblyjFI8OgNI9uyKyxns6MAZsjbgkDouHj+hgwShYfCD 7iLfKJbMEh5mOhJvW/VNCS8nN9rf0oiuz0RCVrhQGMYKv0f+AWvNcgOWF0HYbg8CLoQV wMyKhRpMwDaAxSMVx3O4rQh9/AKqQpEmVS+EEyxW30WFTtemSuuKekvaDgwmSMUs2s74 xAd6nkS2iiRXdkAe0mKa2Wo1kL0FMT3h1ioHOB14xsXba+BCmFQhmSefmddMqsZC/MpX /yUZA21CgJX7GQ5je1jXjG/30mNqc+EYmNb2izpYIetyohHzEAwteC85VhJdPfHgTdT/ 44Bw== X-Gm-Message-State: AOAM532T2lE6lngIR+l8wx40KS3W6O0Fi9tGuiQvLYDH+gu3+YhkiKH/ 6pvdfhnaE980J3pOBYVr2V/CgQ== X-Received: by 2002:a37:b947:: with SMTP id j68mr5634704qkf.108.1619205122814; Fri, 23 Apr 2021 12:12:02 -0700 (PDT) Received: from localhost.localdomain (modemcable068.184-131-66.mc.videotron.ca. [66.131.184.68]) by smtp.gmail.com with ESMTPSA id a22sm4834630qtp.80.2021.04.23.12.12.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Apr 2021 12:12:02 -0700 (PDT) From: Jonathan Marek To: freedreno@lists.freedesktop.org Cc: Rob Clark , Sean Paul , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org (open list:DRM DRIVER FOR MSM ADRENO GPU), dri-devel@lists.freedesktop.org (open list:DRM DRIVER FOR MSM ADRENO GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/5] drm/msm: remove unnecessary mmap logic for cached BOs Date: Fri, 23 Apr 2021 15:08:17 -0400 Message-Id: <20210423190833.25319-2-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20210423190833.25319-1-jonathan@marek.ca> References: <20210423190833.25319-1-jonathan@marek.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No one knows what this is for anymore, so just remove it. Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/msm_gem.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index b199942266a2..09abda42d764 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -207,21 +207,12 @@ int msm_gem_mmap_obj(struct drm_gem_object *obj, vma->vm_flags &= ~VM_PFNMAP; vma->vm_flags |= VM_MIXEDMAP; - if (msm_obj->flags & MSM_BO_WC) { + if (msm_obj->flags & MSM_BO_WC) vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); - } else if (msm_obj->flags & MSM_BO_UNCACHED) { + else if (msm_obj->flags & MSM_BO_UNCACHED) vma->vm_page_prot = pgprot_noncached(vm_get_page_prot(vma->vm_flags)); - } else { - /* - * Shunt off cached objs to shmem file so they have their own - * address_space (so unmap_mapping_range does what we want, - * in particular in the case of mmap'd dmabufs) - */ - vma->vm_pgoff = 0; - vma_set_file(vma, obj->filp); - + else vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); - } return 0; } -- 2.26.1