Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2872595lqo; Tue, 14 May 2024 11:46:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVO08sD4TXLLrfjVMIeAIkBrEp3ECgBLrU715oGLROPkiZtEzdhtJDxLUXDyTImwfklY6iRNig4btHb9dU2K5D9rLjy9vAIQOfRzJAdiA== X-Google-Smtp-Source: AGHT+IEwZ7pEnXIFHNCNyGi3Yxw/3qjnMg92I3iaY26d5hTIWwbBxFJZR3HsO6JkokaG+WSM3FPl X-Received: by 2002:a05:6e02:218a:b0:368:efa4:bdf8 with SMTP id e9e14a558f8ab-36cc14c0c98mr174804565ab.21.1715712405505; Tue, 14 May 2024 11:46:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715712405; cv=pass; d=google.com; s=arc-20160816; b=XonM/eghmlMUn3YpDnw/p7Cc2zY6Mn+NVsBtkaAuoY+71uTYGHQ/Lk59UTG3F6kFo0 lLjygvljlfZ/38vmcCIPkKif7XvN0wF4OFq4eQhZp8OhYEknUDwp1kpqSK8SEJ+d2SrP q3qbSjqD4yCvwWSQVrExAOluVZlcQbbfmY2xzCapNju0j9MXBngtlHrwhqeq+VqN0r3h fB8ThzFEcMVdAn1OcWxGKWM3CC2hcMpRYZ2T8s/XAv6c0oCamNmC1GR5p1Y7Udt3ehYS ejX1yw4ORP4ieHralf6SyR2aRqP9bh900sa7jTPkWuDErMuk3iv6nlivXndpWUkoNSQ9 yVhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fqmbST24fPtvgiBuCK/vtw9KZSeJV3pS8ZQtIGx96Ds=; fh=YOYXp5r08oqiNXexTJszEkOvgYGABcjZrboz6Frk894=; b=cb7aZucldlmeimDeZVC39+XEeizyjLCl0Tm7igpjzzfcTQ13tNdz0hHTr0mzwaoRh1 ggGPPDi/pR9CGC8OLX63EuEY4K+U+1DuprhMkKSi2PzSUlTO7eWLPLxlaC/kLldXDd35 senCCtkAdU69UDJa0GEpFvaHBVyl+VM2HM/ioC3wJLK0GBvk7rGk55sTRlT7Tru7nT9X kxkWiM2qH1tVTum+oRUr1Mb2aRpOEPzTr1mUtmvGbkHGm5kzyTDBtz49g60n4q67MDjh fvhRa9teRdYTFWDY9aHSFLmIM8Os0BwoL3rg0zsUKMW2ii6zt/8dbHTgRbPjfBd0b9no Fifw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jnStNrpy; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-179075-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179075-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-634115305cdsi10373483a12.446.2024.05.14.11.46.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 11:46:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179075-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jnStNrpy; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-179075-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179075-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C95FEB236A0 for ; Tue, 14 May 2024 18:43:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5772A181322; Tue, 14 May 2024 18:42:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="jnStNrpy" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14B70181303; Tue, 14 May 2024 18:42:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715712139; cv=none; b=sNV2/oxRoVXBYwVuvt7aO67gsfOiEz/ljeS4pUryjWHCeMqWrAE37OibBv5dLTuUwy2RUDa+bjVCoe7mT985VgVRGtu795NDbDDrrz3nterd7orl8rEP9l2ZL7Cisu8Oy4pZ+M8YOIeGG6/tBLYoDnPmu3h0luikFPpFKDrWKRo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715712139; c=relaxed/simple; bh=0wNd6nOWp7TDgA5f8KCU5SkKx3B7tcndAHrRejtSNbM=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jJtww9zL78P3CStqvfxduyO736wsTvt93IJGkVILzsNBiDdhaChJxgNl+3AOQGdn2dTAzRsfgZlKk8d9RK9VaYquxrs0mlDYi1etI2dp3Uy2J4deYW1i5OwXcJ393izDT62BRTP/ngVuSkb2CB/Dgd5g179RPxGmBJY8lxd3UHA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=jnStNrpy; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44EIHZlF010411; Tue, 14 May 2024 18:42:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=qcppdkim1; bh=fqmbST24fPtvgiBuCK/vt w9KZSeJV3pS8ZQtIGx96Ds=; b=jnStNrpyLdapYPAS1whCEp3bsUiRQFnr/RgHX bH2CX+EVz6m1gNYT3m4gu0h9PyA4cgOHurrykpTNY2v4kUtmGR0txkZpyb7B6SJu JQboeVuJcPgcvI52D0UkezzusnS3me0tLUsybnZoUcRIVfr8JYJL779RD4IG0YX4 wJn3yOE9I3vH/MOrSaGvkfl7cOYpBzH+XyDLIPiRfYDIods5wn4Yw2/kb80ZQsUV PQ/4DHLlmhszjWmTPE4biMTYb3NR/G1nqV8bIUHrbgGEormQj774TXtlmsuyNjPe YM0fSIsHoSkdrtH2x+LXVHQWDvx04q0xQYpHLGKlB3Nw8pDvQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y21edf1hm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 May 2024 18:42:05 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44EIg4Lw000804 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 May 2024 18:42:04 GMT Received: from hu-akhilpo-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 14 May 2024 11:41:59 -0700 Date: Wed, 15 May 2024 00:11:55 +0530 From: Akhil P Oommen To: Rob Clark CC: , , , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , "Daniel Vetter" , Konrad Dybcio , "Bjorn Andersson" , Connor Abbott , Ruan Jinjie , open list Subject: Re: [PATCH] drm/msm: Add obj flags to gpu devcoredump Message-ID: <20240514184155.lt2stiohrh4sfsxy@hu-akhilpo-hyd.qualcomm.com> References: <20240513155150.166924-1-robdclark@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240513155150.166924-1-robdclark@gmail.com> X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: cl505ZX_pPUkI21mYcHeK5e7l2VPlpXM X-Proofpoint-ORIG-GUID: cl505ZX_pPUkI21mYcHeK5e7l2VPlpXM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-14_11,2024-05-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=898 adultscore=0 priorityscore=1501 bulkscore=0 spamscore=0 mlxscore=0 malwarescore=0 suspectscore=0 impostorscore=0 clxscore=1011 lowpriorityscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405140132 On Mon, May 13, 2024 at 08:51:47AM -0700, Rob Clark wrote: > From: Rob Clark > > When debugging faults, it is useful to know how the BO is mapped (cached > vs WC, gpu readonly, etc). > > Signed-off-by: Rob Clark Reviewed-by: Akhil P Oommen -Akhil > --- > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 + > drivers/gpu/drm/msm/msm_gpu.c | 6 ++++-- > drivers/gpu/drm/msm/msm_gpu.h | 1 + > 3 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c > index b7bbef2eeff4..d9ea15994ae9 100644 > --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c > +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c > @@ -887,6 +887,7 @@ void adreno_show(struct msm_gpu *gpu, struct msm_gpu_state *state, > drm_printf(p, " - iova: 0x%016llx\n", > state->bos[i].iova); > drm_printf(p, " size: %zd\n", state->bos[i].size); > + drm_printf(p, " flags: 0x%x\n", state->bos[i].flags); > drm_printf(p, " name: %-32s\n", state->bos[i].name); > > adreno_show_object(p, &state->bos[i].data, > diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c > index d14ec058906f..ceaee23a4d22 100644 > --- a/drivers/gpu/drm/msm/msm_gpu.c > +++ b/drivers/gpu/drm/msm/msm_gpu.c > @@ -222,14 +222,16 @@ static void msm_gpu_crashstate_get_bo(struct msm_gpu_state *state, > struct drm_gem_object *obj, u64 iova, bool full) > { > struct msm_gpu_state_bo *state_bo = &state->bos[state->nr_bos]; > + struct msm_gem_object *msm_obj = to_msm_bo(obj); > > /* Don't record write only objects */ > state_bo->size = obj->size; > + state_bo->flags = msm_obj->flags; > state_bo->iova = iova; > > - BUILD_BUG_ON(sizeof(state_bo->name) != sizeof(to_msm_bo(obj)->name)); > + BUILD_BUG_ON(sizeof(state_bo->name) != sizeof(msm_obj->name)); > > - memcpy(state_bo->name, to_msm_bo(obj)->name, sizeof(state_bo->name)); > + memcpy(state_bo->name, msm_obj->name, sizeof(state_bo->name)); > > if (full) { > void *ptr; > diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h > index 685470b84708..05bb247e7210 100644 > --- a/drivers/gpu/drm/msm/msm_gpu.h > +++ b/drivers/gpu/drm/msm/msm_gpu.h > @@ -527,6 +527,7 @@ struct msm_gpu_submitqueue { > struct msm_gpu_state_bo { > u64 iova; > size_t size; > + u32 flags; > void *data; > bool encoded; > char name[32]; > -- > 2.45.0 >