From patchwork Mon Feb 26 02:11:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776648 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D99E7EAF0 for ; Mon, 26 Feb 2024 02:11:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913511; cv=none; b=TsvDo5MwyZgKFGqyo746vMNnjjMukYma+hgWBwrUXCp3jPfcpwcPOZOxAKSAS7UQcR2NYAOesoxBfn4KN04w2Th8mZQazFnHd0pOemuYpWeVnWMXh59hDbtnswRA023I/zKApVVM3WHzW6OMi/Zce3JwimwVUJ4VSq8lxLl8P3U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913511; c=relaxed/simple; bh=GCmbOiHpksQl5QzvCUG6WPQ7hoPhwGILSxcYlA8FkiE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sOEwxHwmL8d0FxxTlAgbSoiFYip+i3h2JrPqC1BxAt7/4odhjrJaI/jQwSBEXkSOIuEbJHek4k1Vo9uajNy/zGNsqes2W/afpYC+MD1zgeGqde6oek6zrDyS/tIFahUASmesrtPwa1mjDNmgiYznO9dyCiQLxCpP3EJ0sJf+TTU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=aFUYWtQx; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aFUYWtQx" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-512bb2ed1f7so2712098e87.3 for ; Sun, 25 Feb 2024 18:11:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913508; x=1709518308; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3YO49NCblAtKBTyW/HG28rdBp+P7ciUnjc6tjgHkhxc=; b=aFUYWtQxGJ7HmbFEUQU6L0admNGwZzwXSMMYX74ZjqKwYOubxaPtjD7EFcK8HLc3lh TmDBxkbp7c8m5IeaklSJKpXGQpnT4VsY9uWADbRZa9d5T7MT/Bp2xeLdpW2lmyguC0E0 4b/WVNqzAQktIY5t98U82Np5zr6E0nPa5FXQ9ZHCPLWRePYH15nXbET90M4xt/FWZsEW mH9+n9kzDHgak7bX7w/NNjsRPYqVznDmFprXqQOrWprGyG4LoZEZ8vP0fY8aANjhGhVQ ygFrfgGCAawptkjpP4wxfuJHLyctQge5uYcWbpDwep+FnCEO5hGlcPvMCwOJams3pRpi k0Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913508; x=1709518308; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3YO49NCblAtKBTyW/HG28rdBp+P7ciUnjc6tjgHkhxc=; b=RXp2p18V9R4kXSRj/fp343JsDxplGsfxWYIwi6AbjOzFAxuuUkJ63DUgRq+WhZAq2Z uyq8qXB2Mxg/GR4Iy5vHDP6zf6nAM2CjEEznh7SrtpEnisOU9TnWJX8cXLnQbRI9eQUR 5UBQ+HfWNAdjvD9C83s4JmPhyNe9j4n4aVPF33uqnfBq6xYDAj97aZ94K0Sjn1J1snnS FqasrDhr6na0fk8foRqWTTSRrLXmfau9xxnoDdVtfN8+8Ud1REQzVhV0p1YroKpHQlN5 XUJS8BS3h/A8TouMDpPZmjipZoClGFl+Ug9N2YdYYR85cUpm6Dc+Kv4zdSDDRNA2MZ+a QFLA== X-Forwarded-Encrypted: i=1; AJvYcCXNoGkiYX7lIKlfPTAqBqdXgVT+paj1/Vf/p84eZhce2Om1ZZqYwGSmnc6HLcDo4T5H+w0RqywYCZv0sHJk9eIclaohz+NuhWqxbAhRFQ== X-Gm-Message-State: AOJu0YxJVxUMvvmvl60qSL0bARGQUi3SsPL4KW0kgPsMCJn4J2zsBDm2 dV/OXqqvfLNm0xsoNtiq4ZeiirjzVcN3yInQqMeLpOINGkzIR52zrI1v6OnFPx4= X-Google-Smtp-Source: AGHT+IGM6arZuGaiRIqhoTaiESYpSqS7ARUqNQhjVEnkptr/m2/6XCawaKQgJuuQGgnyQSeG+9VzLQ== X-Received: by 2002:a05:6512:ea5:b0:512:fc6a:2d10 with SMTP id bi37-20020a0565120ea500b00512fc6a2d10mr1487797lfb.40.1708913508068; Sun, 25 Feb 2024 18:11:48 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:47 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:37 +0200 Subject: [PATCH RFC 01/12] kbuild: create destination directory for _shipped handling Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-1-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=905; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=GCmbOiHpksQl5QzvCUG6WPQ7hoPhwGILSxcYlA8FkiE=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/NggplOAhkZ4TcIUVFZRYGYJgjLoTm1ot7+w zpS8LPTlAaJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYAAKCRCLPIo+Aiko 1bBlB/9thCMztpjZ24AQZfOl4nGcw36lRs6sD8zWSRDqcZ7DDXW88HukH6n9X4QEYqtIrmCv3Uf I2u2GjCLznZKSn0lsK6JVodcOS1pxZOr9aEG0RsVOgVGNdT0UiMqBHFMdLZOMEc40hTlNMc5KEp LbOvELeAMQ22xduaK228sjQs3A24dUtq19IdBx0pJYjkBqG3SYhQi0+M2PbsKpmZy5ByqiroHl7 ymxm4UCKSgEmmzxWxknN6HoVtSeZlSsejTjfDKjcQeL0GWnhE52u1JA4aOPketCWodUKkwg3Kg3 KVqi53EWoXeS+iQoxFilQyly44dJ9U1sl/RGFZ1K1CcWnviO X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The driver might decide to put the _shipped files to the subdir. In such case the cmd_copy might fail because the destination directory is not present. Call mkdir -p to make sure that the destination directory is present. Signed-off-by: Dmitry Baryshkov --- scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index cd5b181060f1..94373eeac420 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -297,7 +297,7 @@ endef # the copy would be read-only as well, leading to an error when executing the # rule next time. Use 'cat' instead in order to generate a writable file. quiet_cmd_copy = COPY $@ - cmd_copy = cat $< > $@ + cmd_copy = mkdir -p $(shell dirname $@) && cat $< > $@ $(obj)/%: $(src)/%_shipped $(call cmd,copy) From patchwork Mon Feb 26 02:11:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776647 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 629E1EEDA for ; Mon, 26 Feb 2024 02:11:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913513; cv=none; b=Zf56i5EFZUhMvmy2nBH42t2OgAsSEG+iHjS2h1XYWxh/tsmZ4WzP0FYIYk7q3pMImrLqecG280QOd27HnW7vMb9iaEJ7Cu9SAii1iE6GrHi+qC+Om66FfBNJCErMFhkQMpsFPg64T+CyMKsL+O8sPn6RVu2V9qDngObpXmYckHQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913513; c=relaxed/simple; bh=Qgjc0zwou9fhsXbbN2p4ZWlMuaNpRr7RxW3B4yymOWk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bMV8U33oWbPxioVGU396+z+2w9i3HFRfB0OLFXD/Xf4hXg56WURkE7Fno2eO8J3NBD7I0OBayz+1sNzRq6jlDRTwPHJXrBi9CjZyX4jD9cN+RZq+ecOGjFT+q2J/VzJP/tTSEyxUuxFiMZmrilikMbhpzWslr/m5CLO+iY2WsbI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=AvX+VAXw; arc=none smtp.client-ip=209.85.167.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="AvX+VAXw" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-512e568607aso2277477e87.1 for ; Sun, 25 Feb 2024 18:11:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913509; x=1709518309; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=J8Y0RnqdkkNJT2IOUAgIJwE7VvEMel7kUBPozDnljrU=; b=AvX+VAXwD9urSpx62htNyLPpR71sZNzFRIqk/vS72cGHNvendjf1GPzFmIMIWiI0Z8 hHuTGMmPy2aLiu52o68iGIxkPpIlnCUq0vA8IroyKd/gsh78qQhPfeHg2bhXN4Gdw1bc IdIkNBgv57B73gEPl54qNu7Cy6Bq4TfuKzg4y/phGHJ7r/sxGs2XuZeV4a5yt8SsUu7F fnFQ7TvIOW+YhWOSevZpHsU7mqdm8h8T8t3V8vWb7KGm1bwYMku+HuoAAMvT70SiAobr IJ7Qx8KisH6lBzaeQi9qdpXk+HpISSNFbALdUwCa+tGUrQtjV84GrIJmQasoLM7z1UMf WL3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913509; x=1709518309; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J8Y0RnqdkkNJT2IOUAgIJwE7VvEMel7kUBPozDnljrU=; b=mbF+onc+t7Kd8BEYKeWKTgEQXbLzEDFAelZX3ZMK6XLEGWYF3LIdq8x0tA/D66dbbN aLul7oJwKENS3OvyWSiXs8HTY9uC1dlbInegwj6IwoELNY+4Fsp0hiXVfrhPefmYGEJY U2PRQZJKymwpX193VIQ8lruA+ZNKf4JMCD8XWmtVCwGm/ogBre6gs77O8lZoturVV6vF GVYuLgJzgslmlHAWGSSqxH7897VTkqNPfW/AqraCSdOaaIwVgpTZyJsD2Zkr2snu/hXK MaF9SjX5piwJ0iGHPL7kYLZ6B02s82vFwi8EiKooacbbY2+XfgweIf7kePdXuXEbehgr 6Cow== X-Forwarded-Encrypted: i=1; AJvYcCVaOmypYKfRbmTP7hGA6pNmF5I2wtOsSI8SeH8P09jjoX0Sj/DB9kglL+OozIwVxE3rxZvuGCXvrkHP7hS8aF0RHKxXBus9fG8YJ8mysw== X-Gm-Message-State: AOJu0YzK2YduwLil1nVCRtNCr06zfQF2kQJBhcQGsymTPI0+QFWsl+P9 lbCD5FU0d57GPD6Tjimi1wlJAU2/9Ux0z4umHMKuUMGZdjQBj8BAL2pLSEdO2Bg= X-Google-Smtp-Source: AGHT+IHb04FdywAXBPTnIb8Y9ZBSIaj2Xcs5bB/kHt775lPS5Abcp+5HI/DcawcCN0Nsd2vj0epcfA== X-Received: by 2002:a05:6512:40b:b0:512:e053:7c17 with SMTP id u11-20020a056512040b00b00512e0537c17mr2963203lfk.64.1708913509263; Sun, 25 Feb 2024 18:11:49 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:48 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:38 +0200 Subject: [PATCH RFC 02/12] drm/msm/mdp5: add writeback block bases Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-2-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1223; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=Qgjc0zwou9fhsXbbN2p4ZWlMuaNpRr7RxW3B4yymOWk=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/NgcMl8CxHPlugzZLhY4c+N8V9o8zlsAgOmc VKqUnSBl/SJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYAAKCRCLPIo+Aiko 1cDuB/9aUxWVKUUBHVj2GdlUKQaGdLNPnjiYligKy7dj/FB2rJBpux6Dd+P4Ev4m7ajIracQwM9 8vC9uc1jF0aT+EhgNVmMbq6dedCaEbPhJq6Ecv2YK+2qBbzZyOd3D9FtZfrIsq5KItL4WAyAT4F AoxeMZ0gaMUVVPHH2hNModk3t/9dTI5bvJ4L7q9Ar3p3E608qjcEzEQMC14Mw4fPdkBANDObU/m srOHFbZjcMyZeRQUV6vdK4baiSPt95tGeW0Vl1zuRXdDe7IRwYF7NdmiOBnA4JgWNgkfu7wP99k 624m1ZpfxueGOTEcdq7vnJ17IZrc+1R3MMiUEeV2GzMN/+4f X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A In order to stop patching the mdp5 headers, import definitions for the writeback blocks. This part is extracted from the old Rob's patch. Co-developed-by: Rob Clark Signed-off-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h index 26c5d8b4ab46..4b988e69fbfc 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h @@ -69,6 +69,16 @@ struct mdp5_mdp_block { uint32_t caps; /* MDP capabilities: MDP_CAP_xxx bits */ }; +struct mdp5_wb_instance { + int id; + int lm; +}; + +struct mdp5_wb_block { + MDP5_SUB_BLOCK_DEFINITION; + struct mdp5_wb_instance instances[MAX_BASES]; +}; + #define MDP5_INTF_NUM_MAX 5 struct mdp5_intf_block { @@ -98,6 +108,7 @@ struct mdp5_cfg_hw { struct mdp5_sub_block pp; struct mdp5_sub_block dsc; struct mdp5_sub_block cdm; + struct mdp5_wb_block wb; struct mdp5_intf_block intf; struct mdp5_perf_block perf; From patchwork Mon Feb 26 02:11:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776004 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9655DDBC for ; Mon, 26 Feb 2024 02:11:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913513; cv=none; b=pr3ZXsgZvIYfSbifhYSj32VxNBSsxV2YU/JZuiNFvJJR7gxHKKKgXX+9uSM159Ir8blOr5UCS+MUwREZ3XhvqrSj7tHa/W/K2KIp14JUsPbmW3Q2Un7xuwQhGUO+KnQWcxN4NM2wWjBO+avIrkHwaj+ydNVAFiokjcWnz/eBPB0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913513; c=relaxed/simple; bh=WdZH3u8yRJqqGjSYbceH8YaJBPAPZG8nl8tvSvRvLKI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WRDas9ESubNGjhwwK/6MSdCnhwiK5PpNtIjM9ulSaXST9KsW/jN+ObzhQLdgLKnfY9ics44s+P7VEQ7B2FmBxICJYkSN+rEJjroJPm1uNtKJWKXElWu3TAGLcz+/wdJSqh8+5z7LXHvJSVdNvFDyOZwEAUvNphBoCMf3NDrGbnI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ZxlFVSIq; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZxlFVSIq" Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-512e568607aso2277489e87.1 for ; Sun, 25 Feb 2024 18:11:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913510; x=1709518310; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1WXlzxfTJnIOKH/FylqIk+DUTDY6h4Yser6h5v1mYdc=; b=ZxlFVSIqo/jML0LKYlQlj9Cane8r0aymAJiwyEeVdHxxqakYh+Gw8VwZdiz3ApPqbm AhukiD0qICtZuJg1Mqng4Xd97C1m/uBDWLLMRVNSyIrqkqLdJr32T4icDK1VS98AI1MB vobg3kKx869Qt/R9x31KdlHU7bir8xv/NowvDv4tHbtekgsyWRTsYtD0rU86LrZNOL+n 8KC7d9aYD7gDWIgyOdXnZ0JyZQCeYMtIUCu9kElIGLGStOHeJRTEth46Jr7TOVmWA2K6 LHDjswZ4eFfuxvAwA9PjbqSHjxncoVjfKN3I3gxboITLBFl4HIB3aZpthkATCBw5WB43 lzSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913510; x=1709518310; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1WXlzxfTJnIOKH/FylqIk+DUTDY6h4Yser6h5v1mYdc=; b=vD3hG/RRMytXfJ0fcTUJWv9lNc1MqLbH+RNMRPSh1h/jsAykQruDQr2OlAsg6Snzos tioP9P2tefIHmtfu2KHdBe2pwgwr0rE6cUUVfKw+kxu4uEcWJ8hwsuC5kd2k+DDeG44+ rpcc3qrf6axL0YuDBW76Vroig6ABHiqqe4bMFo1G3K+O+r3SmIGToorcnuW9QAQ4Kv3v avHRS0v+34fBYiqT01/McnDBkresoqAKHzDNVdar2xcrOqD07SGOR2TBMaDPRhhkJ0Eg QVUg3zY8lN3CYidXdxUrDqsw+I+K3l/tXZ+WaSSxJ1a6ozvyVBW2XUgNFilrMmg1Xl8c qiQw== X-Forwarded-Encrypted: i=1; AJvYcCWIRoCJTmDm3yKwnFfW9xC+tiPKxy10aUR8aeA8F3wQUGVIKC2pPskAad2flR4mOU/rULtdlABSYN3InhmhyzQyxNAeu0fMWiVfVswBoA== X-Gm-Message-State: AOJu0YzxaFBcHsbwqlwEYtQpb+3/TaNcChergibxBJYsYLkMdM3a8Wcs 3gbP0sw2p5SDvaVfi0B7DaivB23icvse2gggYomaf/wft0wjOwZ5OT1GM6rAJJw= X-Google-Smtp-Source: AGHT+IGY4gzmXsE9Jy4EjXBhsqpj7Vs6TDkLR5AhhddiGoCDdzrxQEMLv0q8q6w5zsVTlzfWfmua6A== X-Received: by 2002:a19:5e19:0:b0:512:b27c:18b5 with SMTP id s25-20020a195e19000000b00512b27c18b5mr3280872lfb.30.1708913509984; Sun, 25 Feb 2024 18:11:49 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:49 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:39 +0200 Subject: [PATCH RFC 03/12] drm/msm/hdmi: drop qfprom.xml.h Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-3-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4711; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=WdZH3u8yRJqqGjSYbceH8YaJBPAPZG8nl8tvSvRvLKI=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/NgDVAiYFY+rVPhG374kNIOZMpIfGmIPD+KZ m2xSKCJUA+JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYAAKCRCLPIo+Aiko 1eSWB/9rUdYOzJ6SCw09S6S+UkN+7JsPcFZ7Gu6TxtaafR7OH17XE91bJ3ge0wpAc3oJZ57VDsI POjy6aEIDWHkitOlLphzzCGeYumnPQXltPcrXfSWBiLfYNS6fBnfdvjUydNLwyLIVT5UBv75LTK XJ4QxWLdUm7gLie2JtRuv4p2nCd+r8cEJq8Oji6/5MBB42qxz49FgXaTV3mfHzg6hlrP/qN+R6W 3Ii3dUInB0VmLJKJ5qT4HLYq9HsxGRL6MlTeyhI3rt0k1PLUdLS0xsd8KIWr2XLLCQXoWonpxAL SH004jrThzbPaOTke85niR6eiVfhZNgpBnDpaRCvVb0iIIE0 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The qfprom.xml.h contains definitions for the nvmem code. They are not used in the existing code. Also if we were to use them later, we should have used nvmem cell API instead of using these defs. Drop the file. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/qfprom.xml.h | 61 ----------------------------------- 1 file changed, 61 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/qfprom.xml.h b/drivers/gpu/drm/msm/hdmi/qfprom.xml.h deleted file mode 100644 index 498801526695..000000000000 --- a/drivers/gpu/drm/msm/hdmi/qfprom.xml.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef QFPROM_XML -#define QFPROM_XML - -/* Autogenerated file, DO NOT EDIT manually! - -This file was generated by the rules-ng-ng headergen tool in this git repository: -http://github.com/freedreno/envytools/ -git clone https://github.com/freedreno/envytools.git - -The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: -- Rob Clark (robclark) -- Ilia Mirkin (imirkin) - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - - -#define REG_QFPROM_CONFIG_ROW0_LSB 0x00000238 -#define QFPROM_CONFIG_ROW0_LSB_HDMI_DISABLE 0x00200000 -#define QFPROM_CONFIG_ROW0_LSB_HDCP_DISABLE 0x00400000 - - -#endif /* QFPROM_XML */ From patchwork Mon Feb 26 02:11:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776646 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4AA9DF58 for ; Mon, 26 Feb 2024 02:11:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913514; cv=none; b=n9pT9AgRZx38DWylTdy4EAxO+4o9RmIoGu6XiNldUlaL+oZkXk+zxftaRw6tKapo8oqxUm0hvXmEBbQS3/ir/ONFeam6kGeSUBlROxL9HOn27I81mxTB6mjhbmk99/LCNdBGBkehVa8OL2RsidNUq4AL4a0/HQufo4D+k/0QlYM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913514; c=relaxed/simple; bh=gqKp1S6/zn30s6BNuSQoNE5FrMLSKTVvFXbaJQz/Q24=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YW75Nkdkmq5OiuAuMc20R2jwSfS+k6Qk6agqAJpvcOpuIiBsR1kHxgFMgL5RoWpboJ/kpdZ/uOB82FuxXmW7dSvjs7wYeM1ukcPsYmlLNd7M3y35fERA0PkrFXVE4nR0SIbYOyu59cTszPgcwA5MAhw9n1OYpT6JIq5XpZvFIjU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=YtO7Sp+K; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YtO7Sp+K" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-512f892500cso551938e87.3 for ; Sun, 25 Feb 2024 18:11:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913511; x=1709518311; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=kbFUU4iMew5gCyNhy6Z/kEtYbNuf40upf3sZEP5LUHU=; b=YtO7Sp+KCI34Akk6kN3MeF3FII3a2RXLrdt/Fw/fj/omwfX0QKv7ZXV0wzo0kaoTSI wliTQTnKt/CIb9zDksKX8+9Xe6T+iw1LrtRv8fbGaFQBpCprTYRzNUn7j/yC64l51MXq UpXy5TXg4ix2323gUPQGq33HDwzWfR0BaCuhf4CMnZ0PNwQY+ninhtXRvqln3GVJ58+E ktOQ4wAoFP2Ip7QoyAxF8AgGjZl3tiv/SoPAquMs86adRhSMegNN/60pqPWDqlj3lUSe WM44SI5CVgU6cjj9DdbKa5/5gSFVBICYmAOJzkLk7N7bNUmWFVSRxHdgcaKHZGLtL0/l JOKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913511; x=1709518311; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kbFUU4iMew5gCyNhy6Z/kEtYbNuf40upf3sZEP5LUHU=; b=qTrIMgmuAG3RvBl9dt5f0CQeDgWyEf3cuQ56iPqszznLbG6teUCDCTNAYzPKbGWbK+ dtz5iHZ5vkbdKpdE5I2UBr49zDsqimSonyPqvcemCkagdRysqskfBFq9JsWTirgNWXmI 82Bn2vcDulhvZda/7DwPqKqiyLH4M440v0edBL11It8GDVaoDKYkowWi83HEKc0UBPRB saOjjFCuiOQV+Vat9Y9PTZ3QDpvThHIhIhlK7puaSHd04YXpch4oNa69MLRBL/oYt7lQ VH9NHJQ9Y3eFmK+xSENH+BpU+pwCduQAl1oew9TGIhDGKWGLzRp8sOlOBZqElcR/Vj8N 8MCQ== X-Forwarded-Encrypted: i=1; AJvYcCWnMsCwrIYwEvMvZSs/aoruMeUyt/AV5hGvqqH1bD7kqPuCOS5edwKVaOSVh4fWuiZKCyruRfBTcp5ua9K+ndH3OiH+8iCnEzCfaBrwgw== X-Gm-Message-State: AOJu0YyLJ/l2Uc/HxtSr/p933fV2rP9HHuQisxikCWEVs16+M4XjhZQa S2fgWKS22ilZKIWMnCRiweAeSV750B4Pmo0pFb2WkJGfb8XV4KbyscjW/Koj6u0= X-Google-Smtp-Source: AGHT+IFWEX3FGjvHck7o5EZQoQ5HeNV3HVBcNoew3wITv2ec0S2Qkt+0vdkvS+siPv6hHkgG5E3AoQ== X-Received: by 2002:ac2:5382:0:b0:512:ed78:2d01 with SMTP id g2-20020ac25382000000b00512ed782d01mr3216586lfh.33.1708913510956; Sun, 25 Feb 2024 18:11:50 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:50 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:40 +0200 Subject: [PATCH RFC 04/12] drm/msm/dsi: drop mmss_cc.xml.h Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-4-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=7249; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=gqKp1S6/zn30s6BNuSQoNE5FrMLSKTVvFXbaJQz/Q24=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/NhvUtEGEwp3sD0XMR/UjOQ2YtuGr7/zEguT qSN7t0HmzSJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYQAKCRCLPIo+Aiko 1ejyB/0bWpiJYXhC1khqlucEDSDjWC2uxgCuQXfoKf4Rvd7XgyjRzb+hiMB6HgDU6XxBKmftKrf TlGZo/paNcjjzInyiSWtjfVYDMrHGmAf4J7xa8PFzTnwXJiBmSDCdzC0RYc/ryB+6/Dv7sOLsGr xKQ2FRt89sSKAGxAsQJFp7fxMTb/voKBB5fhBCOnXBHuY0sEcumefEqN2EdbHIEPd3D/9KtJjwW GbTX3bOQ1CxbaJvnMp+/tMUxA0QqvC3hyqkZc9YL4TcpGFgY161mqkjQscOlRrOCLnvNxArxpL6 TRutJmRwjdJsGxmxxLNIvhG/OBWki5+nhySt1nnrXVHIwDAa X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The mmss_cc.xml.h file describes bits of the MMSS clock controller on APQ8064 / MSM8960 platforms. They are not used by the driver and do not belong to the DRM MSM driver. Drop the file. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/mmss_cc.xml.h | 131 ---------------------------------- 1 file changed, 131 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/mmss_cc.xml.h b/drivers/gpu/drm/msm/dsi/mmss_cc.xml.h deleted file mode 100644 index 7062f7164216..000000000000 --- a/drivers/gpu/drm/msm/dsi/mmss_cc.xml.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef MMSS_CC_XML -#define MMSS_CC_XML - -/* Autogenerated file, DO NOT EDIT manually! - -This file was generated by the rules-ng-ng headergen tool in this git repository: -http://github.com/freedreno/envytools/ -git clone https://github.com/freedreno/envytools.git - -The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: -- Rob Clark (robclark) -- Ilia Mirkin (imirkin) - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - - -enum mmss_cc_clk { - CLK = 0, - PCLK = 1, -}; - -#define REG_MMSS_CC_AHB 0x00000008 - -static inline uint32_t __offset_CLK(enum mmss_cc_clk idx) -{ - switch (idx) { - case CLK: return 0x0000004c; - case PCLK: return 0x00000130; - default: return INVALID_IDX(idx); - } -} -static inline uint32_t REG_MMSS_CC_CLK(enum mmss_cc_clk i0) { return 0x00000000 + __offset_CLK(i0); } - -static inline uint32_t REG_MMSS_CC_CLK_CC(enum mmss_cc_clk i0) { return 0x00000000 + __offset_CLK(i0); } -#define MMSS_CC_CLK_CC_CLK_EN 0x00000001 -#define MMSS_CC_CLK_CC_ROOT_EN 0x00000004 -#define MMSS_CC_CLK_CC_MND_EN 0x00000020 -#define MMSS_CC_CLK_CC_MND_MODE__MASK 0x000000c0 -#define MMSS_CC_CLK_CC_MND_MODE__SHIFT 6 -static inline uint32_t MMSS_CC_CLK_CC_MND_MODE(uint32_t val) -{ - return ((val) << MMSS_CC_CLK_CC_MND_MODE__SHIFT) & MMSS_CC_CLK_CC_MND_MODE__MASK; -} -#define MMSS_CC_CLK_CC_PMXO_SEL__MASK 0x00000300 -#define MMSS_CC_CLK_CC_PMXO_SEL__SHIFT 8 -static inline uint32_t MMSS_CC_CLK_CC_PMXO_SEL(uint32_t val) -{ - return ((val) << MMSS_CC_CLK_CC_PMXO_SEL__SHIFT) & MMSS_CC_CLK_CC_PMXO_SEL__MASK; -} - -static inline uint32_t REG_MMSS_CC_CLK_MD(enum mmss_cc_clk i0) { return 0x00000004 + __offset_CLK(i0); } -#define MMSS_CC_CLK_MD_D__MASK 0x000000ff -#define MMSS_CC_CLK_MD_D__SHIFT 0 -static inline uint32_t MMSS_CC_CLK_MD_D(uint32_t val) -{ - return ((val) << MMSS_CC_CLK_MD_D__SHIFT) & MMSS_CC_CLK_MD_D__MASK; -} -#define MMSS_CC_CLK_MD_M__MASK 0x0000ff00 -#define MMSS_CC_CLK_MD_M__SHIFT 8 -static inline uint32_t MMSS_CC_CLK_MD_M(uint32_t val) -{ - return ((val) << MMSS_CC_CLK_MD_M__SHIFT) & MMSS_CC_CLK_MD_M__MASK; -} - -static inline uint32_t REG_MMSS_CC_CLK_NS(enum mmss_cc_clk i0) { return 0x00000008 + __offset_CLK(i0); } -#define MMSS_CC_CLK_NS_SRC__MASK 0x0000000f -#define MMSS_CC_CLK_NS_SRC__SHIFT 0 -static inline uint32_t MMSS_CC_CLK_NS_SRC(uint32_t val) -{ - return ((val) << MMSS_CC_CLK_NS_SRC__SHIFT) & MMSS_CC_CLK_NS_SRC__MASK; -} -#define MMSS_CC_CLK_NS_PRE_DIV_FUNC__MASK 0x00fff000 -#define MMSS_CC_CLK_NS_PRE_DIV_FUNC__SHIFT 12 -static inline uint32_t MMSS_CC_CLK_NS_PRE_DIV_FUNC(uint32_t val) -{ - return ((val) << MMSS_CC_CLK_NS_PRE_DIV_FUNC__SHIFT) & MMSS_CC_CLK_NS_PRE_DIV_FUNC__MASK; -} -#define MMSS_CC_CLK_NS_VAL__MASK 0xff000000 -#define MMSS_CC_CLK_NS_VAL__SHIFT 24 -static inline uint32_t MMSS_CC_CLK_NS_VAL(uint32_t val) -{ - return ((val) << MMSS_CC_CLK_NS_VAL__SHIFT) & MMSS_CC_CLK_NS_VAL__MASK; -} - -#define REG_MMSS_CC_DSI2_PIXEL_CC 0x00000094 - -#define REG_MMSS_CC_DSI2_PIXEL_NS 0x000000e4 - -#define REG_MMSS_CC_DSI2_PIXEL_CC2 0x00000264 - - -#endif /* MMSS_CC_XML */ From patchwork Mon Feb 26 02:11:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776003 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 502F5EAF0 for ; Mon, 26 Feb 2024 02:11:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913515; cv=none; b=jIKQs1/A+lqzxC9c3LH/Oyf6hqWDSgve6v4L1bEOw5N1xEXxGup+EperqD2BCh08AzfITouRmR13NRw0b4Y14FJ7p7/kg4V4uiQVyhQcT9QW/CUbvzg2fJ1dOQYiSXyGgX51/NxPmb2CDns+3eatovqAfuhVP8l3RCwqGlKPnwE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913515; c=relaxed/simple; bh=Nx7fpXRNpbAX1r5/PwTsdJN6+2r3qO1If+c+S986pBg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=i8RdkvlGQG7kgqN0rR8j29jEiCnS5zMwYC+SD6sAI4kMCmqV+z+3uBNPKLl0AjhAVpSF0zeZs0hmmfkFG1uG1VzNON+QiF8YUM3n986pxii4lAvab6XFrYTSxCdNIYR17m7bYbM5pGm1zMZvbPenTsq3zbOuflYjdnJbgxjbsok= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=XUIO8Whs; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XUIO8Whs" Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-512b13bf764so3147233e87.0 for ; Sun, 25 Feb 2024 18:11:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913512; x=1709518312; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lr1blVGAcoSGI3DjOlnBnp5duz00dIqA6nxHMeCLWdU=; b=XUIO8WhsNrHtaHunDHGcV/8jbd80tPiGv+fLph+l7jRkXYUWqJqfIdiR9EIVj+YSTY pUkL3DMTBHRm3EwdCT8yCzIZ7w9d1RXgxbeFCOAsxgxGEnZIgZ6TXycCWRkoksO5GHGJ IIkR5+Z2desXTAQbEqkkUvScExkq932jdIEBwoXASR08B6CQlP/8M7F9UrixC7y1jYOd hhqyOJ7YNV/4PuOs1rN+wm2Or2TwUPwW3kGdt6UxlViR8J0aVwIqs71dJqCFUsHY3QiX mbdtHGszsYxSENults3hWAnKfv3fD8geI06r1yiD0YdO+QmVbL8bIvmGgg+wMfXoUOSa 7v+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913512; x=1709518312; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lr1blVGAcoSGI3DjOlnBnp5duz00dIqA6nxHMeCLWdU=; b=eqorMeIGOP4lHdq3TozUhPqdO9o71kD6QB6WYdf0pBA3wNWAaIJ29vDNZBIXBvG91d W4SnFvDVly9eGlmTsDeVOveVDat0KWcs+JunFrykU+OuFOp2mIUluGOPUcA61xzowmuk RheiQjxwLONK8fPca7la2se7ZrC5p5nMrdEa5MAXHCd8yGTRpDEKVsxsAuh26DJ7YIcg rQ6PbEYRZBAmfz4SIlBGfViqh5WjYaQicTePTX9MS6pGkYn8hmC2OXOr08YKz46TWo7u nQR6gjSmr2gC+1gHOmp1CnIvas6pTn4UdGWCGXIG+mN0ct6Jc3+Ao0Xz74hkdbries9B Eo9A== X-Forwarded-Encrypted: i=1; AJvYcCUfMLjbCRETEPHtx07kU0krJ3Rp0jYHgGRl0NFvb4W0jn8WKvuWIBiM3EQKBxqah6KrYqw4o4qQOu9gXkIXm/3f3WfuUHsgTBqEJD33AQ== X-Gm-Message-State: AOJu0YzqAcn0nBowBpWp5GSdfDY59DplAHytZwvaP5VnV8uJP84HFefW mH+Q6XAZqSkb3+o4/D2W9aTWFIMIYEJHnoIjSlsIJByfEpNKq/3I14RQYhnpIac= X-Google-Smtp-Source: AGHT+IGwS1S2UIhR7u1D1bdJLxUjT0Jxa/J70GI1DJuamydDmmp3ucw1HVC+ZEydtEqM5NUTau2YZQ== X-Received: by 2002:a05:6512:1196:b0:512:e218:db7f with SMTP id g22-20020a056512119600b00512e218db7fmr4207381lfr.67.1708913511750; Sun, 25 Feb 2024 18:11:51 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:51 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:41 +0200 Subject: [PATCH RFC 05/12] drm/msm: use _shipped suffix for all xml.h files Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-5-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=8048; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=Nx7fpXRNpbAX1r5/PwTsdJN6+2r3qO1If+c+S986pBg=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/NhwB+8UhIVNwQgD1ymNg7h8cxIwJG82l3SB Qh8ciUg7lqJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYQAKCRCLPIo+Aiko 1QfnB/wO4OAKfkCA0ViZeKqmFzhrpWC+RtB6kbCKREZbqvsxR8ezWqAEofG1IKcWAKnCf0ZQ1jK b/DeJwbAIZskh03EEqffohnxySp6RF/WIS/NlBGiYR3wdZ9A1KPhV3XvkyVJ8AozL/FKtq+gLS6 9XBBJWar2aloyeQfC1D41fStDTi6QyLZYaZU2hfbLRKVRQxFIHckuTvrv9m8H8VoQM0EeBKKQnY y6/ipHxkDX82EKk/DpoFvwShjl1QDcnl5vsBVcHRMkacW0bcYgP1NXqrBgtGOPHhOOoF69vd5JA HTbvtv79T0lC7J1qogV+FBT3lUCKu4Cm/ESCDGfV3BlLzKZH X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Move non-GPU xml.h files into the ./registers subdir and add the _shipped suffix. The GPU files are left intact for now, since they require processing via a gen_headers.py, while display headers are regenerated using headergen2 Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 53 ++++++++++++++++++---- .../{dsi/dsi.xml.h => registers/dsi.xml.h_shipped} | 0 .../dsi_phy_10nm.xml.h_shipped} | 0 .../dsi_phy_14nm.xml.h_shipped} | 0 .../dsi_phy_20nm.xml.h_shipped} | 0 .../dsi_phy_28nm.xml.h_shipped} | 0 .../dsi_phy_28nm_8960.xml.h_shipped} | 0 .../dsi_phy_7nm.xml.h_shipped} | 0 .../hdmi.xml.h => registers/hdmi.xml.h_shipped} | 0 .../mdp4.xml.h => registers/mdp4.xml.h_shipped} | 0 .../mdp5.xml.h => registers/mdp5.xml.h_shipped} | 0 .../mdp_common.xml.h_shipped} | 0 .../sfpb.xml.h => registers/sfpb.xml.h_shipped} | 0 13 files changed, 43 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile index 543e04fa72e3..89c9f5f93b85 100644 --- a/drivers/gpu/drm/msm/Makefile +++ b/drivers/gpu/drm/msm/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 ccflags-y := -I $(srctree)/$(src) +ccflags-y := -I $(obj)/registers ccflags-y += -I $(srctree)/$(src)/disp/dpu1 ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(srctree)/$(src)/dsi ccflags-$(CONFIG_DRM_MSM_DP) += -I $(srctree)/$(src)/dp @@ -17,7 +18,7 @@ msm-y := \ adreno/a6xx_gmu.o \ adreno/a6xx_hfi.o \ -msm-$(CONFIG_DRM_MSM_HDMI) += \ +msm-hdmi += \ hdmi/hdmi.o \ hdmi/hdmi_audio.o \ hdmi/hdmi_bridge.o \ @@ -30,7 +31,11 @@ msm-$(CONFIG_DRM_MSM_HDMI) += \ hdmi/hdmi_phy_8x74.o \ hdmi/hdmi_pll_8960.o \ -msm-$(CONFIG_DRM_MSM_MDP4) += \ +msm-$(CONFIG_DRM_MSM_HDMI) += $(msm-hdmi) + +$(addprefix $(obj)/,$(msm-hdmi)): $(obj)/registers/hdmi.xml.h + +msm-mdp4 += \ disp/mdp4/mdp4_crtc.o \ disp/mdp4/mdp4_dsi_encoder.o \ disp/mdp4/mdp4_dtv_encoder.o \ @@ -41,7 +46,12 @@ msm-$(CONFIG_DRM_MSM_MDP4) += \ disp/mdp4/mdp4_kms.o \ disp/mdp4/mdp4_plane.o \ -msm-$(CONFIG_DRM_MSM_MDP5) += \ +msm-$(CONFIG_DRM_MSM_MDP4) += $(msm-mdp4) + +$(addprefix $(obj)/,$(msm-mdp4)): $(obj)/registers/mdp4.xml.h +$(addprefix $(obj)/,$(msm-mdp4)): $(obj)/registers/mdp_common.xml.h + +msm-mdp5 += \ disp/mdp5/mdp5_cfg.o \ disp/mdp5/mdp5_cmd_encoder.o \ disp/mdp5/mdp5_ctl.o \ @@ -54,6 +64,10 @@ msm-$(CONFIG_DRM_MSM_MDP5) += \ disp/mdp5/mdp5_plane.o \ disp/mdp5/mdp5_smp.o \ +msm-$(CONFIG_DRM_MSM_MDP5) += $(msm-mdp5) +$(addprefix $(obj)/,$(msm-mdp5)): $(obj)/registers/mdp5.xml.h +$(addprefix $(obj)/,$(msm-mdp5)): $(obj)/registers/mdp_common.xml.h + msm-$(CONFIG_DRM_MSM_DPU) += \ disp/dpu1/dpu_core_perf.o \ disp/dpu1/dpu_crtc.o \ @@ -115,6 +129,9 @@ msm-y += \ msm_gpu_tracepoints.o \ msm_gpummu.o +$(obj)/disp/mdp_format.o: $(obj)/registers/mdp_common.xml.h +$(obj)/disp/mdp_kms.o: $(obj)/registers/mdp_common.xml.h + msm-$(CONFIG_DEBUG_FS) += adreno/a5xx_debugfs.o \ dp/dp_debug.o @@ -133,17 +150,33 @@ msm-$(CONFIG_DRM_FBDEV_EMULATION) += msm_fbdev.o msm-$(CONFIG_DRM_MSM_HDMI_HDCP) += hdmi/hdmi_hdcp.o -msm-$(CONFIG_DRM_MSM_DSI) += dsi/dsi.o \ +msm-dsi += dsi/dsi.o \ dsi/dsi_cfg.o \ dsi/dsi_host.o \ dsi/dsi_manager.o \ dsi/phy/dsi_phy.o -msm-$(CONFIG_DRM_MSM_DSI_28NM_PHY) += dsi/phy/dsi_phy_28nm.o -msm-$(CONFIG_DRM_MSM_DSI_20NM_PHY) += dsi/phy/dsi_phy_20nm.o -msm-$(CONFIG_DRM_MSM_DSI_28NM_8960_PHY) += dsi/phy/dsi_phy_28nm_8960.o -msm-$(CONFIG_DRM_MSM_DSI_14NM_PHY) += dsi/phy/dsi_phy_14nm.o -msm-$(CONFIG_DRM_MSM_DSI_10NM_PHY) += dsi/phy/dsi_phy_10nm.o -msm-$(CONFIG_DRM_MSM_DSI_7NM_PHY) += dsi/phy/dsi_phy_7nm.o +$(obj)/dsi/dsi_host.o: $(obj)/registers/sfpb.xml.h + +msm-dsi-$(CONFIG_DRM_MSM_DSI_28NM_PHY) += dsi/phy/dsi_phy_28nm.o +$(obj)/dsi/phy/dsi_phy_28nm.o: $(obj)/registers/dsi_phy_28nm.xml.h + +msm-dsi-$(CONFIG_DRM_MSM_DSI_20NM_PHY) += dsi/phy/dsi_phy_20nm.o +$(obj)/dsi/phy/dsi_phy_20nm.o: $(obj)/registers/dsi_phy_20nm.xml.h + +msm-dsi-$(CONFIG_DRM_MSM_DSI_28NM_8960_PHY) += dsi/phy/dsi_phy_28nm_8960.o +$(obj)/dsi/phy/dsi_phy_28nm_8960.o: $(obj)/registers/dsi_phy_28nm_8960.xml.h + +msm-dsi-$(CONFIG_DRM_MSM_DSI_14NM_PHY) += dsi/phy/dsi_phy_14nm.o +$(obj)/dsi/phy/dsi_phy_14nm.o: $(obj)/registers/dsi_phy_14nm.xml.h + +msm-dsi-$(CONFIG_DRM_MSM_DSI_10NM_PHY) += dsi/phy/dsi_phy_10nm.o +$(obj)/dsi/phy/dsi_phy_10nm.o: $(obj)/registers/dsi_phy_10nm.xml.h + +msm-dsi-$(CONFIG_DRM_MSM_DSI_7NM_PHY) += dsi/phy/dsi_phy_7nm.o +$(obj)/dsi/phy/dsi_phy_7nm.o: $(obj)/registers/dsi_phy_7nm.xml.h + +msm-$(CONFIG_DRM_MSM_DSI) += $(msm-dsi) $(msm-dsi-y) +$(addprefix $(obj)/,$(msm-dsi) $(msm-dsi-y)): $(obj)/registers/dsi.xml.h obj-$(CONFIG_DRM_MSM) += msm.o diff --git a/drivers/gpu/drm/msm/dsi/dsi.xml.h b/drivers/gpu/drm/msm/registers/dsi.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/dsi/dsi.xml.h rename to drivers/gpu/drm/msm/registers/dsi.xml.h_shipped diff --git a/drivers/gpu/drm/msm/dsi/dsi_phy_10nm.xml.h b/drivers/gpu/drm/msm/registers/dsi_phy_10nm.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/dsi/dsi_phy_10nm.xml.h rename to drivers/gpu/drm/msm/registers/dsi_phy_10nm.xml.h_shipped diff --git a/drivers/gpu/drm/msm/dsi/dsi_phy_14nm.xml.h b/drivers/gpu/drm/msm/registers/dsi_phy_14nm.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/dsi/dsi_phy_14nm.xml.h rename to drivers/gpu/drm/msm/registers/dsi_phy_14nm.xml.h_shipped diff --git a/drivers/gpu/drm/msm/dsi/dsi_phy_20nm.xml.h b/drivers/gpu/drm/msm/registers/dsi_phy_20nm.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/dsi/dsi_phy_20nm.xml.h rename to drivers/gpu/drm/msm/registers/dsi_phy_20nm.xml.h_shipped diff --git a/drivers/gpu/drm/msm/dsi/dsi_phy_28nm.xml.h b/drivers/gpu/drm/msm/registers/dsi_phy_28nm.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/dsi/dsi_phy_28nm.xml.h rename to drivers/gpu/drm/msm/registers/dsi_phy_28nm.xml.h_shipped diff --git a/drivers/gpu/drm/msm/dsi/dsi_phy_28nm_8960.xml.h b/drivers/gpu/drm/msm/registers/dsi_phy_28nm_8960.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/dsi/dsi_phy_28nm_8960.xml.h rename to drivers/gpu/drm/msm/registers/dsi_phy_28nm_8960.xml.h_shipped diff --git a/drivers/gpu/drm/msm/dsi/dsi_phy_7nm.xml.h b/drivers/gpu/drm/msm/registers/dsi_phy_7nm.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/dsi/dsi_phy_7nm.xml.h rename to drivers/gpu/drm/msm/registers/dsi_phy_7nm.xml.h_shipped diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.xml.h b/drivers/gpu/drm/msm/registers/hdmi.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/hdmi/hdmi.xml.h rename to drivers/gpu/drm/msm/registers/hdmi.xml.h_shipped diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4.xml.h b/drivers/gpu/drm/msm/registers/mdp4.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/disp/mdp4/mdp4.xml.h rename to drivers/gpu/drm/msm/registers/mdp4.xml.h_shipped diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5.xml.h b/drivers/gpu/drm/msm/registers/mdp5.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/disp/mdp5/mdp5.xml.h rename to drivers/gpu/drm/msm/registers/mdp5.xml.h_shipped diff --git a/drivers/gpu/drm/msm/disp/mdp_common.xml.h b/drivers/gpu/drm/msm/registers/mdp_common.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/disp/mdp_common.xml.h rename to drivers/gpu/drm/msm/registers/mdp_common.xml.h_shipped diff --git a/drivers/gpu/drm/msm/dsi/sfpb.xml.h b/drivers/gpu/drm/msm/registers/sfpb.xml.h_shipped similarity index 100% rename from drivers/gpu/drm/msm/dsi/sfpb.xml.h rename to drivers/gpu/drm/msm/registers/sfpb.xml.h_shipped From patchwork Mon Feb 26 02:11:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776001 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C897DF51 for ; Mon, 26 Feb 2024 02:11:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913520; cv=none; b=PSbcXgjwCwCxCZu+dvj7yCwGtxjzsWnM+nMPEYP4hlmp4qCOhQ6OoKIw+AEWH8g1RqLCRTbYXOp5406fz79MRHXcJjpOwVyInuX+xXfh1HmrUVXiMvUvpMaMfC7ykmq7plVCBLKpfn9llDXZ+ioROncW/gGSTL6BYDuN7mAfbVw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913520; c=relaxed/simple; bh=R8Eu2C2HKcbBxGe030EMfAa2TjgAaZXTHmvA2NVBU0s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JkLoNzpHQLOalXToBWAj4uDyVPO6eXp75r3YcQhlandKFUZR9aRRyOduVGmBSpGrRFD9vPMBGcQTtTQ2e2VdUSew5R1gr6PVKeYdYqFAU7kK3dqskU8sGm8nKKzBmMvSejpOHlB8xvWVPBk8fDJZLib3/YCVpwbSq9Ud8f1ywvw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=dpT7+j2S; arc=none smtp.client-ip=209.85.167.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dpT7+j2S" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-512f892500cso551960e87.3 for ; Sun, 25 Feb 2024 18:11:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913513; x=1709518313; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=DInfZIP9I1ToMjy6QIMQmrdiM05SlZIZasIV0p58wH0=; b=dpT7+j2Sumdf4eb0liVvytY1F7E+p99cXE5mnADAqC/yw/pAg3/9/XgRIkACtT5J5t zqG3MAafOLHET0SvWuczaXQST7Zgex9yip69J2OAntNLN08KKjU0qwq8tP33Nsx8VnKD HJLIO6xnZm3OqdoH0Mtj9YfQr0sOwXOeiYdmnw0rNrxbNuHejK7FjEvWiJanaxCODedR mDKnIbSPaX2ldfd4Zh58mhCfGRmA446BEj/i3m3451m+ouHZF/MHhj7CIjcCJykgwRpD Q/odSNMwAa3BG5HEz/qysJ1jAGFj/Z6ar0FpZeX7l+F43mUz5welWz/o9vAsSPAO2QxF LWzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913513; x=1709518313; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DInfZIP9I1ToMjy6QIMQmrdiM05SlZIZasIV0p58wH0=; b=Me/lUvq41yzENnDq5PHQMMoKqKqPys+7YupGPK5KJJZxGEiFBHVpUPYQtLtBWKms54 LWANEChMTlzDQtUAQvKqcVuQCaek+NzCY1jPEGM+csWbFdwlkmvWOZ6qDQ55LooJiBnD Mk8qVyy5FggQtVdnQlV6NTVvKiOMTr5srWT1LB0boV0HTGoLFnHJxH8ejgJS4h5QjIX2 fMG8cPuPjM5EGJEMJx0VeLIBRpmcQ9KxtFtSWruYi8eRDdckG5lNzr1b3THL55zgb5v5 AlOumPJDlII4Cq/tVFswzRjlCWL1rEr0Ej5stnP67Ruoi65ynFo22uImlGMLrlpdrcZl OF8g== X-Forwarded-Encrypted: i=1; AJvYcCVFZAio8xsC9KV25kHZFyCgZWLSUWV+QVmrJwA23Qkna0vliTpq7fjGqvHyaIiqitmEJCaW1rL97l+ARTIIdNHmJ8K5XDEZAUcTKcq68Q== X-Gm-Message-State: AOJu0YyHDjTzHbCVVhGijjzbTrxukPDp+AWgW7nDXcEbkJSCRJGOlMt7 t66x8BvfNlbJZoaypC8qARCy6kWQOPrBcZhL8aaFjF0ETXf4Ea9ZihxG31cQrO8= X-Google-Smtp-Source: AGHT+IEsfNbOrP44KDDGxwL/hgrVqGvBXQF0ZYQSbz6uTs5jVn/0LbCuK7j7WwzmRVnzzO8figbbAA== X-Received: by 2002:ac2:4909:0:b0:512:ce6b:5da8 with SMTP id n9-20020ac24909000000b00512ce6b5da8mr3047612lfi.42.1708913512664; Sun, 25 Feb 2024 18:11:52 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:52 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:42 +0200 Subject: [PATCH RFC 06/12] drm/msm/headergen: import source files from freedreno/envytools Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-6-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=101543; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=R8Eu2C2HKcbBxGe030EMfAa2TjgAaZXTHmvA2NVBU0s=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/Nh6QI8LwfdYwtXvm6KGptusMiSz3YYXq0YO QS+0m8Q/dWJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYQAKCRCLPIo+Aiko 1QVSCACjgLPvWAgE516up3SWst51GlhsXg9KIYXMZifZ/wdPOvVrw4SOAPIdzvF0I08veLd2KC/ xTSj41wSEHoG0hOKSmdVpwuByfAajUrHQ4Rxi2i8AXlDjTEsdjBqzkNJftgN5DySqpO3+P65smy 4rYQ+Ukhx6RifNnuVp+PD0ShH5jqBgw2TmK+IN3KcOQo1T35nwd6yCGEz/NfSqTFoF2v8tS/+RZ +KN6hulN+/AQGGGqdo1SpF96N68FJH4dsED//uEX7KVa4JUMSKeiytiXyN4Q2DF5cYzKbEHlQye 70aoRW2jzVVdJOkz6ZG27+s6ngrac+6LNaGdCk3yAtJ8StyB X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Import headergen2 sources at the commit d88cafa3ac3e ("freedreno/decode: try harder to not crash in disasm") from https://gitlab.freedesktop.org/freedreno/envytools. This tool has been used to generate drm/msm header files from the corresponding XML files. This required committing changes to the Mesa3D project, then manually generating and synchronizing resulting files. Instead import the hg2 tool to be later included into the build process. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/headergen2/aprintf.c | 38 + drivers/gpu/drm/msm/headergen2/colors.c | 61 ++ drivers/gpu/drm/msm/headergen2/colors.h | 49 + drivers/gpu/drm/msm/headergen2/headergen2.c | 502 +++++++++ drivers/gpu/drm/msm/headergen2/path.c | 64 ++ drivers/gpu/drm/msm/headergen2/rnn.c | 1360 +++++++++++++++++++++++++ drivers/gpu/drm/msm/headergen2/rnn.h | 243 +++++ drivers/gpu/drm/msm/headergen2/rnndec.c | 550 ++++++++++ drivers/gpu/drm/msm/headergen2/rnndec.h | 59 ++ drivers/gpu/drm/msm/headergen2/util.h | 115 +++ drivers/gpu/drm/msm/headergen2/util/u_debug.h | 12 + 11 files changed, 3053 insertions(+) diff --git a/drivers/gpu/drm/msm/headergen2/aprintf.c b/drivers/gpu/drm/msm/headergen2/aprintf.c new file mode 100644 index 000000000000..b3d924f59413 --- /dev/null +++ b/drivers/gpu/drm/msm/headergen2/aprintf.c @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2009-2011 Marcin Kościelnicki + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "util.h" +#include + +char *aprintf(const char *format, ...) { + va_list va; + va_start(va, format); + size_t sz = vsnprintf(0, 0, format, va); + va_end(va); + char *res = malloc(sz + 1); + va_start(va, format); + vsnprintf(res, sz + 1, format, va); + va_end(va); + return res; +} diff --git a/drivers/gpu/drm/msm/headergen2/colors.c b/drivers/gpu/drm/msm/headergen2/colors.c new file mode 100644 index 000000000000..192c57dd18bb --- /dev/null +++ b/drivers/gpu/drm/msm/headergen2/colors.c @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2012 Marcin Kościelnicki + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "colors.h" + +const struct envy_colors envy_null_colors = { + .reset = "", + .iname = "", + .rname = "", + .mod = "", + .sym = "", + .reg = "", + .regsp = "", + .num = "", + .mem = "", + .btarg = "", + .ctarg = "", + .bctarg = "", + .eval = "", + .comm = "", + .err = "", +}; + +const struct envy_colors envy_def_colors = { + .reset = "\x1b[0m", + .iname = "\x1b[0;32m", + .rname = "\x1b[0;32m", + .mod = "\x1b[0;36m", + .sym = "\x1b[0;36m", + .reg = "\x1b[0;31m", + .regsp = "\x1b[0;35m", + .num = "\x1b[0;33m", + .mem = "\x1b[0;35m", + .btarg = "\x1b[0;35m", + .ctarg = "\x1b[0;1;37m", + .bctarg = "\x1b[0;1;35m", + .eval = "\x1b[0;35m", + .comm = "\x1b[0;34m", + .err = "\x1b[0;1;31m", +}; diff --git a/drivers/gpu/drm/msm/headergen2/colors.h b/drivers/gpu/drm/msm/headergen2/colors.h new file mode 100644 index 000000000000..67d929d5fadc --- /dev/null +++ b/drivers/gpu/drm/msm/headergen2/colors.h @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2012 Marcin Kościelnicki + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef COLORS_H +#define COLORS_H + +struct envy_colors { + const char *reset; + const char *iname; /* instruction name */ + const char *rname; /* register or bitfield name */ + const char *mod; /* instruction modifier */ + const char *sym; /* auxiliary char like { , + */ + const char *reg; /* ISA register */ + const char *regsp; /* special ISA register */ + const char *num; /* immediate number */ + const char *mem; /* memory reference */ + const char *btarg; /* branch target */ + const char *ctarg; /* call target */ + const char *bctarg; /* branch and call target */ + const char *eval; /* enum value */ + const char *comm; /* comment */ + const char *err; /* error */ +}; + +extern const struct envy_colors envy_null_colors; +extern const struct envy_colors envy_def_colors; + +#endif diff --git a/drivers/gpu/drm/msm/headergen2/headergen2.c b/drivers/gpu/drm/msm/headergen2/headergen2.c new file mode 100644 index 000000000000..d5a3eb7562ee --- /dev/null +++ b/drivers/gpu/drm/msm/headergen2/headergen2.c @@ -0,0 +1,502 @@ +/* + * Copyright (C) 2013 Rob Clark + * Copyright (C) 2010-2011 Marcin Kościelnicki + * Copyright (C) 2010 Luca Barbieri + * Copyright (C) 2010 Marcin Slusarz + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/* modified version of headergen which uses enums and inline fxns for + * type safety.. based on original headergen + */ + +#include "rnn.h" +#include "util.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct rnndelem **elems = NULL; +int elemsnum = 0; +int elemsmax = 0; + +char **offsetfns = NULL; +int offsetfnsnum = 0; +int offsetfnsmax = 0; + +int startcol = 64; + +struct fout { + char *name; + FILE *file; + char *guard; +}; + +struct fout *fouts = 0; +int foutsnum = 0; +int foutsmax = 0; + +static bool no_asserts = false; + +static void seekcol (FILE *f, int src, int dst) { + if (dst <= src) + fprintf (f, "\t"); + else { + int n = dst/8 - src/8; + if (n) { + while (n--) + fprintf (f, "\t"); + n = dst&7; + } else + n = dst-src; + while (n--) + fprintf (f, " "); + } +} + +static FILE *findfout (char *file) { + int i; + for (i = 0; i < foutsnum; i++) + if (!strcmp(fouts[i].name, file)) + break; + if (i == foutsnum) { + fprintf (stderr, "AIII, didn't open file %s.\n", file); + exit(1); + } + return fouts[i].file; +} + +static void printdef (char *name, char *suf, int type, uint64_t val, char *file) { + FILE *dst = findfout(file); + int len; + if (suf) + fprintf (dst, "#define %s__%s%n", name, suf, &len); + else + fprintf (dst, "#define %s%n", name, &len); + if (type == 0 && val > 0xffffffffull) + seekcol (dst, len, startcol-8); + else + seekcol (dst, len, startcol); + switch (type) { + case 0: + if (val > 0xffffffffull) + fprintf (dst, "0x%016"PRIx64"ULL\n", val); + else + fprintf (dst, "0x%08"PRIx64"\n", val); + break; + case 1: + fprintf (dst, "%"PRIu64"\n", val); + break; + } +} + +static void printvalue (struct rnnvalue *val, int shift) { + if (val->varinfo.dead) + return; + if (val->valvalid) + printdef (val->fullname, 0, 0, val->value << shift, val->file); +} + +static void printbitfield (struct rnnbitfield *bf, int shift); + +static void printtypeinfo (struct rnntypeinfo *ti, struct rnnbitfield *bf, + char *prefix, char *file) { + FILE *dst = findfout(file); + enum rnnttype intype = ti->type; + char *typename = NULL; + uint32_t mask = typeinfo_mask(ti); + uint32_t width = 1 + ti->high - ti->low; + + /* for fixed point, input type (arg to fxn) is float: */ + if ((ti->type == RNN_TTYPE_FIXED) || (ti->type == RNN_TTYPE_UFIXED)) + intype = RNN_TTYPE_FLOAT; + + /* for toplevel register (ie. not bitfield), only generate accessor + * fxn for special cases (float, shr, min/max, etc): + */ + if (bf || ti->shr || ti->minvalid || ti->maxvalid || ti->alignvalid || + ti->radixvalid || (intype == RNN_TTYPE_FLOAT)) { + switch (intype) { + case RNN_TTYPE_HEX: + case RNN_TTYPE_UINT: + case RNN_TTYPE_A3XX_REGID: + typename = "uint32_t"; + break; + case RNN_TTYPE_INT: + typename = "int32_t"; + break; + case RNN_TTYPE_FLOAT: + typename = "float"; + break; + case RNN_TTYPE_ENUM: + asprintf(&typename, "enum %s", ti->name); + break; + default: + break; + } + } + + /* for boolean, just generate a #define flag.. rather than inline fxn */ + if (bf && (intype == RNN_TTYPE_BOOLEAN)) { + printdef(bf->fullname, 0, 0, mask, file); + return; + } + + if (typename) { + printdef(prefix, "MASK", 0, mask, file); + printdef(prefix, "SHIFT", 1, ti->low, file); + + fprintf(dst, "static inline uint32_t %s(%s val)\n", prefix, typename); + fprintf(dst, "{\n"); + + if ((ti->minvalid || ti->maxvalid || ti->alignvalid) && !no_asserts) { + fprintf(dst, "\tassert(1"); + if (ti->minvalid) + fprintf(dst, " && (val >= %"PRIu64")", ti->min); + if (ti->maxvalid) + fprintf(dst, " && (val <= %"PRIu64")", ti->max); + if (ti->alignvalid) + fprintf(dst, " && !(val %% %"PRIu64")", ti->align); + fprintf(dst, ");\n"); + } + + if (ti->shr && !no_asserts) { + fprintf(dst, "\tassert(!(val & 0x%x));\n", (1 << ti->shr) - 1); + } + + fprintf(dst, "\treturn (("); + + if (ti->type == RNN_TTYPE_FIXED) { + fprintf(dst, "((int32_t)(val * %d.0))", (1 << ti->radix)); + } else if (ti->type == RNN_TTYPE_UFIXED) { + fprintf(dst, "((uint32_t)(val * %d.0))", (1 << ti->radix)); + } else if (ti->type == RNN_TTYPE_FLOAT) { + if (width == 32) + fprintf(dst, "fui(val)"); + else if (width == 16) + fprintf(dst, "util_float_to_half(val)"); + else + assert(!"invalid float size"); + } else { + fprintf(dst, "val"); + } + + if (ti->shr) + fprintf(dst, " >> %d", ti->shr); + + fprintf(dst, ") << %s__SHIFT) & %s__MASK;\n", prefix, prefix); + fprintf(dst, "}\n"); + + if (intype == RNN_TTYPE_ENUM) + free(typename); + } + + int i; + for (i = 0; i < ti->valsnum; i++) + printvalue(ti->vals[i], ti->low); + for (i = 0; i < ti->bitfieldsnum; i++) + printbitfield(ti->bitfields[i], ti->low); +} + +static void printbitfield (struct rnnbitfield *bf, int shift) { + if (bf->varinfo.dead) + return; + printtypeinfo (&bf->typeinfo, bf, bf->fullname, bf->file); +} + +static void printdelem (struct rnndelem *elem, uint64_t offset) { + int use_offset_fxn; + char *offsetfn = NULL; + + if (elem->varinfo.dead) + return; + + use_offset_fxn = elem->offsets || elem->doffset || elem->doffsets; + assert((!!elem->offsets + !!elem->doffset + !!elem->doffsets) <= 1); + + if (use_offset_fxn) + asprintf(&offsetfn, "__offset_%s", elem->name); + + if (elem->length != 1) { + ADDARRAY(elems, elem); + ADDARRAY(offsetfns, offsetfn); + } + + if (elem->name) { + char *regname; + asprintf(®name, "REG_%s", elem->fullname); + if (elemsnum) { + int len; + FILE *dst = findfout(elem->file); + int i; + + if (use_offset_fxn) { + fprintf(dst, "static inline uint32_t %s(", offsetfn); + if (elem->index) + fprintf(dst, "enum %s", elem->index->name); + else + fprintf(dst, "uint32_t"); + fprintf(dst, " idx)\n"); + fprintf(dst, "{\n"); + if (elem->doffset) { + fprintf(dst, "\treturn (%s) + (%#" PRIx64 "*idx);\n", elem->doffset, elem->stride); + } else { + int valuesnum = elem->doffsets ? elem->doffsetsnum : elem->offsetsnum; + + fprintf(dst, "\tswitch (idx) {\n"); + for (i = 0; i < valuesnum; i++) { + struct rnnvalue *val = NULL; + fprintf(dst, "\t\tcase "); + if (elem->index) { + int j; + for (j = 0; j < elem->index->valsnum; j++) { + if (elem->index->vals[j]->value == i) { + val = elem->index->vals[j]; + break; + } + } + } + if (val) { + fprintf(dst, "%s", val->name); + } else { + fprintf(dst, "%d", i); + } + if (elem->offsets) { + fprintf(dst, ": return 0x%08"PRIx64";\n", elem->offsets[i]); + } else { + fprintf(dst, ": return (%s);\n", elem->doffsets[i]); + } + } + fprintf(dst, "\t\tdefault: return INVALID_IDX(idx);\n"); + fprintf(dst, "\t}\n"); + } + fprintf(dst, "}\n"); + } + fprintf (dst, "static inline uint32_t %s(", regname); + for (i = 0; i < elemsnum; i++) { + if (i) + fprintf(dst, ", "); + if (elems[i]->index) + fprintf(dst, "enum %s ", elems[i]->index->name); + else + fprintf(dst, "uint32_t "); + fprintf (dst, "i%d%n", i, &len); + } + fprintf (dst, ") { return "); + fprintf (dst, "0x%08"PRIx64"", offset + elem->offset); + for (i = 0; i < elemsnum; i++) { + if (offsetfns[i]) + fprintf(dst, " + %s(i%d)", offsetfns[i], i); + else + fprintf (dst, " + %#" PRIx64 "*i%d", elems[i]->stride, i); + } + fprintf (dst, "; }\n"); + } else + printdef (regname, 0, 0, offset + elem->offset, elem->file); + + free(regname); +/* + if (elem->stride) + printdef (elem->fullname, "ESIZE", 0, elem->stride, elem->file); + if (elem->length != 1) + printdef (elem->fullname, "LEN", 0, elem->length, elem->file); +*/ + printtypeinfo (&elem->typeinfo, NULL, elem->fullname, elem->file); + } + fprintf (findfout(elem->file), "\n"); + int j; + for (j = 0; j < elem->subelemsnum; j++) { + printdelem(elem->subelems[j], offset + elem->offset); + } + if (elem->length != 1) { + elemsnum--; + offsetfnsnum--; + } + free(offsetfn); +} + +static void print_file_info_(FILE *dst, struct stat* sb, struct tm* tm) +{ + char timestr[64]; + strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S", tm); + fprintf(dst, "(%7Lu bytes, from %s)\n", (unsigned long long)sb->st_size, timestr); +} + +static void print_file_info(FILE *dst, const char* file) +{ + struct stat sb; + struct tm tm; + stat(file, &sb); + gmtime_r(&sb.st_mtime, &tm); + print_file_info_(dst, &sb, &tm); +} + +static void printhead(struct fout f, struct rnndb *db) { + int i, j; + struct stat sb; + struct tm tm; + stat(f.name, &sb); + gmtime_r(&sb.st_mtime, &tm); + fprintf (f.file, "#ifndef %s\n", f.guard); + fprintf (f.file, "#define %s\n", f.guard); + fprintf (f.file, "\n"); + fprintf(f.file, + "/* Autogenerated file, DO NOT EDIT manually!\n" + "\n" + "This file was generated by the rules-ng-ng headergen tool in this git repository:\n" + "http://github.com/freedreno/envytools/\n" + "git clone https://github.com/freedreno/envytools.git\n" + "\n" + "The rules-ng-ng source files this header was generated from are:\n"); + unsigned maxlen = 0; + for(i = 0; i < db->filesnum; ++i) { + unsigned len = strlen(db->files[i]); + if(len > maxlen) + maxlen = len; + } + for(i = 0; i < db->filesnum; ++i) { + unsigned len = strlen(db->files[i]); + fprintf(f.file, "- %s%*s ", db->files[i], maxlen - len, ""); + print_file_info(f.file, db->files[i]); + } + fprintf(f.file, + "\n" + "Copyright (C) "); + if(db->copyright.firstyear && db->copyright.firstyear < (1900 + tm.tm_year)) + fprintf(f.file, "%u-", db->copyright.firstyear); + fprintf(f.file, "%u", 1900 + tm.tm_year); + if(db->copyright.authorsnum) { + fprintf(f.file, " by the following authors:"); + for(i = 0; i < db->copyright.authorsnum; ++i) { + fprintf(f.file, "\n- "); + if(db->copyright.authors[i]->name) + fprintf(f.file, "%s", db->copyright.authors[i]->name); + if(db->copyright.authors[i]->email) + fprintf(f.file, " <%s>", db->copyright.authors[i]->email); + if(db->copyright.authors[i]->nicknamesnum) { + for(j = 0; j < db->copyright.authors[i]->nicknamesnum; ++j) { + fprintf(f.file, "%s%s", (j ? ", " : " ("), db->copyright.authors[i]->nicknames[j]); + } + fprintf(f.file, ")"); + } + } + } + fprintf(f.file, "\n"); + if(db->copyright.license) + fprintf(f.file, "\n%s\n", db->copyright.license); + fprintf(f.file, "*/\n\n\n"); +} + +int main(int argc, char **argv) { + char *file; + struct rnndb *db; + int i, j; + + if (argc < 2) { + fprintf(stderr, "Usage:\n\theadergen database-file\n"); + exit(1); + } + + if ((argc >= 3) && !strcmp(argv[1], "--no-asserts")) { + no_asserts = true; + file = argv[2]; + } else { + file = argv[1]; + } + + rnn_init(); + db = rnn_newdb(); + rnn_parsefile (db, file); + rnn_prepdb (db); + for(i = 0; i < db->filesnum; ++i) { + char *dstname = malloc(strlen(db->files[i]) + 3); + char *pretty; + strcpy(dstname, db->files[i]); + strcat(dstname, ".h"); + struct fout f = { db->files[i], fopen(dstname, "w") }; + if (!f.file) { + perror(dstname); + exit(1); + } + free(dstname); + pretty = strrchr(f.name, '/'); + if (pretty) + pretty += 1; + else + pretty = f.name; + f.guard = strdup(pretty); + for (j = 0; j < strlen(f.guard); j++) + if (isalnum(f.guard[j])) + f.guard[j] = toupper(f.guard[j]); + else + f.guard[j] = '_'; + ADDARRAY(fouts, f); + printhead(f, db); + } + + for (i = 0; i < db->enumsnum; i++) { + FILE *dst = NULL; + int j; + for (j = 0; j < db->enums[i]->valsnum; j++) { + if (!dst) { + dst = findfout(db->enums[i]->vals[j]->file); + fprintf(dst, "enum %s {\n", db->enums[i]->name); + } + if (0xffff0000 & db->enums[i]->vals[j]->value) + fprintf(dst, "\t%s = 0x%08"PRIx64",\n", db->enums[i]->vals[j]->name, + db->enums[i]->vals[j]->value); + else + fprintf(dst, "\t%s = %"PRIu64",\n", db->enums[i]->vals[j]->name, + db->enums[i]->vals[j]->value); + } + if (dst) { + fprintf(dst, "};\n\n"); + } + } + for (i = 0; i < db->bitsetsnum; i++) { + if (db->bitsets[i]->isinline) + continue; + int j; + for (j = 0; j < db->bitsets[i]->bitfieldsnum; j++) + printbitfield (db->bitsets[i]->bitfields[j], 0); + } + for (i = 0; i < db->domainsnum; i++) { + if (db->domains[i]->size) + printdef (db->domains[i]->fullname, "SIZE", 0, db->domains[i]->size, db->domains[i]->file); + int j; + for (j = 0; j < db->domains[i]->subelemsnum; j++) { + printdelem(db->domains[i]->subelems[j], 0); + } + } + for(i = 0; i < foutsnum; ++i) { + fprintf (fouts[i].file, "\n#endif /* %s */\n", fouts[i].guard); + } + return db->estatus; +} diff --git a/drivers/gpu/drm/msm/headergen2/path.c b/drivers/gpu/drm/msm/headergen2/path.c new file mode 100644 index 000000000000..f8ef885d891d --- /dev/null +++ b/drivers/gpu/drm/msm/headergen2/path.c @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2011 Marcin Kościelnicki + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "util.h" +#include + +FILE *find_in_path(const char *name, const char *path, char **pfullname) { + if (!path) + return 0; + while (path) { + const char *npath = strchr(path, ':'); + size_t plen; + if (npath) { + plen = npath - path; + npath++; + } else { + plen = strlen(path); + } + if (plen) { + /* also look for .gz compressed xml: */ + const char *exts[] = { "", ".gz" }; + for (int i = 0; i < ARRAY_SIZE(exts); i++) { + char *fullname; + + int ret = asprintf(&fullname, "%.*s/%s%s", (int)plen, path, name, exts[i]); + if (ret < 0) + return NULL; + + FILE *file = fopen(fullname, "r"); + if (file) { + if (pfullname) + *pfullname = fullname; + else + free(fullname); + return file; + } + free(fullname); + } + } + path = npath; + } + return 0; +} diff --git a/drivers/gpu/drm/msm/headergen2/rnn.c b/drivers/gpu/drm/msm/headergen2/rnn.c new file mode 100644 index 000000000000..d82d2a561b02 --- /dev/null +++ b/drivers/gpu/drm/msm/headergen2/rnn.c @@ -0,0 +1,1360 @@ +/* + * Copyright (C) 2010-2011 Marcin Kościelnicki + * Copyright (C) 2010 Luca Barbieri + * Copyright (C) 2010 Francisco Jerez + * Copyright (C) 2010 Martin Peres + * Copyright (C) 2010 Marcin Slusarz + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/* workaround libxml2 silliness: */ +#pragma GCC diagnostic ignored "-Wpointer-sign" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "rnn.h" +#include "util.h" + +#include "util/u_debug.h" + +static char *catstr (char *a, char *b) { + if (!a) + return b; + return aprintf("%s_%s", a, b); +} + +static int strdiff (const char *a, const char *b) { + if (!a && !b) + return 0; + if (!a || !b) + return 1; + return strcmp (a, b); +} + +static void rnn_err(struct rnndb *db, const char *format, ...) _util_printf_format(2, 3); + +static void rnn_err(struct rnndb *db, const char *format, ...) +{ + va_list ap; + va_start(ap, format); + vfprintf(stderr, format, ap); + va_end(ap); + db->estatus = 1; +} + +void rnn_init(void) { + LIBXML_TEST_VERSION + xmlInitParser(); +} + +struct rnndb *rnn_newdb(void) { + struct rnndb *db = calloc(sizeof *db, 1); + return db; +} + +static char *getcontent (xmlNode *attr) { + xmlNode *chain = attr->children; + size_t size = 0; + char *content, *p; + while (chain) { + if (chain->type == XML_TEXT_NODE) + size += strlen(chain->content); + chain = chain->next; + } + p = content = malloc(size + 1); + chain = attr->children; + while (chain) { + if (chain->type == XML_TEXT_NODE) { + char* sp = chain->content; + if(p == content) { + while(isspace(*sp)) + ++sp; + } + size_t len = strlen(sp); + memcpy(p, sp, len); + p += len; + } + chain = chain->next; + } + while(p != content && isspace(p[-1])) + --p; + *p = 0; + return content; +} + +static char *getattrib (struct rnndb *db, char *file, int line, xmlAttr *attr) { + xmlNode *chain = attr->children; + while (chain) { + if (chain->type != XML_TEXT_NODE) { + rnn_err(db, "%s:%d: unknown attribute child \"%s\" in attribute \"%s\"\n", file, line, chain->name, attr->name); + } else { + return chain->content; + } + chain = chain->next; + } + return ""; +} + +static int getboolattrib (struct rnndb *db, char *file, int line, xmlAttr *attr) { + char *c = getattrib(db, file, line, attr); + if (!strcmp(c, "yes") || !strcmp(c, "1") || !strcmp(c, "true")) + return 1; + if (!strcmp(c, "no") || !strcmp(c, "0") || !strcmp(c, "false")) + return 0; + rnn_err(db, "%s:%d: invalid boolean value \"%s\" in attribute \"%s\"\n", file, line, c, attr->name); + return 0; +} + +static uint64_t getnum(struct rnndb *db, char *file, int line, xmlAttr *attr, char *c) +{ + char *cc; + uint64_t res; + if (strchr(c, 'x') || strchr(c, 'X')) + res = strtoull(c, &cc, 16); + else + res = strtoull(c, &cc, 10); + if (*cc) { + rnn_err(db, "%s:%d: invalid numeric value \"%s\" in attribute \"%s\"\n", file, line, c, attr->name); + } + return res; +} + +static uint64_t getnumattrib (struct rnndb *db, char *file, int line, xmlAttr *attr) { + char *c = getattrib(db, file, line, attr); + return getnum(db, file, line, attr, c); +} + +static int trytop (struct rnndb *db, char *file, xmlNode *node); + +static int trydoc (struct rnndb *db, char *file, xmlNode *node) { + if (!strcmp(node->name, "brief")) { + return 1; + } else if (!strcmp(node->name, "doc")) { + return 1; + } + return 0; +} + +static struct rnnvalue *parsevalue(struct rnndb *db, char *file, xmlNode *node); +static struct rnnbitfield *parsebitfield(struct rnndb *db, char *file, xmlNode *node); + +static int trytypetag (struct rnndb *db, char *file, xmlNode *node, struct rnntypeinfo *ti) { + if (!strcmp(node->name, "value")) { + struct rnnvalue *val = parsevalue(db, file, node); + if (val) + ADDARRAY(ti->vals, val); + return 1; + } else if (!strcmp(node->name, "bitfield")) { + struct rnnbitfield *bf = parsebitfield(db, file, node); + if (bf) + ADDARRAY(ti->bitfields, bf); + return 1; + } + return 0; +} +static int trytypeattr (struct rnndb *db, char *file, xmlNode *node, xmlAttr *attr, struct rnntypeinfo *ti) { + if (!strcmp(attr->name, "shr")) { + ti->shr = getnumattrib(db, file, node->line, attr); + return 1; + } else if (!strcmp(attr->name, "min")) { + ti->min = getnumattrib(db, file, node->line, attr); + ti->minvalid = 1; + return 1; + } else if (!strcmp(attr->name, "max")) { + ti->max = getnumattrib(db, file, node->line, attr); + ti->maxvalid = 1; + return 1; + } else if (!strcmp(attr->name, "align")) { + ti->align = getnumattrib(db, file, node->line, attr); + ti->alignvalid = 1; + return 1; + } else if (!strcmp(attr->name, "type")) { + ti->name = strdup(getattrib(db, file, node->line, attr));; + return 1; + } else if (!strcmp(attr->name, "radix")) { + ti->radix = getnumattrib(db, file, node->line, attr); + ti->radixvalid = 1; + return 1; + } else if (!strcmp(attr->name, "pos")) { + ti->high = ti->low = getnumattrib(db, file, node->line, attr); + return 1; + } else if (!strcmp(attr->name, "low")) { + ti->low = getnumattrib(db, file, node->line, attr); + return 1; + } else if (!strcmp(attr->name, "high")) { + ti->high = getnumattrib(db, file, node->line, attr); + return 1; + } else if (!strcmp(attr->name, "addvariant")) { + ti->addvariant = getboolattrib(db, file, node->line, attr); + return 1; + } + return 0; +} + +static struct rnnvalue *parsevalue(struct rnndb *db, char *file, xmlNode *node) { + struct rnnvalue *val = calloc(sizeof *val, 1); + val->file = file; + xmlAttr *attr = node->properties; + while (attr) { + if (!strcmp(attr->name, "name")) { + val->name = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "value")) { + val->value = getnumattrib(db, file, node->line, attr); + val->valvalid = 1; + } else if (!strcmp(attr->name, "varset")) { + val->varinfo.varsetstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "variants")) { + val->varinfo.variantsstr = strdup(getattrib(db, file, node->line, attr)); + } else { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for value\n", file, node->line, attr->name); + } + attr = attr->next; + } + xmlNode *chain = node->children; + while (chain) { + if (chain->type != XML_ELEMENT_NODE) { + } else if (!trytop(db, file, chain) && !trydoc(db, file, chain)) { + rnn_err(db, "%s:%d: wrong tag in %s: <%s>\n", file, chain->line, node->name, chain->name); + } + chain = chain->next; + } + if (!val->name) { + rnn_err(db, "%s:%d: nameless value\n", file, node->line); + return 0; + } else { + return val; + } +} + +static void parsespectype(struct rnndb *db, char *file, xmlNode *node) { + struct rnnspectype *res = calloc (sizeof *res, 1); + res->file = file; + xmlAttr *attr = node->properties; + int i; + while (attr) { + if (!strcmp(attr->name, "name")) { + res->name = strdup(getattrib(db, file, node->line, attr)); + } else if (!trytypeattr(db, file, node, attr, &res->typeinfo)) { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for spectype\n", file, node->line, attr->name); + } + attr = attr->next; + } + if (!res->name) { + rnn_err(db, "%s:%d: nameless spectype\n", file, node->line); + return; + } + for (i = 0; i < db->spectypesnum; i++) + if (!strcmp(db->spectypes[i]->name, res->name)) { + rnn_err(db, "%s:%d: duplicated spectype name %s\n", file, node->line, res->name); + return; + } + ADDARRAY(db->spectypes, res); + xmlNode *chain = node->children; + while (chain) { + if (chain->type != XML_ELEMENT_NODE) { + } else if (!trytypetag(db, file, chain, &res->typeinfo) && !trytop(db, file, chain) && !trydoc(db, file, chain)) { + rnn_err(db, "%s:%d: wrong tag in spectype: <%s>\n", file, chain->line, chain->name); + } + chain = chain->next; + } +} + +static void parseenum(struct rnndb *db, char *file, xmlNode *node) { + xmlAttr *attr = node->properties; + char *name = 0; + int isinline = 0; + int bare = 0; + char *prefixstr = 0; + char *varsetstr = 0; + char *variantsstr = 0; + int i; + while (attr) { + if (!strcmp(attr->name, "name")) { + name = getattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "bare")) { + bare = getboolattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "inline")) { + isinline = getboolattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "prefix")) { + prefixstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "varset")) { + varsetstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "variants")) { + variantsstr = strdup(getattrib(db, file, node->line, attr)); + } else { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for enum\n", file, node->line, attr->name); + } + attr = attr->next; + } + if (!name) { + rnn_err(db, "%s:%d: nameless enum\n", file, node->line); + return; + } + struct rnnenum *cur = 0; + for (i = 0; i < db->enumsnum; i++) + if (!strcmp(db->enums[i]->name, name)) { + cur = db->enums[i]; + break; + } + if (cur) { + if (strdiff(cur->varinfo.prefixstr, prefixstr) || + strdiff(cur->varinfo.varsetstr, varsetstr) || + strdiff(cur->varinfo.variantsstr, variantsstr) || + cur->isinline != isinline || cur->bare != bare) { + rnn_err(db, "%s:%d: merge fail for enum %s\n", file, node->line, node->name); + } + } else { + cur = calloc(sizeof *cur, 1); + cur->name = strdup(name); + cur->isinline = isinline; + cur->bare = bare; + cur->varinfo.prefixstr = prefixstr; + cur->varinfo.varsetstr = varsetstr; + cur->varinfo.variantsstr = variantsstr; + cur->file = file; + ADDARRAY(db->enums, cur); + } + xmlNode *chain = node->children; + while (chain) { + if (chain->type != XML_ELEMENT_NODE) { + } else if (!strcmp(chain->name, "value")) { + struct rnnvalue *val = parsevalue(db, file, chain); + if (val) + ADDARRAY(cur->vals, val); + } else if (!trytop(db, file, chain) && !trydoc(db, file, chain)) { + rnn_err(db, "%s:%d: wrong tag in enum: <%s>\n", file, chain->line, chain->name); + } + chain = chain->next; + } +} + +static struct rnnbitfield *parsebitfield(struct rnndb *db, char *file, xmlNode *node) { + struct rnnbitfield *bf = calloc(sizeof *bf, 1); + bf->file = file; + xmlAttr *attr = node->properties; + bf->typeinfo.low = bf->typeinfo.high = -1; + while (attr) { + if (!strcmp(attr->name, "name")) { + bf->name = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "varset")) { + bf->varinfo.varsetstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "variants")) { + bf->varinfo.variantsstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!trytypeattr(db, file, node, attr, &bf->typeinfo)) { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for bitfield\n", file, node->line, attr->name); + } + attr = attr->next; + } + xmlNode *chain = node->children; + while (chain) { + if (chain->type != XML_ELEMENT_NODE) { + } else if (!trytypetag(db, file, chain, &bf->typeinfo) && !trytop(db, file, chain) && !trydoc(db, file, chain)) { + rnn_err(db, "%s:%d: wrong tag in %s: <%s>\n", file, chain->line, node->name, chain->name); + } + chain = chain->next; + } + if (!bf->name) { + rnn_err(db, "%s:%d: nameless bitfield\n", file, node->line); + return 0; + } else if (bf->typeinfo.low < 0|| bf->typeinfo.high < 0 || bf->typeinfo.high < bf->typeinfo.low) { + rnn_err(db, "%s:%d: bitfield has wrong placement\n", file, node->line); + return 0; + } else { + return bf; + } +} + +static void parsebitset(struct rnndb *db, char *file, xmlNode *node) { + xmlAttr *attr = node->properties; + char *name = 0; + int isinline = 0; + int bare = 0; + char *prefixstr = 0; + char *varsetstr = 0; + char *variantsstr = 0; + int i; + while (attr) { + if (!strcmp(attr->name, "name")) { + name = getattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "bare")) { + bare = getboolattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "inline")) { + isinline = getboolattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "prefix")) { + prefixstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "varset")) { + varsetstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "variants")) { + variantsstr = strdup(getattrib(db, file, node->line, attr)); + } else { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for bitset\n", file, node->line, attr->name); + } + attr = attr->next; + } + if (!name) { + rnn_err(db, "%s:%d: nameless bitset\n", file, node->line); + return; + } + struct rnnbitset *cur = 0; + for (i = 0; i < db->bitsetsnum; i++) + if (!strcmp(db->bitsets[i]->name, name)) { + cur = db->bitsets[i]; + break; + } + if (cur) { + if (strdiff(cur->varinfo.prefixstr, prefixstr) || + strdiff(cur->varinfo.varsetstr, varsetstr) || + strdiff(cur->varinfo.variantsstr, variantsstr) || + cur->isinline != isinline || cur->bare != bare) { + rnn_err(db, "%s:%d: merge fail for bitset %s\n", file, node->line, node->name); + } + } else { + cur = calloc(sizeof *cur, 1); + cur->name = strdup(name); + cur->isinline = isinline; + cur->bare = bare; + cur->varinfo.prefixstr = prefixstr; + cur->varinfo.varsetstr = varsetstr; + cur->varinfo.variantsstr = variantsstr; + cur->file = file; + ADDARRAY(db->bitsets, cur); + } + xmlNode *chain = node->children; + while (chain) { + if (chain->type != XML_ELEMENT_NODE) { + } else if (!strcmp(chain->name, "bitfield")) { + struct rnnbitfield *bf = parsebitfield(db, file, chain); + if (bf) + ADDARRAY(cur->bitfields, bf); + } else if (!trytop(db, file, chain) && !trydoc(db, file, chain)) { + rnn_err(db, "%s:%d: wrong tag in bitset: <%s>\n", file, chain->line, chain->name); + } + chain = chain->next; + } +} + +static struct rnndelem *trydelem(struct rnndb *db, char *file, xmlNode *node) { + if (!strcmp(node->name, "use-group")) { + struct rnndelem *res = calloc(sizeof *res, 1); + res->file = file; + res->type = RNN_ETYPE_USE_GROUP; + xmlAttr *attr = node->properties; + while (attr) { + if (!strcmp(attr->name, "ref")) { + res->name = strdup(getattrib(db, file, node->line, attr)); + } else { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for %s\n", file, node->line, attr->name, node->name); + } + attr = attr->next; + } + if (!res->name) { + rnn_err(db, "%s:%d: nameless use-group\n", file, node->line); + return 0; + } + return res; + } else if (!strcmp(node->name, "stripe") || !strcmp(node->name, "array")) { + struct rnndelem *res = calloc(sizeof *res, 1); + if (!strcmp(node->name, "array")) + res->name = ""; + res->type = (strcmp(node->name, "stripe")?RNN_ETYPE_ARRAY:RNN_ETYPE_STRIPE); + res->length = 1; + res->file = file; + xmlAttr *attr = node->properties; + while (attr) { + if (!strcmp(attr->name, "name")) { + res->name = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "offset")) { + res->offset = getnumattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "offsets")) { + char *str = strdup(getattrib(db, file, node->line, attr)); + char *tok, *save, *tmp = str; + while ((tok = strtok_r(str, ",", &save))) { + uint64_t offset = getnum(db, file, node->line, attr, tok); + ADDARRAY(res->offsets, offset); + str = NULL; + } + if (str) + fprintf(stderr, "%s:%d: invalid offsets: %s\n", file, node->line, str); + free(tmp); + } else if (!strcmp(attr->name, "doffset")) { + /* dynamic runtime determined offset: */ + res->doffset = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "doffsets")) { + /* dynamic runtime determined offsets: */ + char *str = strdup(getattrib(db, file, node->line, attr)); + char *tok, *save, *tmp = str; + while ((tok = strtok_r(str, ",", &save))) { + char *doffset = strdup(tok); + ADDARRAY(res->doffsets, doffset); + str = NULL; + } + if (str) + fprintf(stderr, "%s:%d: invalid offsets: %s\n", file, node->line, str); + free(tmp); + } else if (!strcmp(attr->name, "length")) { + res->length = getnumattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "stride")) { + res->stride = getnumattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "prefix")) { + res->varinfo.prefixstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "varset")) { + res->varinfo.varsetstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "variants")) { + res->varinfo.variantsstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "index")) { + const char *enumname = getattrib(db, file, node->line, attr); + res->index = rnn_findenum(db, enumname); + if (!res->index) { + rnn_err(db, "%s:%d: invalid enum name \"%s\"\n", file, node->line, enumname); + } + } else { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for %s\n", file, node->line, attr->name, node->name); + } + attr = attr->next; + } + xmlNode *chain = node->children; + while (chain) { + struct rnndelem *delem; + if (chain->type != XML_ELEMENT_NODE) { + } else if ((delem = trydelem(db, file, chain))) { + ADDARRAY(res->subelems, delem); + } else if (!trytop(db, file, chain) && !trydoc(db, file, chain)) { + rnn_err(db, "%s:%d: wrong tag in %s: <%s>\n", file, chain->line, node->name, chain->name); + } + chain = chain->next; + } + + /* Sanity checking */ + if (res->type == RNN_ETYPE_ARRAY && res->stride == 0) { + fprintf(stderr, "%s: Array %s's stride is undefined. Aborting.\n", file, res->name); + exit(-1); + } + return res; + + } + int width; + if (!strcmp(node->name, "reg8")) + width = 8; + else if (!strcmp(node->name, "reg16")) + width = 16; + else if (!strcmp(node->name, "reg32")) + width = 32; + else if (!strcmp(node->name, "reg64")) + width = 64; + else + return 0; + struct rnndelem *res = calloc(sizeof *res, 1); + res->file = file; + res->type = RNN_ETYPE_REG; + res->width = width; + res->length = 1; + res->access = RNN_ACCESS_RW; + xmlAttr *attr = node->properties; + res->typeinfo.low = 0; + res->typeinfo.high = width - 1; + while (attr) { + if (!strcmp(attr->name, "name")) { + res->name = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "offset")) { + res->offset = getnumattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "length")) { + res->length = getnumattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "stride")) { + res->stride = getnumattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "varset")) { + res->varinfo.varsetstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "variants")) { + res->varinfo.variantsstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "access")) { + char *str = getattrib(db, file, node->line, attr); + if (!strcmp(str, "r")) + res->access = RNN_ACCESS_R; + else if (!strcmp(str, "w")) + res->access = RNN_ACCESS_W; + else if (!strcmp(str, "rw")) + res->access = RNN_ACCESS_RW; + else + fprintf (stderr, "%s:%d: wrong access type \"%s\" for register\n", file, node->line, str); + } else if (!trytypeattr(db, file, node, attr, &res->typeinfo)) { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for register\n", file, node->line, attr->name); + } + attr = attr->next; + } + xmlNode *chain = node->children; + while (chain) { + if (chain->type != XML_ELEMENT_NODE) { + } else if (!trytypetag(db, file, chain, &res->typeinfo) && !trytop(db, file, chain) && !trydoc(db, file, chain)) { + rnn_err(db, "%s:%d: wrong tag in %s: <%s>\n", file, chain->line, node->name, chain->name); + } + chain = chain->next; + } + if (!res->name) { + rnn_err(db, "%s:%d: nameless register\n", file, node->line); + return 0; + } else { + } + return res; +} + +static void parsegroup(struct rnndb *db, char *file, xmlNode *node) { + xmlAttr *attr = node->properties; + char *name = 0; + int i; + while (attr) { + if (!strcmp(attr->name, "name")) { + name = getattrib(db, file, node->line, attr); + } else { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for group\n", file, node->line, attr->name); + } + attr = attr->next; + } + if (!name) { + rnn_err(db, "%s:%d: nameless group\n", file, node->line); + return; + } + struct rnngroup *cur = 0; + for (i = 0; i < db->groupsnum; i++) + if (!strcmp(db->groups[i]->name, name)) { + cur = db->groups[i]; + break; + } + if (!cur) { + cur = calloc(sizeof *cur, 1); + cur->name = strdup(name); + ADDARRAY(db->groups, cur); + } + xmlNode *chain = node->children; + while (chain) { + struct rnndelem *delem; + if (chain->type != XML_ELEMENT_NODE) { + } else if ((delem = trydelem(db, file, chain))) { + ADDARRAY(cur->subelems, delem); + } else if (!trytop(db, file, chain) && !trydoc(db, file, chain)) { + rnn_err(db, "%s:%d: wrong tag in group: <%s>\n", file, chain->line, chain->name); + } + chain = chain->next; + } +} + +static void parsedomain(struct rnndb *db, char *file, xmlNode *node) { + xmlAttr *attr = node->properties; + char *name = 0; + uint64_t size = 0; int width = 8; + int bare = 0; + char *prefixstr = 0; + char *varsetstr = 0; + char *variantsstr = 0; + int i; + while (attr) { + if (!strcmp(attr->name, "name")) { + name = getattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "bare")) { + bare = getboolattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "size")) { + size = getnumattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "width")) { + width = getnumattrib(db, file, node->line, attr); + } else if (!strcmp(attr->name, "prefix")) { + prefixstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "varset")) { + varsetstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "variants")) { + variantsstr = strdup(getattrib(db, file, node->line, attr)); + } else { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for domain\n", file, node->line, attr->name); + } + attr = attr->next; + } + if (!name) { + rnn_err(db, "%s:%d: nameless domain\n", file, node->line); + return; + } + struct rnndomain *cur = 0; + for (i = 0; i < db->domainsnum; i++) + if (!strcmp(db->domains[i]->name, name)) { + cur = db->domains[i]; + break; + } + if (cur) { + if (strdiff(cur->varinfo.prefixstr, prefixstr) || + strdiff(cur->varinfo.varsetstr, varsetstr) || + strdiff(cur->varinfo.variantsstr, variantsstr) || + cur->width != width || + cur->bare != bare || + (size && cur->size && size != cur->size)) { + rnn_err(db, "%s:%d: merge fail for domain %s\n", file, node->line, node->name); + } else { + if (size) + cur->size = size; + } + } else { + cur = calloc(sizeof *cur, 1); + cur->name = strdup(name); + cur->bare = bare; + cur->width = width; + cur->size = size; + cur->varinfo.prefixstr = prefixstr; + cur->varinfo.varsetstr = varsetstr; + cur->varinfo.variantsstr = variantsstr; + cur->file = file; + ADDARRAY(db->domains, cur); + } + xmlNode *chain = node->children; + while (chain) { + struct rnndelem *delem; + if (chain->type != XML_ELEMENT_NODE) { + } else if ((delem = trydelem(db, file, chain))) { + ADDARRAY(cur->subelems, delem); + } else if (!trytop(db, file, chain) && !trydoc(db, file, chain)) { + rnn_err(db, "%s:%d: wrong tag in domain: <%s>\n", file, chain->line, chain->name); + } + chain = chain->next; + } +} + +static void parsecopyright(struct rnndb *db, char *file, xmlNode *node) { + struct rnncopyright* copyright = &db->copyright; + xmlAttr *attr = node->properties; + while (attr) { + if (!strcmp(attr->name, "year")) { + unsigned firstyear = getnumattrib(db, file, node->line, attr); + if(!copyright->firstyear || firstyear < copyright->firstyear) + copyright->firstyear = firstyear; + } else { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for copyright\n", file, node->line, attr->name); + } + attr = attr->next; + } + xmlNode *chain = node->children; + while (chain) { + if (chain->type != XML_ELEMENT_NODE) { + } else if (!strcmp(chain->name, "license")) + if(copyright->license) { + if(strcmp(copyright->license, node->content)) { + fprintf(stderr, "fatal error: multiple different licenses specified!\n"); + abort(); /* TODO: do something better here, but headergen, xml2html, etc. should not produce anything in this case */ + } + } else + copyright->license = getcontent(chain); + else if (!strcmp(chain->name, "author")) { + struct rnnauthor* author = calloc(sizeof *author, 1); + xmlAttr* authorattr = chain->properties; + xmlNode *authorchild = chain->children; + author->contributions = getcontent(chain); + while (authorattr) { + if (!strcmp(authorattr->name, "name")) + author->name = strdup(getattrib(db, file, chain->line, authorattr)); + else if (!strcmp(authorattr->name, "email")) + author->email = strdup(getattrib(db, file, chain->line, authorattr)); + else { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for author\n", file, chain->line, authorattr->name); + } + authorattr = authorattr->next; + } + while(authorchild) { + if (authorchild->type != XML_ELEMENT_NODE) { + } else if (!strcmp(authorchild->name, "nick")) { + xmlAttr* nickattr = authorchild->properties; + char* nickname = 0; + while(nickattr) { + if (!strcmp(nickattr->name, "name")) + nickname = strdup(getattrib(db, file, authorchild->line, nickattr)); + else { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for nick\n", file, authorchild->line, nickattr->name); + } + nickattr = nickattr->next; + } + if(!nickname) { + rnn_err(db, "%s:%d: missing \"name\" attribute for nick\n", file, authorchild->line); + } else + ADDARRAY(author->nicknames, nickname); + } else { + rnn_err(db, "%s:%d: wrong tag in author: <%s>\n", file, authorchild->line, authorchild->name); + } + authorchild = authorchild->next; + } + ADDARRAY(copyright->authors, author); + } else { + rnn_err(db, "%s:%d: wrong tag in copyright: <%s>\n", file, chain->line, chain->name); + } + chain = chain->next; + } +} + +static int trytop (struct rnndb *db, char *file, xmlNode *node) { + if (!strcmp(node->name, "enum")) { + parseenum(db, file, node); + return 1; + } else if (!strcmp(node->name, "bitset")) { + parsebitset(db, file, node); + return 1; + } else if (!strcmp(node->name, "group")) { + parsegroup(db, file, node); + return 1; + } else if (!strcmp(node->name, "domain")) { + parsedomain(db, file, node); + return 1; + } else if (!strcmp(node->name, "spectype")) { + parsespectype(db, file, node); + return 1; + } else if (!strcmp(node->name, "import")) { + xmlAttr *attr = node->properties; + char *subfile = 0; + while (attr) { + if (!strcmp(attr->name, "file")) { + subfile = getattrib(db, file, node->line, attr); + } else { + rnn_err(db, "%s:%d: wrong attribute \"%s\" for import\n", file, node->line, attr->name); + } + attr = attr->next; + } + if (!subfile) { + rnn_err(db, "%s:%d: missing \"file\" attribute for import\n", file, node->line); + } else { + rnn_parsefile(db, subfile); + } + return 1; + } else if (!strcmp(node->name, "copyright")) { + parsecopyright(db, file, node); + return 1; + } + return 0; +} + +static char * find_file(const char *file_orig) +{ + const char *rnn_path = getenv("RNN_PATH"); + char *fname; + + if (!rnn_path) + rnn_path = RNN_DEF_PATH; + + FILE *file = find_in_path(file_orig, rnn_path, &fname); + if (!file) { + fprintf (stderr, "%s: couldn't find database file. Please set the env var RNN_PATH.\n", file_orig); + return NULL; + } + fclose(file); + + return fname; +} + +static int validate_doc(struct rnndb *db, xmlDocPtr doc, xmlNodePtr database) +{ + /* find the schemaLocation property: */ + xmlAttrPtr attr = database->properties; + const char *schema_name = NULL; + char *schema_path; + + while (attr) { + if (!strcmp(attr->name, "schemaLocation")) { + xmlNodePtr data = attr->children; + schema_name = data->content; + /* we expect this to look like schema.xsd.. I think + * technically it is supposed to be just a URL, but that doesn't + * quite match up to what we do.. Just skip over everything up to + * and including the first whitespace character: + */ + while (schema_name && (schema_name[0] != ' ')) + schema_name++; + schema_name++; + break; + } + } + + if (!schema_name) { + rnn_err(db, "could not find schema. Missing schemaLocation?"); + return 0; + } + + schema_path = find_file(schema_name); + if (!schema_path) { + rnn_err(db, "%s: couldn't find database file. Please set the env var RNN_PATH.\n", schema_name); + return 0; + } + + xmlSchemaParserCtxtPtr parser = xmlSchemaNewParserCtxt(schema_path); + xmlSchemaPtr schema = xmlSchemaParse(parser); + xmlSchemaValidCtxtPtr validCtxt = xmlSchemaNewValidCtxt(schema); + int ret = xmlSchemaValidateDoc(validCtxt, doc); + + xmlSchemaFreeValidCtxt(validCtxt); + xmlSchemaFree(schema); + xmlSchemaFreeParserCtxt(parser); + + free(schema_path); + + return ret; +} + +void rnn_parsefile (struct rnndb *db, char *file_orig) { + int i; + char *fname; + + fname = find_file(file_orig); + if (!fname) { + db->estatus = 1; + return; + } + + for (i = 0; i < db->filesnum; i++) + if (!strcmp(db->files[i], fname)) + return; + + ADDARRAY(db->files, fname); + xmlDocPtr doc = xmlParseFile(fname); + if (!doc) { + rnn_err(db, "%s: couldn't open database file. Please set the env var RNN_PATH.\n", fname); + return; + } + xmlNode *root = doc->children; + while (root) { + if (root->type != XML_ELEMENT_NODE) { + } else if (strcmp(root->name, "database")) { + rnn_err(db, "%s:%d: wrong top-level tag <%s>\n", fname, root->line, root->name); + } else { + xmlNode *chain = root->children; + if (validate_doc(db, doc, root)) { + rnn_err(db, "%s: database file has errors\n", fname); + return; + } + while (chain) { + if (chain->type != XML_ELEMENT_NODE) { + } else if (!trytop(db, fname, chain) && !trydoc(db, fname, chain)) { + rnn_err(db, "%s:%d: wrong tag in database: <%s>\n", fname, chain->line, chain->name); + } + chain = chain->next; + } + } + root = root->next; + } + xmlFreeDoc(doc); +} + +static struct rnnvalue *copyvalue (struct rnnvalue *val, char *file) { + struct rnnvalue *res = calloc (sizeof *res, 1); + res->name = val->name; + res->valvalid = val->valvalid; + res->value = val->value; + res->varinfo = val->varinfo; + res->file = file; + return res; +} + +static struct rnnbitfield *copybitfield (struct rnnbitfield *bf, char *file); + + +static void copytypeinfo (struct rnntypeinfo *dst, struct rnntypeinfo *src, char *file) { + int i; + dst->name = src->name; + dst->shr = src->shr; + dst->low = src->low; + dst->high = src->high; + dst->min = src->min; + dst->max = src->max; + dst->align = src->align; + dst->addvariant = src->addvariant; + for (i = 0; i < src->valsnum; i++) + ADDARRAY(dst->vals, copyvalue(src->vals[i], file)); + for (i = 0; i < src->bitfieldsnum; i++) + ADDARRAY(dst->bitfields, copybitfield(src->bitfields[i], file)); +} + +static struct rnnbitfield *copybitfield (struct rnnbitfield *bf, char *file) { + struct rnnbitfield *res = calloc (sizeof *res, 1); + res->name = bf->name; + res->varinfo = bf->varinfo; + res->file = file; + copytypeinfo(&res->typeinfo, &bf->typeinfo, file); + return res; +} + +static struct rnndelem *copydelem (struct rnndelem *elem, char *file) { + struct rnndelem *res = calloc (sizeof *res, 1); + res->type = elem->type; + res->name = elem->name; + res->width = elem->width; + res->access = elem->access; + res->offset = elem->offset; + res->length = elem->length; + res->stride = elem->stride; + res->varinfo = elem->varinfo; + res->file = file; + copytypeinfo(&res->typeinfo, &elem->typeinfo, file); + int i; + for (i = 0; i < elem->subelemsnum; i++) + ADDARRAY(res->subelems, copydelem(elem->subelems[i], file)); + for (i = 0; i < elem->offsetsnum; i++) + ADDARRAY(res->offsets, elem->offsets[i]); + return res; +} + +static struct rnnvarset *copyvarset (struct rnnvarset *varset) { + struct rnnvarset *res = calloc(sizeof *res, 1); + res->venum = varset->venum; + res->variants = calloc(sizeof *res->variants, res->venum->valsnum); + int i; + for (i = 0; i < res->venum->valsnum; i++) + res->variants[i] = varset->variants[i]; + return res; +} + +static void prepenum(struct rnndb *db, struct rnnenum *en); + +static int findvidx (struct rnndb *db, struct rnnenum *en, char *name) { + int i; + for (i = 0; i < en->valsnum; i++) + if (!strcmp(en->vals[i]->name, name)) + return i; + rnn_err(db, "Cannot find variant %s in enum %s!\n", name, en->name); + return -1; +} + +static void prepvarinfo (struct rnndb *db, char *what, struct rnnvarinfo *vi, struct rnnvarinfo *parent) { + if (parent) + vi->prefenum = parent->prefenum; + if (vi->prefixstr) { + if (!strcmp(vi->prefixstr, "none")) + vi->prefenum = 0; + else + vi->prefenum = rnn_findenum(db, vi->prefixstr); // XXX + } + int i; + if (parent) + for (i = 0; i < parent->varsetsnum; i++) + ADDARRAY(vi->varsets, copyvarset(parent->varsets[i])); + struct rnnenum *varset = vi->prefenum; + if (!varset && !vi->varsetstr && parent) + vi->varsetstr = parent->varsetstr; + if (vi->varsetstr) + varset = rnn_findenum(db, vi->varsetstr); + if (vi->variantsstr) { + char *vars = vi->variantsstr; + if (!varset) { + rnn_err(db, "%s: tried to use variants without active varset!\n", what); + return; + } + struct rnnvarset *vs = 0; + int nvars = varset->valsnum; + for (i = 0; i < vi->varsetsnum; i++) + if (vi->varsets[i]->venum == varset) { + vs = vi->varsets[i]; + break; + } + if (!vs) { + vs = calloc (sizeof *vs, 1); + vs->venum = varset; + vs->variants = calloc(sizeof *vs->variants, nvars); + for (i = 0; i < nvars; i++) + vs->variants[i] = 1; + ADDARRAY(vi->varsets, vs); + } + while (1) { + while (*vars == ' ') vars++; + if (*vars == 0) + break; + char *split = vars; + while (*split != ':' && *split != '-' && *split != ' ' && *split != 0) + split++; + char *first = 0; + if (split != vars) + first = strndup(vars, split-vars); + if (*split == ' ' || *split == 0) { + int idx = findvidx(db, varset, first); + if (idx != -1) + vs->variants[idx] |= 2; + vars = split; + } else { + char *end = split+1; + while (*end != ' ' && *end != 0) + end++; + char *second = 0; + if (end != split+1) + second = strndup(split+1, end-split-1); + int idx1 = 0; + if (first) + idx1 = findvidx(db, varset, first); + int idx2 = nvars; + if (second) { + idx2 = findvidx(db, varset, second); + if (*split == '-') + idx2++; + } + if (idx1 != -1 && idx2 != -1) + for (i = idx1; i < idx2; i++) + vs->variants[i] |= 2; + vars = end; + free(second); + } + free(first); + } + vi->dead = 1; + for (i = 0; i < nvars; i++) { + vs->variants[i] = (vs->variants[i] == 3); + if (vs->variants[i]) + vi->dead = 0; + } + } + if (vi->dead) + return; + if (vi->prefenum) { + struct rnnvarset *vs = 0; + for (i = 0; i < vi->varsetsnum; i++) + if (vi->varsets[i]->venum == vi->prefenum) { + vs = vi->varsets[i]; + break; + } + if (vs) { + for (i = 0; i < vi->prefenum->valsnum; i++) + if (vs->variants[i]) { + vi->prefix = vi->prefenum->vals[i]->name; + return; + } + } else { + vi->prefix = vi->prefenum->vals[0]->name; + } + } +} + +static void prepvalue(struct rnndb *db, struct rnnvalue *val, char *prefix, struct rnnvarinfo *parvi) { + val->fullname = catstr(prefix, val->name); + prepvarinfo (db, val->fullname, &val->varinfo, parvi); + if (val->varinfo.dead) + return; + if (val->varinfo.prefix) + val->fullname = catstr(val->varinfo.prefix, val->fullname); +} + +static void prepbitfield(struct rnndb *db, struct rnnbitfield *bf, char *prefix, struct rnnvarinfo *parvi); + +static void preptypeinfo(struct rnndb *db, struct rnntypeinfo *ti, char *prefix, struct rnnvarinfo *vi, char *file) { + int i; + if (ti->name) { + struct rnnenum *en = rnn_findenum (db, ti->name); + struct rnnbitset *bs = rnn_findbitset (db, ti->name); + struct rnnspectype *st = rnn_findspectype (db, ti->name); + if (en) { + if (en->isinline) { + ti->type = RNN_TTYPE_INLINE_ENUM; + int j; + for (j = 0; j < en->valsnum; j++) + ADDARRAY(ti->vals, copyvalue(en->vals[j], file)); + } else { + ti->type = RNN_TTYPE_ENUM; + ti->eenum = en; + } + } else if (bs) { + if (bs->isinline) { + ti->type = RNN_TTYPE_INLINE_BITSET; + int j; + for (j = 0; j < bs->bitfieldsnum; j++) + ADDARRAY(ti->bitfields, copybitfield(bs->bitfields[j], file)); + } else { + ti->type = RNN_TTYPE_BITSET; + ti->ebitset = bs; + } + } else if (st) { + ti->type = RNN_TTYPE_SPECTYPE; + ti->spectype = st; + } else if (!strcmp(ti->name, "hex")) { + ti->type = RNN_TTYPE_HEX; + } else if (!strcmp(ti->name, "float")) { + ti->type = RNN_TTYPE_FLOAT; + } else if (!strcmp(ti->name, "uint")) { + ti->type = RNN_TTYPE_UINT; + } else if (!strcmp(ti->name, "int")) { + ti->type = RNN_TTYPE_INT; + } else if (!strcmp(ti->name, "boolean")) { + ti->type = RNN_TTYPE_BOOLEAN; + } else if (!strcmp(ti->name, "bitfield")) { + ti->type = RNN_TTYPE_INLINE_BITSET; + } else if (!strcmp(ti->name, "enum")) { + ti->type = RNN_TTYPE_INLINE_ENUM; + } else if (!strcmp(ti->name, "fixed")) { + ti->type = RNN_TTYPE_FIXED; + } else if (!strcmp(ti->name, "ufixed")) { + ti->type = RNN_TTYPE_UFIXED; + } else if (!strcmp(ti->name, "a3xx_regid")) { + ti->type = RNN_TTYPE_A3XX_REGID; + } else if (!strcmp(ti->name, "waddress") || !strcmp(ti->name, "address")) { + ti->type = RNN_TTYPE_HEX; + } else { + ti->type = RNN_TTYPE_HEX; + rnn_err(db, "%s: unknown type %s\n", prefix, ti->name); + } + } else if (ti->bitfieldsnum) { + ti->name = "bitfield"; + ti->type = RNN_TTYPE_INLINE_BITSET; + } else if (ti->valsnum) { + ti->name = "enum"; + ti->type = RNN_TTYPE_INLINE_ENUM; + } else if (ti->low == 0 && ti->high == 0) { + ti->name = "boolean"; + ti->type = RNN_TTYPE_BOOLEAN; + } else { + ti->name = "hex"; + ti->type = RNN_TTYPE_HEX; + } + if (ti->addvariant && ti->type != RNN_TTYPE_ENUM) { + rnn_err(db, "%s: addvariant specified on non-enum type %s\n", prefix, ti->name); + } + for (i = 0; i < ti->bitfieldsnum; i++) + prepbitfield(db, ti->bitfields[i], prefix, vi); + for (i = 0; i < ti->valsnum; i++) + prepvalue(db, ti->vals[i], prefix, vi); +} + +static void prepbitfield(struct rnndb *db, struct rnnbitfield *bf, char *prefix, struct rnnvarinfo *parvi) { + bf->fullname = catstr(prefix, bf->name); + prepvarinfo (db, bf->fullname, &bf->varinfo, parvi); + if (bf->varinfo.dead) + return; + preptypeinfo(db, &bf->typeinfo, bf->fullname, &bf->varinfo, bf->file); + if (bf->varinfo.prefix) + bf->fullname = catstr(bf->varinfo.prefix, bf->fullname); +} + +static void prepdelem(struct rnndb *db, struct rnndelem *elem, char *prefix, struct rnnvarinfo *parvi, int width) { + if (elem->type == RNN_ETYPE_USE_GROUP) { + int i; + struct rnngroup *gr = 0; + for (i = 0; i < db->groupsnum; i++) + if (!strcmp(db->groups[i]->name, elem->name)) { + gr = db->groups[i]; + break; + } + if (gr) { + for (i = 0; i < gr->subelemsnum; i++) + ADDARRAY(elem->subelems, copydelem(gr->subelems[i], elem->file)); + } else { + rnn_err(db, "group %s not found!\n", elem->name); + } + elem->type = RNN_ETYPE_STRIPE; + elem->length = 1; + elem->name = 0; + } + if (elem->name) + elem->fullname = catstr(prefix, elem->name); + prepvarinfo (db, elem->fullname?elem->fullname:prefix, &elem->varinfo, parvi); + if (elem->varinfo.dead) + return; + if (elem->length != 1 && !elem->stride) { + if (elem->type != RNN_ETYPE_REG) { + rnn_err(db, "%s has non-1 length, but no stride!\n", elem->fullname); + } else { + elem->stride = elem->width/width; + } + } + preptypeinfo(db, &elem->typeinfo, elem->name?elem->fullname:prefix, &elem->varinfo, elem->file); + + int i; + for (i = 0; i < elem->subelemsnum; i++) + prepdelem(db, elem->subelems[i], elem->name?elem->fullname:prefix, &elem->varinfo, width); + if (elem->varinfo.prefix && elem->name) + elem->fullname = catstr(elem->varinfo.prefix, elem->fullname); +} + +static void prepdomain(struct rnndb *db, struct rnndomain *dom) { + prepvarinfo (db, dom->name, &dom->varinfo, 0); + int i; + for (i = 0; i < dom->subelemsnum; i++) + prepdelem(db, dom->subelems[i], dom->bare?0:dom->name, &dom->varinfo, dom->width); + dom->fullname = catstr(dom->varinfo.prefix, dom->name); +} + +static void prepenum(struct rnndb *db, struct rnnenum *en) { + if (en->prepared) + return; + prepvarinfo (db, en->name, &en->varinfo, 0); + int i; + if (en->isinline) + return; + for (i = 0; i < en->valsnum; i++) + prepvalue(db, en->vals[i], en->bare?0:en->name, &en->varinfo); + en->fullname = catstr(en->varinfo.prefix, en->name); + en->prepared = 1; +} + +static void prepbitset(struct rnndb *db, struct rnnbitset *bs) { + prepvarinfo (db, bs->name, &bs->varinfo, 0); + int i; + if (bs->isinline) + return; + for (i = 0; i < bs->bitfieldsnum; i++) + prepbitfield(db, bs->bitfields[i], bs->bare?0:bs->name, &bs->varinfo); + bs->fullname = catstr(bs->varinfo.prefix, bs->name); +} + +static void prepspectype(struct rnndb *db, struct rnnspectype *st) { + preptypeinfo(db, &st->typeinfo, st->name, 0, st->file); // XXX doesn't exactly make sense... +} + +void rnn_prepdb (struct rnndb *db) { + int i; + for (i = 0; i < db->enumsnum; i++) + prepenum(db, db->enums[i]); + for (i = 0; i < db->bitsetsnum; i++) + prepbitset(db, db->bitsets[i]); + for (i = 0; i < db->domainsnum; i++) + prepdomain(db, db->domains[i]); + for (i = 0; i < db->spectypesnum; i++) + prepspectype(db, db->spectypes[i]); +} + +struct rnnenum *rnn_findenum (struct rnndb *db, const char *name) { + int i; + for (i = 0; i < db->enumsnum; i++) + if (!strcmp(db->enums[i]->name, name)) + return db->enums[i]; + return 0; +} + +struct rnnbitset *rnn_findbitset (struct rnndb *db, const char *name) { + int i; + for (i = 0; i < db->bitsetsnum; i++) + if (!strcmp(db->bitsets[i]->name, name)) + return db->bitsets[i]; + return 0; +} + +struct rnndomain *rnn_finddomain (struct rnndb *db, const char *name) { + int i; + for (i = 0; i < db->domainsnum; i++) + if (!strcmp(db->domains[i]->name, name)) + return db->domains[i]; + return 0; +} + +struct rnnspectype *rnn_findspectype (struct rnndb *db, const char *name) { + int i; + for (i = 0; i < db->spectypesnum; i++) + if (!strcmp(db->spectypes[i]->name, name)) + return db->spectypes[i]; + return 0; +} diff --git a/drivers/gpu/drm/msm/headergen2/rnn.h b/drivers/gpu/drm/msm/headergen2/rnn.h new file mode 100644 index 000000000000..f90af090eb4d --- /dev/null +++ b/drivers/gpu/drm/msm/headergen2/rnn.h @@ -0,0 +1,243 @@ +/* + * Copyright (C) 2010 Marcin Kościelnicki + * Copyright (C) 2010 Luca Barbieri + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef RNN_H +#define RNN_H + +#include +#include + +struct rnnauthor { + char* name; + char* email; + char* contributions; + char* license; + char** nicknames; + int nicknamesnum; + int nicknamesmax; +}; + +struct rnncopyright { + unsigned firstyear; + char* license; + struct rnnauthor **authors; + int authorsnum; + int authorsmax; +}; + +struct rnndb { + struct rnncopyright copyright; + struct rnnenum **enums; + int enumsnum; + int enumsmax; + struct rnnbitset **bitsets; + int bitsetsnum; + int bitsetsmax; + struct rnndomain **domains; + int domainsnum; + int domainsmax; + struct rnngroup **groups; + int groupsnum; + int groupsmax; + struct rnnspectype **spectypes; + int spectypesnum; + int spectypesmax; + char **files; + int filesnum; + int filesmax; + int estatus; +}; + +struct rnnvarset { + struct rnnenum *venum; + int *variants; +}; + +struct rnnvarinfo { + char *prefixstr; + char *varsetstr; + char *variantsstr; + int dead; + struct rnnenum *prefenum; + char *prefix; + struct rnnvarset **varsets; + int varsetsnum; + int varsetsmax; +}; + +struct rnnenum { + char *name; + int bare; + int isinline; + struct rnnvarinfo varinfo; + struct rnnvalue **vals; + int valsnum; + int valsmax; + char *fullname; + int prepared; + char *file; +}; + +struct rnnvalue { + char *name; + int valvalid; + uint64_t value; + struct rnnvarinfo varinfo; + char *fullname; + char *file; +}; + +struct rnntypeinfo { + char *name; + enum rnnttype { + RNN_TTYPE_INVALID, + RNN_TTYPE_INLINE_ENUM, + RNN_TTYPE_INLINE_BITSET, + RNN_TTYPE_ENUM, + RNN_TTYPE_BITSET, + RNN_TTYPE_SPECTYPE, + RNN_TTYPE_HEX, + RNN_TTYPE_INT, + RNN_TTYPE_UINT, + RNN_TTYPE_FLOAT, + RNN_TTYPE_BOOLEAN, + RNN_TTYPE_FIXED, + RNN_TTYPE_UFIXED, + RNN_TTYPE_A3XX_REGID, + } type; + struct rnnenum *eenum; + struct rnnbitset *ebitset; + struct rnnspectype *spectype; + struct rnnbitfield **bitfields; + int bitfieldsnum; + int bitfieldsmax; + struct rnnvalue **vals; + int valsnum; + int valsmax; + int shr, low, high; + uint64_t min, max, align, radix; + int addvariant; + int minvalid, maxvalid, alignvalid, radixvalid; +}; + +static inline uint64_t typeinfo_mask(struct rnntypeinfo *ti) +{ + if (ti->high == 63) + return -(1ULL << ti->low); + else + return (1ULL << (ti->high + 1)) - (1ULL << ti->low); +} + +struct rnnbitset { + char *name; + int bare; + int isinline; + struct rnnvarinfo varinfo; + struct rnnbitfield **bitfields; + int bitfieldsnum; + int bitfieldsmax; + char *fullname; + char *file; +}; + +struct rnnbitfield { + char *name; + struct rnnvarinfo varinfo; + struct rnntypeinfo typeinfo; + char *fullname; + char *file; +}; + +struct rnndomain { + char *name; + int bare; + int width; + uint64_t size; + int sizevalid; + struct rnnvarinfo varinfo; + struct rnndelem **subelems; + int subelemsnum; + int subelemsmax; + char *fullname; + char *file; +}; + +struct rnngroup { + char *name; + struct rnndelem **subelems; + int subelemsnum; + int subelemsmax; +}; + +struct rnndelem { + enum rnnetype { + RNN_ETYPE_REG, + RNN_ETYPE_ARRAY, + RNN_ETYPE_STRIPE, + RNN_ETYPE_USE_GROUP, + } type; + char *name; + int width; + enum rnnaccess { + RNN_ACCESS_R, + RNN_ACCESS_W, + RNN_ACCESS_RW, + } access; + uint64_t offset; + uint64_t *offsets; /* for "array" with irregular offsets */ + int offsetsnum; + int offsetsmax; + char *doffset; + char **doffsets; + int doffsetsnum; + int doffsetsmax; + uint64_t length; + uint64_t stride; + struct rnndelem **subelems; + int subelemsnum; + int subelemsmax; + struct rnnvarinfo varinfo; + struct rnntypeinfo typeinfo; + struct rnnenum *index; /* for arrays, for symbolic idx values */ + char *fullname; + char *file; +}; + +struct rnnspectype { + char *name; + struct rnntypeinfo typeinfo; + char *file; +}; + +void rnn_init(void); +struct rnndb *rnn_newdb(void); +void rnn_parsefile (struct rnndb *db, char *file); +void rnn_prepdb (struct rnndb *db); +struct rnnenum *rnn_findenum (struct rnndb *db, const char *name); +struct rnnbitset *rnn_findbitset (struct rnndb *db, const char *name); +struct rnndomain *rnn_finddomain (struct rnndb *db, const char *name); +struct rnnspectype *rnn_findspectype (struct rnndb *db, const char *name); + +#endif diff --git a/drivers/gpu/drm/msm/headergen2/rnndec.c b/drivers/gpu/drm/msm/headergen2/rnndec.c new file mode 100644 index 000000000000..553c422d0545 --- /dev/null +++ b/drivers/gpu/drm/msm/headergen2/rnndec.c @@ -0,0 +1,550 @@ +/* + * Copyright (C) 2010-2011 Marcin Kościelnicki + * Copyright (C) 2010 Francisco Jerez + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "rnndec.h" +#include +#include +#include +#include +#include +#include "util.h" + +struct rnndeccontext *rnndec_newcontext(struct rnndb *db) { + struct rnndeccontext *res = calloc (sizeof *res, 1); + res->db = db; + res->colors = &envy_null_colors; + return res; +} + +int rnndec_varadd(struct rnndeccontext *ctx, char *varset, const char *variant) { + struct rnnenum *en = rnn_findenum(ctx->db, varset); + if (!en) { + fprintf (stderr, "Enum %s doesn't exist in database!\n", varset); + return 0; + } + int i, j; + for (i = 0; i < en->valsnum; i++) + if (!strcasecmp(en->vals[i]->name, variant)) { + struct rnndecvariant *ci = calloc (sizeof *ci, 1); + ci->en = en; + ci->variant = i; + ADDARRAY(ctx->vars, ci); + return 1; + } + + if (i == en->valsnum) { + fprintf (stderr, "Variant %s doesn't exist in enum %s!\n", variant, varset); + return 0; + } + + for (j = 0; j < ctx->varsnum; j++) { + if (ctx->vars[j]->en == en) { + ctx->vars[j]->variant = i; + break; + } + } + + if (i == ctx->varsnum) { + struct rnndecvariant *ci = calloc (sizeof *ci, 1); + ci->en = en; + ci->variant = i; + ADDARRAY(ctx->vars, ci); + } + + return 1; +} + +int rnndec_varmatch(struct rnndeccontext *ctx, struct rnnvarinfo *vi) { + if (vi->dead) + return 0; + int i; + for (i = 0; i < vi->varsetsnum; i++) { + int j; + for (j = 0; j < ctx->varsnum; j++) + if (vi->varsets[i]->venum == ctx->vars[j]->en) + break; + if (j == ctx->varsnum) { + fprintf (stderr, "I don't know which %s variant to use!\n", vi->varsets[i]->venum->name); + } else { + if (!vi->varsets[i]->variants[ctx->vars[j]->variant]) + return 0; + } + } + return 1; +} + +/* see https://en.wikipedia.org/wiki/Half-precision_floating-point_format */ +static uint32_t float16i(uint16_t val) +{ + uint32_t sign = ((uint32_t)(val & 0x8000)) << 16; + uint32_t frac = val & 0x3ff; + int32_t expn = (val >> 10) & 0x1f; + + if (expn == 0) { + if (frac) { + /* denormalized number: */ + int shift = __builtin_clz(frac) - 21; + frac <<= shift; + expn = -shift; + } else { + /* +/- zero: */ + return sign; + } + } else if (expn == 0x1f) { + /* Inf/NaN: */ + return sign | 0x7f800000 | (frac << 13); + } + + return sign | ((expn + 127 - 15) << 23) | (frac << 13); +} +static float float16(uint16_t val) +{ + union { uint32_t i; float f; } u; + u.i = float16i(val); + return u.f; +} + +static const char *rnndec_decode_enum_val(struct rnndeccontext *ctx, + struct rnnvalue **vals, int valsnum, uint64_t value) +{ + int i; + for (i = 0; i < valsnum; i++) + if (rnndec_varmatch(ctx, &vals[i]->varinfo) && + vals[i]->valvalid && vals[i]->value == value) + return vals[i]->name; + return NULL; +} + +const char *rnndec_decode_enum(struct rnndeccontext *ctx, const char *enumname, uint64_t enumval) +{ + struct rnnenum *en = rnn_findenum (ctx->db, enumname); + if (en) { + return rnndec_decode_enum_val(ctx, en->vals, en->valsnum, enumval); + } + return NULL; +} + +/* The name UNK%u is used as a placeholder for bitfields that exist but + * have an unknown function. + */ +static int is_unknown(const char *name) +{ + unsigned u; + return sscanf(name, "UNK%u", &u) == 1; +} + +char *rnndec_decodeval(struct rnndeccontext *ctx, struct rnntypeinfo *ti, uint64_t value) { + int width = ti->high - ti->low + 1; + char *res = 0; + int i; + struct rnnvalue **vals; + int valsnum; + struct rnnbitfield **bitfields; + int bitfieldsnum; + char *tmp; + const char *ctmp; + uint64_t mask, value_orig; + if (!ti) + goto failhex; + value_orig = value; + value = (value & typeinfo_mask(ti)) >> ti->low; + value <<= ti->shr; + + switch (ti->type) { + case RNN_TTYPE_ENUM: + vals = ti->eenum->vals; + valsnum = ti->eenum->valsnum; + goto doenum; + case RNN_TTYPE_INLINE_ENUM: + vals = ti->vals; + valsnum = ti->valsnum; + goto doenum; + doenum: + ctmp = rnndec_decode_enum_val(ctx, vals, valsnum, value); + if (ctmp) { + asprintf (&res, "%s%s%s", ctx->colors->eval, ctmp, ctx->colors->reset); + if (ti->addvariant) { + rnndec_varadd(ctx, ti->eenum->name, ctmp); + } + break; + } + goto failhex; + case RNN_TTYPE_BITSET: + bitfields = ti->ebitset->bitfields; + bitfieldsnum = ti->ebitset->bitfieldsnum; + goto dobitset; + case RNN_TTYPE_INLINE_BITSET: + bitfields = ti->bitfields; + bitfieldsnum = ti->bitfieldsnum; + goto dobitset; + dobitset: + mask = 0; + for (i = 0; i < bitfieldsnum; i++) { + if (!rnndec_varmatch(ctx, &bitfields[i]->varinfo)) + continue; + uint64_t type_mask = typeinfo_mask(&bitfields[i]->typeinfo); + if (((value & type_mask) == 0) && is_unknown(bitfields[i]->name)) + continue; + mask |= type_mask; + if (bitfields[i]->typeinfo.type == RNN_TTYPE_BOOLEAN) { + const char *color = is_unknown(bitfields[i]->name) ? + ctx->colors->err : ctx->colors->mod; + if (value & type_mask) { + if (!res) + asprintf (&res, "%s%s%s", color, bitfields[i]->name, ctx->colors->reset); + else { + asprintf (&tmp, "%s | %s%s%s", res, color, bitfields[i]->name, ctx->colors->reset); + free(res); + res = tmp; + } + } + continue; + } + char *subval; + if (is_unknown(bitfields[i]->name) && (bitfields[i]->typeinfo.type != RNN_TTYPE_A3XX_REGID)) { + uint64_t field_val = value & type_mask; + field_val = (field_val & typeinfo_mask(&bitfields[i]->typeinfo)) >> bitfields[i]->typeinfo.low; + field_val <<= bitfields[i]->typeinfo.shr; + asprintf (&subval, "%s%#"PRIx64"%s", ctx->colors->err, field_val, ctx->colors->reset); + } else { + subval = rnndec_decodeval(ctx, &bitfields[i]->typeinfo, value & type_mask); + } + if (!res) + asprintf (&res, "%s%s%s = %s", ctx->colors->rname, bitfields[i]->name, ctx->colors->reset, subval); + else { + asprintf (&tmp, "%s | %s%s%s = %s", res, ctx->colors->rname, bitfields[i]->name, ctx->colors->reset, subval); + free(res); + res = tmp; + } + free(subval); + } + if (value & ~mask) { + if (!res) + asprintf (&res, "%s%#"PRIx64"%s", ctx->colors->err, value & ~mask, ctx->colors->reset); + else { + asprintf (&tmp, "%s | %s%#"PRIx64"%s", res, ctx->colors->err, value & ~mask, ctx->colors->reset); + free(res); + res = tmp; + } + } + if (!res) + asprintf (&res, "%s0%s", ctx->colors->num, ctx->colors->reset); + asprintf (&tmp, "{ %s }", res); + free(res); + return tmp; + case RNN_TTYPE_SPECTYPE: + return rnndec_decodeval(ctx, &ti->spectype->typeinfo, value); + case RNN_TTYPE_HEX: + asprintf (&res, "%s%#"PRIx64"%s", ctx->colors->num, value, ctx->colors->reset); + break; + case RNN_TTYPE_FIXED: + if (value & UINT64_C(1) << (width-1)) { + asprintf (&res, "%s-%lf%s", ctx->colors->num, + ((double)((UINT64_C(1) << width) - value)) / ((double)(1 << ti->radix)), + ctx->colors->reset); + break; + } + /* fallthrough */ + case RNN_TTYPE_UFIXED: + asprintf (&res, "%s%lf%s", ctx->colors->num, + ((double)value) / ((double)(1LL << ti->radix)), + ctx->colors->reset); + break; + case RNN_TTYPE_A3XX_REGID: + asprintf (&res, "%sr%"PRIu64".%c%s", ctx->colors->num, (value >> 2), "xyzw"[value & 0x3], ctx->colors->reset); + break; + case RNN_TTYPE_UINT: + asprintf (&res, "%s%"PRIu64"%s", ctx->colors->num, value, ctx->colors->reset); + break; + case RNN_TTYPE_INT: + if (value & UINT64_C(1) << (width-1)) + asprintf (&res, "%s-%"PRIi64"%s", ctx->colors->num, (UINT64_C(1) << width) - value, ctx->colors->reset); + else + asprintf (&res, "%s%"PRIi64"%s", ctx->colors->num, value, ctx->colors->reset); + break; + case RNN_TTYPE_BOOLEAN: + if (value == 0) { + asprintf (&res, "%sFALSE%s", ctx->colors->eval, ctx->colors->reset); + } else if (value == 1) { + asprintf (&res, "%sTRUE%s", ctx->colors->eval, ctx->colors->reset); + } + break; + case RNN_TTYPE_FLOAT: { + union { uint64_t i; float f; double d; } val; + val.i = value; + if (width == 64) + asprintf(&res, "%s%f%s", ctx->colors->num, + val.d, ctx->colors->reset); + else if (width == 32) + asprintf(&res, "%s%f%s", ctx->colors->num, + val.f, ctx->colors->reset); + else if (width == 16) + asprintf(&res, "%s%f%s", ctx->colors->num, + float16(value), ctx->colors->reset); + else + goto failhex; + + break; + } + failhex: + default: + asprintf (&res, "%s%#"PRIx64"%s", ctx->colors->num, value, ctx->colors->reset); + break; + } + if (value_orig & ~typeinfo_mask(ti)) { + asprintf (&tmp, "%s | %s%#"PRIx64"%s", res, ctx->colors->err, value_orig & ~typeinfo_mask(ti), ctx->colors->reset); + free(res); + res = tmp; + } + return res; +} + +static char *appendidx (struct rnndeccontext *ctx, char *name, uint64_t idx, struct rnnenum *index) { + char *res; + const char *index_name = NULL; + + if (index) + index_name = rnndec_decode_enum_val(ctx, index->vals, index->valsnum, idx); + + if (index_name) + asprintf (&res, "%s[%s%s%s]", name, ctx->colors->eval, index_name, ctx->colors->reset); + else + asprintf (&res, "%s[%s%#"PRIx64"%s]", name, ctx->colors->num, idx, ctx->colors->reset); + + free (name); + return res; +} + +/* This could probably be made to work for stripes too.. */ +static int get_array_idx_offset(struct rnndelem *elem, uint64_t addr, uint64_t *idx, uint64_t *offset) +{ + if (elem->offsets) { + int i; + for (i = 0; i < elem->offsetsnum; i++) { + uint64_t o = elem->offsets[i]; + if ((o <= addr) && (addr < (o + elem->stride))) { + *idx = i; + *offset = addr - o; + return 0; + } + } + return -1; + } else { + if (addr < elem->offset) + return -1; + + *idx = (addr - elem->offset) / elem->stride; + *offset = (addr - elem->offset) % elem->stride; + + if (elem->length && (*idx >= elem->length)) + return -1; + + return 0; + } +} + +static struct rnndecaddrinfo *trymatch (struct rnndeccontext *ctx, struct rnndelem **elems, int elemsnum, uint64_t addr, int write, int dwidth, uint64_t *indices, int indicesnum) { + struct rnndecaddrinfo *res; + int i, j; + for (i = 0; i < elemsnum; i++) { + if (!rnndec_varmatch(ctx, &elems[i]->varinfo)) + continue; + uint64_t offset, idx; + char *tmp, *name; + switch (elems[i]->type) { + case RNN_ETYPE_REG: + if (addr < elems[i]->offset) + break; + if (elems[i]->stride) { + idx = (addr-elems[i]->offset)/elems[i]->stride; + offset = (addr-elems[i]->offset)%elems[i]->stride; + } else { + idx = 0; + offset = addr-elems[i]->offset; + } + if (offset >= elems[i]->width/dwidth) + break; + if (elems[i]->length && idx >= elems[i]->length) + break; + res = calloc (sizeof *res, 1); + res->typeinfo = &elems[i]->typeinfo; + res->width = elems[i]->width; + asprintf (&res->name, "%s%s%s", ctx->colors->rname, elems[i]->name, ctx->colors->reset); + for (j = 0; j < indicesnum; j++) + res->name = appendidx(ctx, res->name, indices[j], NULL); + if (elems[i]->length != 1) + res->name = appendidx(ctx, res->name, idx, elems[i]->index); + if (offset) { + asprintf (&tmp, "%s+%s%#"PRIx64"%s", res->name, ctx->colors->err, offset, ctx->colors->reset); + free(res->name); + res->name = tmp; + } + return res; + case RNN_ETYPE_STRIPE: + for (idx = 0; idx < elems[i]->length || !elems[i]->length; idx++) { + if (addr < elems[i]->offset + elems[i]->stride * idx) + break; + offset = addr - (elems[i]->offset + elems[i]->stride * idx); + int extraidx = (elems[i]->length != 1); + int nindnum = (elems[i]->name ? 0 : indicesnum + extraidx); + uint64_t nind[nindnum]; + if (!elems[i]->name) { + for (j = 0; j < indicesnum; j++) + nind[j] = indices[j]; + if (extraidx) + nind[indicesnum] = idx; + } + res = trymatch (ctx, elems[i]->subelems, elems[i]->subelemsnum, offset, write, dwidth, nind, nindnum); + if (!res) + continue; + if (!elems[i]->name) + return res; + asprintf (&name, "%s%s%s", ctx->colors->rname, elems[i]->name, ctx->colors->reset); + for (j = 0; j < indicesnum; j++) + name = appendidx(ctx, name, indices[j], NULL); + if (elems[i]->length != 1) + name = appendidx(ctx, name, idx, elems[i]->index); + asprintf (&tmp, "%s.%s", name, res->name); + free(name); + free(res->name); + res->name = tmp; + return res; + } + break; + case RNN_ETYPE_ARRAY: + if (get_array_idx_offset(elems[i], addr, &idx, &offset)) + break; + asprintf (&name, "%s%s%s", ctx->colors->rname, elems[i]->name, ctx->colors->reset); + for (j = 0; j < indicesnum; j++) + name = appendidx(ctx, name, indices[j], NULL); + if (elems[i]->length != 1) + name = appendidx(ctx, name, idx, elems[i]->index); + if ((res = trymatch (ctx, elems[i]->subelems, elems[i]->subelemsnum, offset, write, dwidth, 0, 0))) { + asprintf (&tmp, "%s.%s", name, res->name); + free(name); + free(res->name); + res->name = tmp; + return res; + } + res = calloc (sizeof *res, 1); + asprintf (&tmp, "%s+%s%#"PRIx64"%s", name, ctx->colors->err, offset, ctx->colors->reset); + free(name); + res->name = tmp; + return res; + default: + break; + } + } + return 0; +} + +int rnndec_checkaddr(struct rnndeccontext *ctx, struct rnndomain *domain, uint64_t addr, int write) { + struct rnndecaddrinfo *res = trymatch(ctx, domain->subelems, domain->subelemsnum, addr, write, domain->width, 0, 0); + if (res) { + free(res->name); + free(res); + } + return res != NULL; +} + +struct rnndecaddrinfo *rnndec_decodeaddr(struct rnndeccontext *ctx, struct rnndomain *domain, uint64_t addr, int write) { + struct rnndecaddrinfo *res = trymatch(ctx, domain->subelems, domain->subelemsnum, addr, write, domain->width, 0, 0); + if (res) + return res; + res = calloc (sizeof *res, 1); + asprintf (&res->name, "%s%#"PRIx64"%s", ctx->colors->err, addr, ctx->colors->reset); + return res; +} + +static unsigned tryreg(struct rnndeccontext *ctx, struct rnndelem **elems, int elemsnum, + int dwidth, const char *name, uint64_t *offset) +{ + int i; + unsigned ret; + const char *suffix = strchr(name, '['); + unsigned n = suffix ? (suffix - name) : strlen(name); + const char *dotsuffix = strchr(name, '.'); + unsigned dotn = dotsuffix ? (dotsuffix - name) : strlen(name); + + const char *child = NULL; + unsigned idx = 0; + + if (suffix) { + const char *tmp = strchr(suffix, ']'); + idx = strtol(suffix+1, NULL, 0); + child = tmp+2; + } + + for (i = 0; i < elemsnum; i++) { + struct rnndelem *elem = elems[i]; + if (!rnndec_varmatch(ctx, &elem->varinfo)) + continue; + int match = elem->name && (strlen(elem->name) == n) && !strncmp(elem->name, name, n); + switch (elem->type) { + case RNN_ETYPE_REG: + if (match) { + assert(!suffix); + *offset = elem->offset; + return 1; + } + break; + case RNN_ETYPE_STRIPE: + if (elem->name) { + if (!dotsuffix) + break; + if (strlen(elem->name) != dotn || strncmp(elem->name, name, dotn)) + break; + } + ret = tryreg(ctx, elem->subelems, elem->subelemsnum, dwidth, + elem->name ? dotsuffix : name, offset); + if (ret) + return 1; + break; + case RNN_ETYPE_ARRAY: + if (match) { + assert(suffix); + ret = tryreg(ctx, elem->subelems, elem->subelemsnum, dwidth, child, offset); + if (ret) { + *offset += elem->offset + (idx * elem->stride); + return 1; + } + } + break; + default: + break; + } + } + return 0; +} + +uint64_t rnndec_decodereg(struct rnndeccontext *ctx, struct rnndomain *domain, const char *name) +{ + uint64_t offset; + if (tryreg(ctx, domain->subelems, domain->subelemsnum, domain->width, name, &offset)) { + return offset; + } else { + return 0; + } +} diff --git a/drivers/gpu/drm/msm/headergen2/rnndec.h b/drivers/gpu/drm/msm/headergen2/rnndec.h new file mode 100644 index 000000000000..6e90eb9e97df --- /dev/null +++ b/drivers/gpu/drm/msm/headergen2/rnndec.h @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2010 Marcin Kościelnicki + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef RNNDEC_H +#define RNNDEC_H + +#include "rnn.h" +#include "colors.h" + +struct rnndecvariant { + struct rnnenum *en; + int variant; +}; + +struct rnndeccontext { + struct rnndb *db; + struct rnndecvariant **vars; + int varsnum; + int varsmax; + const struct envy_colors *colors; +}; + +struct rnndecaddrinfo { + struct rnntypeinfo *typeinfo; + int width; + char *name; +}; + +struct rnndeccontext *rnndec_newcontext(struct rnndb *db); +int rnndec_varadd(struct rnndeccontext *ctx, char *varset, const char *variant); +int rnndec_varmatch(struct rnndeccontext *ctx, struct rnnvarinfo *vi); +const char *rnndec_decode_enum(struct rnndeccontext *ctx, const char *enumname, uint64_t enumval); +char *rnndec_decodeval(struct rnndeccontext *ctx, struct rnntypeinfo *ti, uint64_t value); +int rnndec_checkaddr(struct rnndeccontext *ctx, struct rnndomain *domain, uint64_t addr, int write); +struct rnndecaddrinfo *rnndec_decodeaddr(struct rnndeccontext *ctx, struct rnndomain *domain, uint64_t addr, int write); +uint64_t rnndec_decodereg(struct rnndeccontext *ctx, struct rnndomain *domain, const char *name); + +#endif diff --git a/drivers/gpu/drm/msm/headergen2/util.h b/drivers/gpu/drm/msm/headergen2/util.h new file mode 100644 index 000000000000..98a32a34d076 --- /dev/null +++ b/drivers/gpu/drm/msm/headergen2/util.h @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2010-2011 Marcin Kościelnicki + * Copyright (C) 2010 Francisco Jerez + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef UTIL_H +#define UTIL_H + +#include +#include +#include + +#define ADDARRAY(a, e) \ + do { \ + if ((a ## num) >= (a ## max)) { \ + if (!(a ## max)) \ + (a ## max) = 16; \ + else \ + (a ## max) *= 2; \ + (a) = realloc((a), (a ## max)*sizeof(*(a))); \ + } \ + (a)[(a ## num)++] = (e); \ + } while(0) + +#define FINDARRAY(a, tmp, pred) \ + ({ \ + int __i; \ + \ + for (__i = 0; __i < (a ## num); __i++) { \ + tmp = (a)[__i]; \ + if (pred) \ + break; \ + } \ + \ + tmp = ((pred) ? tmp : NULL); \ + }) + +/* ceil(log2(x)) */ +static inline int clog2(uint64_t x) { + if (!x) + return x; + int r = 0; + while (x - 1 > (1ull << r) - 1) + r++; + return r; +} + +#define ARRAY_SIZE(a) (sizeof (a) / sizeof *(a)) + +#define min(a,b) \ + ({ \ + typeof (a) _a = (a); \ + typeof (b) _b = (b); \ + _a < _b ? _a : _b; \ + }) + +#define max(a,b) \ + ({ \ + typeof (a) _a = (a); \ + typeof (b) _b = (b); \ + _a > _b ? _a : _b; \ + }) + +#define CEILDIV(a, b) (((a) + (b) - 1)/(b)) + +#define extr(a, b, c) ((uint64_t)(a) << (64 - (b) - (c)) >> (64 - (c))) +#define extrs(a, b, c) ((int64_t)(a) << (64 - (b) - (c)) >> (64 - (c))) +#define sext(a, b) extrs(a, 0, b+1) +#define bflmask(a) ((2ull << ((a)-1)) - 1) +#define insrt(a, b, c, d) ((a) = ((a) & ~(bflmask(c) << (b))) | ((d) & bflmask(c)) << (b)) + +struct envy_loc { + int lstart; + int cstart; + int lend; + int cend; + const char *file; +}; + +#define LOC_FORMAT(loc, str) "%s:%d.%d-%d.%d: " str, (loc).file, (loc).lstart, (loc).cstart, (loc).lend, (loc).cend + +uint32_t elf_hash(const char *str); + +FILE *find_in_path(const char *name, const char *path, char **pfullname); + +struct astr { + char *str; + size_t len; +}; + +void print_escaped_astr(FILE *out, struct astr *astr); + +char *aprintf(const char *format, ...); + +#endif diff --git a/drivers/gpu/drm/msm/headergen2/util/u_debug.h b/drivers/gpu/drm/msm/headergen2/util/u_debug.h new file mode 100644 index 000000000000..7faeece699d9 --- /dev/null +++ b/drivers/gpu/drm/msm/headergen2/util/u_debug.h @@ -0,0 +1,12 @@ +/* stub for compiling srcs syncd from mesa */ + +#ifndef U_DEBUG_H_ +#define U_DEBUG_H_ + +#if defined(__GNUC__) +#define _util_printf_format(fmt, list) __attribute__ ((format (printf, fmt, list))) +#else +#define _util_printf_format(fmt, list) +#endif + +#endif /* U_DEBUG_H_ */ From patchwork Mon Feb 26 02:11:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776002 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B9641078B for ; Mon, 26 Feb 2024 02:11:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913518; cv=none; b=sV0s1cf4ZHmG3mVA+zEPqZzVl7C/6aTHPUiGAbzXgduWX//xXPU8tx12Fksm/w5Jz9vMygRRs5Casy0TmNb61T1uSiNxoaUhRrumD/pykwm+rXFxvQG0kH6QRpG2NVoQxKJadOA9dpsI/ssmPhPG0rhSElYgLkmNzeOfEhC8kwU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913518; c=relaxed/simple; bh=jZfVAAcDxjvKB0VY8B3YaZ+uO2w0uEao68eTQKvjiw0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ImHTIlDnFddEaOvYXcVxt1vbFn+ZGEEWNVm6jQJNRRRp6eVfwGfiB7PimDjOyei50WcE3iz87Kaoe2vLtgkpaWaJKpWlCEjGU+p7AsoyfMamvQNHghg/Wls8CnBPi7CqJzp+9CayDI91WPshkk2x8sBVIzFpGw6z8T8OxXynu3Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jTK7GlPN; arc=none smtp.client-ip=209.85.208.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jTK7GlPN" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2d27184197cso29824101fa.1 for ; Sun, 25 Feb 2024 18:11:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913513; x=1709518313; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=B4WJzDolwQAt18vJAoYRdoVVqjnAvhbqXGlG4vWEs3Y=; b=jTK7GlPNZDodkAxLOQnTRxlmR3EKHqnPKDJ2MkVLG8tvAskrgno7okbWPS+nLPZI+6 3JuWEazS74sUVEO/8Ja5l2IYTv0sFnK42mFQsIBrcY3f+vQ2zGByvTdWhEL2OTpSAXbR qAIDGJIRGdICp7SEdR2HOeP5sNSRtKoYbakpsy+CptHRRb2oOLSv+Xicaq7sNOva7A0w HwqrSdq8fPuVfWte9sRyOSIyC9ks/Qjnoh2lhtpsdDPeK+7da5CJ/ShKMMY/QmOxOFIc ByKT+YD/6XR5euJTQa15PMj7eSrzx26NDyoV1DlIKzWb884F65YT2ckvl/40zm1unmRY wZUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913513; x=1709518313; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B4WJzDolwQAt18vJAoYRdoVVqjnAvhbqXGlG4vWEs3Y=; b=K1zF395gJe0ZIOIJUDEFAnur+RjrGxb2pvTxNQ1EZO22vuUkd4lT67spw+Z/AL1OC/ IS1W+nFqtBU/+8ivX3ej4E3YEsjMXuc/I3Ypw1yE3zrY4+gIkq5i3Sq/oODgyvcW7CWH L5FGz6STSabTpL0PPNiTtyEkS10laE8cwkVxhvL9GgYKo0i5vjuOAdxif+BRmiw4FYOs iFmuDD3xccVS3h1smTRaomNwphRycDwYYeG0HaVj7Ii952P5xw7EXsDJoty1OxswZCsK wFL/M3mZYW5c/OJexA0v7yMW98CFUHjpv26a+hgiPNEZKZhXoGLTVBK3mHifRR/tS8UU Ni3A== X-Forwarded-Encrypted: i=1; AJvYcCW3VwSHD9plwLdyun6LixvKikUiE3YK1MPcYFD7R/S2nkw5OtrVuHlgl0MrMLo6U7M+eVLlDg1QhLbsOGGmuzcvrMhdBl6ZIVht983fhA== X-Gm-Message-State: AOJu0YxkccLjKFmhSi2nIKqA6SH8j4VGlYIlbZ/YuwZE3N9W20UTeGNy MLuflCsRF+pIPgdRE//1pcrGcKqdi2FMWkMF0v5aGsuw//oZHpLbJl447pxIOzbFq/gitYR+ydj S X-Google-Smtp-Source: AGHT+IHIhjygvqwAPNq6G01cvfGh0Xz2bV+AHOCuxJnMV+tOjv30gYslyjwruP3z9HG5pCKzHnIc9w== X-Received: by 2002:a05:6512:2352:b0:512:f628:32b9 with SMTP id p18-20020a056512235200b00512f62832b9mr2204358lfu.27.1708913513426; Sun, 25 Feb 2024 18:11:53 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:52 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:43 +0200 Subject: [PATCH RFC 07/12] drm/msm/headergen: use asprintf instead of custom aprintf Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-7-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3089; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=jZfVAAcDxjvKB0VY8B3YaZ+uO2w0uEao68eTQKvjiw0=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/NhtJZMjKcvl1vvJmmqadrFVvuv6cSSXvf/V iZT9I/HRvGJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYQAKCRCLPIo+Aiko 1TdVB/4rX75OqHP0pic+FcAPiu8AJWgzBPrcNlgqGriLQU68RjcWyfSqT8vjWjJQ0hJFEi1PD+D hT1pS43M0PqiToTLxrZJdJE1RXheoLvG+7nCKJspMiBg+0ALmJ+RSf49AoJyRA8gCmS6bhebATz clq0L088U7EmdDA3O+3bZSXDnDtsy8fWi5vjqu+H1Muw3+8KS+0R2jFDpIQjLuuW1bZ9YLHiOQL hCeXbjMkeftb7dv6WjK2EI9wBhaWdz+9Ssewt673vGkZU3eka/wyfnH9Ppp38YKVDmIROMTFpPw Z9syTfwp2u2AnGSgjcs2yWiaQapH/EB7rjQrVhlZPG6KEFbw X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Replace custom aprintf() function with the standard asprintf(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/headergen2/aprintf.c | 38 -------------------------------- drivers/gpu/drm/msm/headergen2/rnn.c | 5 ++++- drivers/gpu/drm/msm/headergen2/util.h | 2 -- 3 files changed, 4 insertions(+), 41 deletions(-) diff --git a/drivers/gpu/drm/msm/headergen2/aprintf.c b/drivers/gpu/drm/msm/headergen2/aprintf.c deleted file mode 100644 index b3d924f59413..000000000000 --- a/drivers/gpu/drm/msm/headergen2/aprintf.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2009-2011 Marcin Kościelnicki - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "util.h" -#include - -char *aprintf(const char *format, ...) { - va_list va; - va_start(va, format); - size_t sz = vsnprintf(0, 0, format, va); - va_end(va); - char *res = malloc(sz + 1); - va_start(va, format); - vsnprintf(res, sz + 1, format, va); - va_end(va); - return res; -} diff --git a/drivers/gpu/drm/msm/headergen2/rnn.c b/drivers/gpu/drm/msm/headergen2/rnn.c index d82d2a561b02..6cf3c54954bd 100644 --- a/drivers/gpu/drm/msm/headergen2/rnn.c +++ b/drivers/gpu/drm/msm/headergen2/rnn.c @@ -44,9 +44,12 @@ #include "util/u_debug.h" static char *catstr (char *a, char *b) { + char *res; + if (!a) return b; - return aprintf("%s_%s", a, b); + + return asprintf(&res, "%s_%s", a, b) < 0 ? NULL : res; } static int strdiff (const char *a, const char *b) { diff --git a/drivers/gpu/drm/msm/headergen2/util.h b/drivers/gpu/drm/msm/headergen2/util.h index 98a32a34d076..07ad637e4521 100644 --- a/drivers/gpu/drm/msm/headergen2/util.h +++ b/drivers/gpu/drm/msm/headergen2/util.h @@ -110,6 +110,4 @@ struct astr { void print_escaped_astr(FILE *out, struct astr *astr); -char *aprintf(const char *format, ...); - #endif From patchwork Mon Feb 26 02:11:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776645 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E9A633EC for ; Mon, 26 Feb 2024 02:11:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913517; cv=none; b=iBoI/dQQN1Uza4A55Pg5R70DJp1aZ2CQbsC2zwV25YAhULpJ4THLl+67uz6QErmFao58XlzWgwSkA+qjfKYiYX+pXlmDZvIM23yLojgNv9U+j1DtXR8HdWoBRnh0QgMxFx6jk1OldNLMdfQQQN59qFy9DDqPsX3kKpT5AU4qji4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913517; c=relaxed/simple; bh=cdm61gYGUySsFxPZ5ngtMYEu8AnIiXIGfprwz9M15j0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RUr4ykPX1zx0ySZgDxsp9xB536E0RRqbP7hQis4w0SIPGQPX1plQknKnO/iyTLPejFu626NTX7xomZwH3O0yD65NZX/pbD9gfZyo4Fi8W/KFnX1lQZLzxaOvGWJHpduRhSiUk+l2wi/QjpMxSfg9kVk2XvwcIpTNgELbqzL+dq8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=SETr7nFg; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SETr7nFg" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-512f1c95a06so1580369e87.0 for ; Sun, 25 Feb 2024 18:11:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913514; x=1709518314; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=w3E7dzOhxFiHb1JCqkhJvLIWTzxr8XDqqA0WBoNbgeo=; b=SETr7nFghbbOI0G/a5bafZto2x4LxkUrkS4qwT1eGqYTpTzcX+/mfn6i+6yNRnlrpG ti5yTRk/UU8C0aOncZ5Qc+OffuZjThrFgBJ7UREo8+G3h46G3b9wmHkDa03wyKAMKxb3 cm4zwakBgn3EajsORwZnDaHQ+HEWSHZypk4hOBRkyO8W6EmaTV0TjGoeQo7HVp3xlmCf 86rL4fGUSvqkw5TduqiSf6kO0wW1xJNItHLFjtmVUPexcte33XnJb4TBpQ2tAgHTsqj3 woRvDODaiVQZ9x/s40vfhXXveVUhqklQT1fF7jSFDv5ba3M97z7gQRJgi3KezsSTkicF dZFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913514; x=1709518314; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w3E7dzOhxFiHb1JCqkhJvLIWTzxr8XDqqA0WBoNbgeo=; b=T/i3FmUWPaxaqDAZ9460OOKkogbNbDBcuaO2kq5imIs7+Le4Apm4NZ31Xax8t98oj7 VHFjusIIygGqXlaKGtf5R+pQgfEZxW4wcCZHFiCF3WLy750TU1xowMVgOI6UT4x8Kt2z sXsSJbjNkj0jzd9PqU+V3gByLSNwP3rM7dGQvbzVgClffucZR6V4dgQDgHgBIDm0bpt2 1DuGndjQFNR1zKSoI4rDEWhnEKYAehOJz4sCyjP/mZa4YaTsQ+hWT98PlZH4M3NHyMds AgFgvmmo64htFuiJ2QKxEujmX8s71dbC74iRn7P7RbemcfRL0DsT7yKmwTZkt7nUms3k PY4w== X-Forwarded-Encrypted: i=1; AJvYcCWhZ0brA7E8YxBkWJNvG7ebNl/UNW2HFMvYB5iZ/zXgif2f9xX0ND0wwLNUe5/o1KMAN6Oe3G65qLTGBh62j6zLuTNISx7xIJS9gaDZQg== X-Gm-Message-State: AOJu0YwgGaPnJ+TDnLlOVAkGekqFyi1eiVScYTiU8bNGPSnOUihau1ic 8FVSN+hV8T165lUo2WznJo86KuMpwby4/xqcMhrWsKLosvf7zBlvE/MSZfOmSJg= X-Google-Smtp-Source: AGHT+IELdSvsYandsvUg2/9kXl+Uxy6kAqgjNUnscBWDJrEMCJeiyutSYFowciKyHufpcYsErIDaEQ== X-Received: by 2002:a05:6512:2007:b0:512:b43d:6694 with SMTP id a7-20020a056512200700b00512b43d6694mr1524362lfb.32.1708913514398; Sun, 25 Feb 2024 18:11:54 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:53 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:44 +0200 Subject: [PATCH RFC 08/12] drm/msm/headergen: don't output full file paths Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-8-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1228; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=cdm61gYGUySsFxPZ5ngtMYEu8AnIiXIGfprwz9M15j0=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/NhT7+nEsdNbK4/t6/GWM4DvV+yrpaxToNms 1msEgdr7MCJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYQAKCRCLPIo+Aiko 1e7GB/46EXHrORsKwaZpnKqF3lwzDU5kEbixRHeZy/SKsQys8wDF7msZstYUfIfros0SjXuGoJK Dnkg92e8E+Aa/GXa3/qWfkJyBPoeSogz78JZvkb5iGhuQtwqjBVXd4S6bt84CSWqyCuN2Hn4OwR JSEJKGu4AKK7xgMekhm4rGTlO71vF5cFSaJGR9gWtV4JncK9yEV/nWYgAp5kMd/v1/Cm85zBGaT DWhIM/JBGe7S+XnNITrRCrsy/HwgjSwFvTr7eKH1wb9+z16h/UIbqVWk08eguBjp14TwL41ILeY BFsjSb0hpnYqVsm//J92J5mLTKGYUaI9/tOZHzQ65jM/CN/1 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A In order to reduce noise, include just the file name into the generated file headers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/headergen2/headergen2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/headergen2/headergen2.c b/drivers/gpu/drm/msm/headergen2/headergen2.c index d5a3eb7562ee..2e5c4593d865 100644 --- a/drivers/gpu/drm/msm/headergen2/headergen2.c +++ b/drivers/gpu/drm/msm/headergen2/headergen2.c @@ -377,13 +377,14 @@ static void printhead(struct fout f, struct rnndb *db) { "The rules-ng-ng source files this header was generated from are:\n"); unsigned maxlen = 0; for(i = 0; i < db->filesnum; ++i) { - unsigned len = strlen(db->files[i]); + unsigned len = strlen(basename(db->files[i])); if(len > maxlen) maxlen = len; } for(i = 0; i < db->filesnum; ++i) { - unsigned len = strlen(db->files[i]); - fprintf(f.file, "- %s%*s ", db->files[i], maxlen - len, ""); + char *name = basename(db->files[i]); + unsigned len = strlen(name); + fprintf(f.file, "- %s%*s ", name, maxlen - len, ""); print_file_info(f.file, db->files[i]); } fprintf(f.file, From patchwork Mon Feb 26 02:11:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776644 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D322EEB5 for ; Mon, 26 Feb 2024 02:11:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913518; cv=none; b=XFVWocQAneBRoeL62q/axdiCaM6G/VXk4s2NDLkG75d5f4whdbjfrfCvKH7pUkLi18cqc74UgYMfQf4D7XRQATUnGkb1KuyXJB4TyLLGGMZxuaSPADctO+vSQGagmq4fts/akKkJBXDyYGKcarzzZ6e8eeM3ZMhxYQPKq+xqlVQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913518; c=relaxed/simple; bh=JyJ2naEA9+YJx/+oipu+eUllHx2U7M8qpx+d+P3kb+o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I63+wZv2OjXPUEK4ulXUEFgW+8SW+Hz82pUpU0GxbZivQrGvY2QzJVUfh/qcxoltuuo+B1GLRBnjpwSWuCGKY9gXUfO64nYQNdEA81+uH1vEHBCGe2wzORCKjcYpPTwGXxASwvcQY/lvSVQBQjYCPdFstJp5Ou+VW8Mg14t1G3E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=lL+VWtMq; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="lL+VWtMq" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-512b29f82d1so3426904e87.1 for ; Sun, 25 Feb 2024 18:11:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913515; x=1709518315; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=18tJ6UzqGWS5ZS/rCnpPVeNsGeBIHv5z+8hQsl9S7jI=; b=lL+VWtMqas+uG1y93l4GZGFjDOxzbb4s40zh/03l5oF36oSDH2Vnz3kCAXHj0pDKeB KkiI4EwGp++B7M7/6v+RLDNxGK9ed6oggCuIR78dAbW1OUwHKXFahqZXbUbc9/wsuGlo 5YvAIdvYq5bUcKkhZjntUO/YjV68LUw2g4Ivd+sD097/xzHIDfa8IcPuv82Hcge3tDFL 5uOBWOMoOTwcbfVpmrNIq+v+Ub32Ob6+UZV2AbmgzU/5yrnzMvuFkPVwy19OqAI3QRAP EwWymoE74UVamR8kV5R67RAnjWe7Vchw779mg0UmWtVwz3jlld1fHk5EqyK8DshfTkbV z+Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913515; x=1709518315; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=18tJ6UzqGWS5ZS/rCnpPVeNsGeBIHv5z+8hQsl9S7jI=; b=US3HXQ3/5oGiqctmC2uYkK4Z6h77AjI6zvfe0uWMMXpXE1TgcvzoHmXvXipnozVAyq z9/HgB7X8qesTDizk3jmvA6njIZB7ldXIAecto8Esb96umTdUY0ZMJa77vqEoR7Y2Fkz /HN6zefaKeTCqOaItNTRMMQ5ohUTtbDNX36A9pVO0yUOCqM9V/dAKX4lkpSNocuGtgKA F1xJcwCOmOJZo9jnAVQJuSbg3hcuqsG/PDGEycFAipMZBbv2+oo7MYpwOmqeGulqc71J DztjMyeoFnK+tw3N9DYdhq73Bsfn3uvoUCy1d/MhmNiEksoX7TPVuYNbzvoEZh/2flaS rIOA== X-Forwarded-Encrypted: i=1; AJvYcCUm9Yj1ZQ8KbesphfesVw+c5zNjORdpQNNYazjlI2UvxUV3LW+VLPdPrLzn7vvQI4qIl39EvDxYYJy2xshU4UHqcB/BUgQRr8wTvAKROw== X-Gm-Message-State: AOJu0YyK9ThzJ9Wt/rzRdXjeQhW5pUUIZmHdBDeO4iQiDf1gpdETbVKP Hzx2HVSS4YhTZIH1SZ6h/JcYE8o+sD5t36WX2fu48rywqKPOhVHZ550ftFBVc6U= X-Google-Smtp-Source: AGHT+IGx7Awy//hcII4n+oRauO+5C95ueBAjeHayplcepthN/F68ja0f/KxiVX2XJaG/pH3wqhgU4w== X-Received: by 2002:a05:6512:2109:b0:512:b932:7913 with SMTP id q9-20020a056512210900b00512b9327913mr2888939lfr.41.1708913515397; Sun, 25 Feb 2024 18:11:55 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:54 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:45 +0200 Subject: [PATCH RFC 09/12] drm/msm/headergen: generate _shipped files Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-9-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1828; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=JyJ2naEA9+YJx/+oipu+eUllHx2U7M8qpx+d+P3kb+o=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/NhQ5hUimItcSECWaPO/JC8mPEonJzKnRRJr ZQN9JCP0jyJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYQAKCRCLPIo+Aiko 1XAgB/47QZNDdURBNmftlahtNPqFQ41iZc3XuPDbBZhQR69OOxcWir3zjFsCoPTsBoKQHuKDu5p QGsdtUFWG1eJAsrdIIer0q5RugUFdgC5MB+dwQ6rlDDkwyRYAzRfmoodyXCV6PEc6y7farR0RpK 2lOSZb9+Fi39wUWtH9RpTOJjRQ3BZY1AgkfvT06IUs02MNq7jm5RQDLnLz+ymEVHcdgBqkr3ZHd 2qdP8LuCXHR2g6uJoyXVsQE/h5JCHCoB73otR85c/w23NZc1KddSlzF9hzAEcEna1gBy0ZqyzBx J/rpd4H7zDnzZ+b+5OHDn3PWqehjd9jn81a8GmSQcEco5tJ2 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Change headergen semantics to generate the .xml.h_shipped files instead of just generating headers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/headergen2/headergen2.c | 33 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/msm/headergen2/headergen2.c b/drivers/gpu/drm/msm/headergen2/headergen2.c index 2e5c4593d865..7d884fa547b2 100644 --- a/drivers/gpu/drm/msm/headergen2/headergen2.c +++ b/drivers/gpu/drm/msm/headergen2/headergen2.c @@ -417,30 +417,41 @@ static void printhead(struct fout f, struct rnndb *db) { int main(int argc, char **argv) { char *file; + char *out_dir; struct rnndb *db; int i, j; - if (argc < 2) { - fprintf(stderr, "Usage:\n\theadergen database-file\n"); - exit(1); + if (argv[1] && !strcmp(argv[1], "--no-asserts")) { + no_asserts = true; + argv++; + argc--; } - if ((argc >= 3) && !strcmp(argv[1], "--no-asserts")) { - no_asserts = true; - file = argv[2]; - } else { - file = argv[1]; + if (argc != 3) { + fprintf(stderr, "Usage:\n\theadergen database-file out-dir\n"); + exit(1); } + file = argv[1]; + out_dir = argv[2]; + rnn_init(); db = rnn_newdb(); rnn_parsefile (db, file); rnn_prepdb (db); for(i = 0; i < db->filesnum; ++i) { - char *dstname = malloc(strlen(db->files[i]) + 3); + char *curfile = basename(db->files[i]); + char *dstname; char *pretty; - strcpy(dstname, db->files[i]); - strcat(dstname, ".h"); + int ret; + + ret = asprintf(&dstname, "%s/%s.h_shipped", + out_dir, curfile); + if (ret < 0) { + perror("asprintf"); + exit(1); + } + struct fout f = { db->files[i], fopen(dstname, "w") }; if (!f.file) { perror(dstname); From patchwork Mon Feb 26 02:11:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776642 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4553233EC for ; Mon, 26 Feb 2024 02:11:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913527; cv=none; b=AvuozRusxm5eNBU18OvchlX3HWqwp4GgHs8BOhc+9ydwa34aEtHRzGcrZ/O9YBLYr7pJ98+UbgO0m9yrV9SWqTaoN6JA4viKZ7v5gdscZ6F5KsP2opJe/eB44MsubHLpYtGsEL02lpP53h70O80dbDqf8oFH84MPBfGAmwlvy38= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913527; c=relaxed/simple; bh=hrqsxMredHHnQdY+8sAWGbDUjUGcu/PuHcMrzMaXSSg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CuCigYt4rUEMO7hVDwIpuSPvw6nRetoOL1wkL0cV51ZBuCAYal+tlFv9UF5M+6nzNj/rSSxZeiEEvBCdlEFSKyVRAxNSWHnNpjkBs/O4Iyxo4vtJJthyLaSBQFVerqqiQv/LjSSZyS1FWL6CDBPmsuFmTJDEuiWWD07ortXgDSU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=L4u/Z+bR; arc=none smtp.client-ip=209.85.208.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="L4u/Z+bR" Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2d1094b5568so27828321fa.1 for ; Sun, 25 Feb 2024 18:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913516; x=1709518316; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=5wxMTYHoVZlE0hbizZ40QU8CUtM003T2riOC6sHTjiE=; b=L4u/Z+bRD982b+noGZI7NPz55gf6mROj1FGF/cX9EJBZwjkAA/JlsQy3WWRhZwX661 tWc5fkU1zpj7c2W431n9PBvAltnbEYLElZsBsH35BNExvn5+X0ck0aCZNO5okWVmfSvs 9RjR+yqOrnP5UAlEoMgKGdepHuvrfizcHatbGHD1VYfOSQFGWpYQvd6+Wxge+JddHnon c2cyu4uj+Z/l6Ut0yT18/rEyN793l9BqmwZwo587eyyKqRjgMVovcAQsrFOdeT7zJhFn RvecVza/KfVRfWZSyLoiVb9XFrGM6/p9WVUN7HgDqt28eu/5PxIgjboVlyeIhV0XxOBz hRiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913516; x=1709518316; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5wxMTYHoVZlE0hbizZ40QU8CUtM003T2riOC6sHTjiE=; b=M3LrGAcExJ0+JevxA8MuqVxlpD+IQN1SX79H1RoNR2OagiNVPK2DCOJ3D90WzVof0E PWIPyDWAOwCISb5bbh/2VNwfBtO61H5aBSuwjgpizMTzT97l3hMG9nDMUOSA17BbNU/D goa8/l/bkZ5K8iEn7Ea5jbbDvqnfACmqhOIYnDtOY/wlEeq7/GVI0PqD0c2AfC3MhSUU Ei5zi3Ruzz3PBHihOr2W25wwiqBngebfTkZs+XTMpg8zyocRZsTqKmJrFYj7x7pCC7Xs tzIsqt0aOhZ8ESU+EAVw22N2OP/MHQdrLWkXfjOaGcffG44BMcQZBTjSYFFt5ceXashg o53w== X-Forwarded-Encrypted: i=1; AJvYcCWs4fX1nx/QELjuSoY8oNWfa/zCSM2Y7eaCl0FpqG9ehyFmyf2iQuaRhXuTFOJUKxy2E6zi1QZgnP/HfFe4LnrP4ZsEzrFefSLoSmUaOQ== X-Gm-Message-State: AOJu0Yw3h3pEm1zdW5mF0iaGZ/o6O7EOBkhnMW2OpHLizkIo51ZH6FRo gUoDyjfF4ltkw/YwC6ZU4qP/8D8pVlibUD8UlmhbaQe6p4dEUIalai6r7vO71Q8= X-Google-Smtp-Source: AGHT+IHVjrpV3NCip1vU/8a7/ZU9hRd7lijXMFUhIRwf14hHIMTsfOJ1uT8gtzWmFBaOxrEShgUIIw== X-Received: by 2002:a05:6512:2246:b0:512:ab9e:3521 with SMTP id i6-20020a056512224600b00512ab9e3521mr3717376lfu.11.1708913516320; Sun, 25 Feb 2024 18:11:56 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:55 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:46 +0200 Subject: [PATCH RFC 10/12] drm/msm: import XML registers database Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-10-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=205136; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=hrqsxMredHHnQdY+8sAWGbDUjUGcu/PuHcMrzMaXSSg=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/NiWuc86nqoFsphXDcSf4u4vExHp8w7cvffB ZyYlFMVGtuJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYgAKCRCLPIo+Aiko 1dcoB/4pwrejBmifgzFhRYNtJopuHusNY8UgvMF+OvqWskQj75K5ksbOkUHPo38/rdg0wsauY6q wrD/hRerJbnGwW5bKI24CIvAzMSo50RZW3mRswFWvMOzQ7igAPWqAu0PsV0cmJla6mK0N0jBCjh vsXfm31oF3qZzaKj2X0e7EWEioXdLp67xMe+bI95e+KMSBXEAqz1C+WQglGSprQHG26j+94N9r7 yOFEsV0xxMdVAgXZfapcBaDS7/jVRreiiTrPgsEPExaEeggBd7Vz2qKn6nQRhhSrPcg/fF8SRFA lekcrNCoSFxNdeXfH3JacMmmT3zn1wdtYsxlnBTpr3vJ1GzB X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Import registers database from the Mesa, commit cb1b6649e12a ("freedreno/regs: define the wide bus enable bit in DSI_VID_CFG0"). The msm.xml and mdp*.xml files were adjusted to drop subdirectory paths. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/registers/xml/dsi.xml | 390 ++++++++ drivers/gpu/drm/msm/registers/xml/dsi_phy_10nm.xml | 102 ++ drivers/gpu/drm/msm/registers/xml/dsi_phy_14nm.xml | 135 +++ drivers/gpu/drm/msm/registers/xml/dsi_phy_20nm.xml | 100 ++ drivers/gpu/drm/msm/registers/xml/dsi_phy_28nm.xml | 180 ++++ .../drm/msm/registers/xml/dsi_phy_28nm_8960.xml | 134 +++ drivers/gpu/drm/msm/registers/xml/dsi_phy_7nm.xml | 230 +++++ drivers/gpu/drm/msm/registers/xml/edp.xml | 239 +++++ .../drm/msm/registers/xml/freedreno_copyright.xml | 40 + drivers/gpu/drm/msm/registers/xml/hdmi.xml | 1015 ++++++++++++++++++++ drivers/gpu/drm/msm/registers/xml/mdp4.xml | 480 +++++++++ drivers/gpu/drm/msm/registers/xml/mdp5.xml | 806 ++++++++++++++++ drivers/gpu/drm/msm/registers/xml/mdp_common.xml | 89 ++ drivers/gpu/drm/msm/registers/xml/mmss_cc.xml | 48 + drivers/gpu/drm/msm/registers/xml/msm.xml | 32 + drivers/gpu/drm/msm/registers/xml/rules-ng.xsd | 457 +++++++++ drivers/gpu/drm/msm/registers/xml/sfpb.xml | 17 + 17 files changed, 4494 insertions(+) diff --git a/drivers/gpu/drm/msm/registers/xml/dsi.xml b/drivers/gpu/drm/msm/registers/xml/dsi.xml new file mode 100644 index 000000000000..9fdca3b75678 --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/dsi.xml @@ -0,0 +1,390 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/dsi_phy_10nm.xml b/drivers/gpu/drm/msm/registers/xml/dsi_phy_10nm.xml new file mode 100644 index 000000000000..8e13848ea590 --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/dsi_phy_10nm.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/dsi_phy_14nm.xml b/drivers/gpu/drm/msm/registers/xml/dsi_phy_14nm.xml new file mode 100644 index 000000000000..4e43af7ccb7b --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/dsi_phy_14nm.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/dsi_phy_20nm.xml b/drivers/gpu/drm/msm/registers/xml/dsi_phy_20nm.xml new file mode 100644 index 000000000000..d7ab9628eace --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/dsi_phy_20nm.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/dsi_phy_28nm.xml b/drivers/gpu/drm/msm/registers/xml/dsi_phy_28nm.xml new file mode 100644 index 000000000000..f1202aaa2370 --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/dsi_phy_28nm.xml @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/dsi_phy_28nm_8960.xml b/drivers/gpu/drm/msm/registers/xml/dsi_phy_28nm_8960.xml new file mode 100644 index 000000000000..ca8db83deda5 --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/dsi_phy_28nm_8960.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/dsi_phy_7nm.xml b/drivers/gpu/drm/msm/registers/xml/dsi_phy_7nm.xml new file mode 100644 index 000000000000..0d0db283be14 --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/dsi_phy_7nm.xml @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/edp.xml b/drivers/gpu/drm/msm/registers/xml/edp.xml new file mode 100644 index 000000000000..00fc6112585e --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/edp.xml @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/freedreno_copyright.xml b/drivers/gpu/drm/msm/registers/xml/freedreno_copyright.xml new file mode 100644 index 000000000000..bb0a84a2e82c --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/freedreno_copyright.xml @@ -0,0 +1,40 @@ + + + + + + +Initial Author. + + + +many a3xx/a4xx contributions + + + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/hdmi.xml b/drivers/gpu/drm/msm/registers/xml/hdmi.xml new file mode 100644 index 000000000000..e553f4299be4 --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/hdmi.xml @@ -0,0 +1,1015 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/mdp4.xml b/drivers/gpu/drm/msm/registers/xml/mdp4.xml new file mode 100644 index 000000000000..865df2d937dd --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/mdp4.xml @@ -0,0 +1,480 @@ + + + + + + + + pipe names, index into PIPE[] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + appears to map pipe to mixer stage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8bit characters per pixel minus 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/mdp5.xml b/drivers/gpu/drm/msm/registers/xml/mdp5.xml new file mode 100644 index 000000000000..a030c064c4d9 --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/mdp5.xml @@ -0,0 +1,806 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8bit characters per pixel minus 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/mdp_common.xml b/drivers/gpu/drm/msm/registers/xml/mdp_common.xml new file mode 100644 index 000000000000..0b8ddaad9f0b --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/mdp_common.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bits per component (non-alpha channel) + + + + + + + + bits per component (alpha channel) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/mmss_cc.xml b/drivers/gpu/drm/msm/registers/xml/mmss_cc.xml new file mode 100644 index 000000000000..ccd4083fdf9c --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/mmss_cc.xml @@ -0,0 +1,48 @@ + + + + + + + Multimedia sub-system clock control.. appears to be used by DSI + for clocks.. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/msm.xml b/drivers/gpu/drm/msm/registers/xml/msm.xml new file mode 100644 index 000000000000..429c35b73bad --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/msm.xml @@ -0,0 +1,32 @@ + + + + + + Register definitions for the display related hw blocks on + msm/snapdragon + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/rules-ng.xsd b/drivers/gpu/drm/msm/registers/xml/rules-ng.xsd new file mode 100644 index 000000000000..414dee1d7468 --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/rules-ng.xsd @@ -0,0 +1,457 @@ + + + + + + An updated version of the old rules.xml file from the + RivaTV project. Specifications by Pekka Paalanen, + preliminary attempt by KoalaBR, + first working version by Jakob Bornecrantz. + For specifications, see the file rules-ng-format.txt + in Nouveau CVS module 'rules-ng'. + + Version 0.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + register database author + + + + + + + + + + + + nickType + + + + + + + + + databaseType + + + + + + + + + + importType + + + + + + + copyrightType + + + + + + + + + + + + + domainType + + + + + + + + + + + + + + + + + + groupType + + + + + + + + + + + + arrayType + + + + + + + + + + + + + + + + + + + + + stripeType + + + + + + + + + + + + + + + + + + + registerType used by reg8, reg16, reg32, reg64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + bitsetType + + + + + + + + + + + + + + + + bitfieldType + + + + + + + + + + + + + + + + + + + + + + enumType + + + + + + + + + + + + + + + + valueType + + + + + + + + + + + + + + refType + + + + + + + + + + + brief documentation, no markup + + + + + + + + + + + root element of documentation sub-tree + + + + + + + + + + + + + for bold, underline, italics + + + + + + + + + + + + + + + + + + + definition of a list, ordered or unordered + + + + + + + + + + + items of a list + + + + + + + + + + + + + + + + + + + + + + + + HexOrNumber + + + + + + + + + + + + + + + + + + Access + + + + + + + + + + + DomainWidth + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/gpu/drm/msm/registers/xml/sfpb.xml b/drivers/gpu/drm/msm/registers/xml/sfpb.xml new file mode 100644 index 000000000000..a08c82ff1699 --- /dev/null +++ b/drivers/gpu/drm/msm/registers/xml/sfpb.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + From patchwork Mon Feb 26 02:11:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776643 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D09BC12E7C for ; Mon, 26 Feb 2024 02:11:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913520; cv=none; b=DnSBT2M9h9hDWNM8xcE5n6YPYg/eTytCBgZBZPIn0yL078KvYrwNCHoxgnJdn0FNHnHMJrkGCqaHfgIZzsYnMQ/Pl0oUu7kzKIoF1kfvx5Ubq2RGhlICBUaTc0tdnMBtIXbHg4u4BgO4TTY40zWEvGOciHBXeL/PcJIhMAcZLqU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913520; c=relaxed/simple; bh=WJAciFwr1hQdTciXOJ66qPYz2JQPrCax+6yI1HNHRek=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JnwxhYDoyf1fMtb/zh77itsRH1BA1F3Wi1js3o8tcJxpQOeNTjvOqV/RczaWC1hnAeikMTFH2Ro1SaIBxtzHifq6gDCOlOXr1rBIRDGR45FkjdoNCvI3q5CJCakl5oXXjyPaNxGAHFe83tXVLiWHLH73sdGRk5hQJ9Xsar6GbY8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Kis8M3zy; arc=none smtp.client-ip=209.85.167.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Kis8M3zy" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-512b13bf764so3147281e87.0 for ; Sun, 25 Feb 2024 18:11:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913517; x=1709518317; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=JHkrFptKcAQS2aCzc8WX8fmPvNb0p9xnGPcIrFGOzfk=; b=Kis8M3zyhz8QoGWTKqF25GAfo8ZzqCXM9hGsad8JYWXDfyyG5CtDKqXJO5aI04Any0 M+f1ZlSXW/b8tWgJK+QNGzc0QwMeUum2cvTBhBTT0kTXsEx+zNh3Em8SyV5fihNNPtdC LcAbLaMTJOVxpMYutkzMx3GzX8mYwEbFEdM4JGBaaWh61XL0TUEhC6Py/ZyEk1oqQIzV piP+aqwFTgap/v/1IEh6dky2mKy6uYYToQuorsZ0wWiaBsMvbMlyHpm+uY6GNTrVwxEh I6d/IJWzEOX3leHR5RKYqPerL5eJ3HWhTsHrj9PJtXQ9K/CnzGyp31glfyaSH0MqOWS/ n20g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913517; x=1709518317; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JHkrFptKcAQS2aCzc8WX8fmPvNb0p9xnGPcIrFGOzfk=; b=E9a75j5o2KJCVQoowLXXIpaoDa34oFE6oj8CIfdi/wg/341p2cVBuNLI11V985agAa yDTMqweWFCCPW9kPuYpWuPDmlnVYrzSFKWlFlX/2XroT1yRqO0yASZ6js8YnJI2zQejJ eXMqSXJH0iMrMSwuhAEO/IW5v45hlfR+HJXaQ2B9PxqsTIpy322Zk+NW+lyI7/YOHsq2 X3LNrLepdLetr5+WnBPiNv/QvPH5eZNMLf48s5LgTYhUtEtSRAcgeCpWpptn0jmr9tdD rG/FYO8bU8OPmNyDMFhkYr2cokKR/nE+2LxIe+EsCLYNpS6tZbE8W3GWXn/uascKlLXb YdWA== X-Forwarded-Encrypted: i=1; AJvYcCUAdHEf95z1Xb4cxngbPfPHdQYD9GCU+DWQqF5c/sAZd0L3+kCGszCrPxdvrQsnaGhmimI+TA3+zWxfN76fehFXneVp/fQ7zpLYkAStBg== X-Gm-Message-State: AOJu0YykfOvcklhzAryCEoyN6z0uWfoY/VxF887H2Gvx50Tl9VFzOb50 GgZl8g+jd56FgvdlGRGiTsqXZssg1zvOXe5ChwDnYN+gnqJZclSS4n2zbMMbmwjUiah5xhpK8Vm M X-Google-Smtp-Source: AGHT+IH52ochobAvFKf+WD9za0SwYxt9EWXFefY7/8dMoH9mYPqXj6QRJWC6EpE/aWO39BrHfbLQGg== X-Received: by 2002:ac2:5dca:0:b0:512:ade9:ab55 with SMTP id x10-20020ac25dca000000b00512ade9ab55mr3320058lfq.20.1708913517088; Sun, 25 Feb 2024 18:11:57 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:56 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:47 +0200 Subject: [PATCH RFC 11/12] drm/msm: tie regeneration of shipped headers Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-11-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1833; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=WJAciFwr1hQdTciXOJ66qPYz2JQPrCax+6yI1HNHRek=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/NiSW1p5kKdo+GZ4dM4rtQKoNKgQiCmFpqNg MQvEgRqyfmJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYgAKCRCLPIo+Aiko 1U/HB/9d+h5AEgdqMUN84B6Qw/zOhfMOAfqt+n4aDbrXbDTtSADPY/JTWpB/cLH0SLGWTDosz2U aXdAn3/oE9u82nq43lgVZrPEUf3vVcxbNiLvCQIQpsBC0/otnVfunZD9L6C+Z9WrcCHTeKf42wp U33HDrRau3WjnEDJSs5mwYCyOm+H3pUzr5uUfjf8OQ2hrThEZ2dr6+QVYpRNnV8uEEZ4w9BWETW pfBuRQkqK7BPfkTDnQEQMQBPhZwmVcJPpE/mMpH8WXwIO1uAxYkLQIkaVX+pK5AzJ4o13OufhMI OB12UGhi5Bd3/tosxExuNMCPIqWCFgEOdKeYn/UDtkTdpqo+ X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Finally add support for regeneration of the shipped autogenerated register headers. Pass DRM_MSM_GENERATE_HEADERS=1 to make to force regeneration. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/msm/registers/.gitignore | 5 +++++ 2 files changed, 32 insertions(+) diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile index 89c9f5f93b85..a19ad02bd701 100644 --- a/drivers/gpu/drm/msm/Makefile +++ b/drivers/gpu/drm/msm/Makefile @@ -180,3 +180,30 @@ msm-$(CONFIG_DRM_MSM_DSI) += $(msm-dsi) $(msm-dsi-y) $(addprefix $(obj)/,$(msm-dsi) $(msm-dsi-y)): $(obj)/registers/dsi.xml.h obj-$(CONFIG_DRM_MSM) += msm.o + +ifdef DRM_MSM_GENERATE_HEADERS + +hostprogs += hg2 + +hg2-objs = \ + headergen2/colors.o \ + headergen2/path.o \ + headergen2/rnn.o \ + headergen2/rnndec.o \ + headergen2/headergen2.o + +HOST_EXTRACFLAGS += -D_GNU_SOURCE $(shell pkg-config --cflags libxml-2.0) -DRNN_DEF_PATH='"$(srctree)/$(src)/registers/xml"' +HOSTLDLIBS_hg2 = $(shell pkg-config --libs libxml-2.0) + +HEADERGEN = $(objtree)/$(obj)/hg2 + +quiet_cmd_headergen = HG2 $@ + cmd_headergen = $(HEADERGEN) $(shell basename $<) $(srctree)/$(src)/registers/ + +$(src)/registers/%.xml.h_shipped: msm.xml.h + $(Q): + +msm.xml.h: $(src)/registers/xml/msm.xml $(HEADERGEN) FORCE + $(call cmd,headergen) + +endif diff --git a/drivers/gpu/drm/msm/registers/.gitignore b/drivers/gpu/drm/msm/registers/.gitignore new file mode 100644 index 000000000000..2e422e71e590 --- /dev/null +++ b/drivers/gpu/drm/msm/registers/.gitignore @@ -0,0 +1,5 @@ +# ignore empty files +msm.xml.h_shipped +freedreno_copyright.xml.h_shipped +# unused files +edp.xml.h_shipped From patchwork Mon Feb 26 02:11:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 776000 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 627781427E for ; Mon, 26 Feb 2024 02:12:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913524; cv=none; b=WdrTtRyWCLAfDq0zGDFDFoubGGN1Rx7jGHLzwkfZHMmYyb1zUYcjqTu2xc060zicoZebaIaECtkvq+t5IK6OYNG3XY/ykisR+uA+c3gVCfyok1yUlduOCQYdqMEjNedcb1e7r/0ITLfpIMb0uYQ+K+4Iqru9gyRaJ3kfPWvS638= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913524; c=relaxed/simple; bh=iXYEC/Hu6Y70avkJJ58r9RdgX7w7yDEljwl8/py31iU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZuMA8pd4CjKhVo+VbVOeHBj+1VtKHlVLpLhUcDfY9dG3tqoA+15oe2CDyNOLaXLmadKfkKE2yphxGWw7nJ/aq0vBgC8yquyFwripUkkkF/ngz5xR1GpMjlL5ms/W1grOs8dkeq+eTSwgdwo7cCgdUCw0HrKbsrnc/HcXj3tUkBk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=qEt2U7/i; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qEt2U7/i" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-512ab55fde6so3114534e87.2 for ; Sun, 25 Feb 2024 18:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708913518; x=1709518318; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=8BQy2O07iLsz6YZD2mgMW04keWh7UGAAqvrOVUTq8dQ=; b=qEt2U7/iujpCbG7CTbJX0Nlpn4wfJYETSSaRetO6oES18FSoDa8GNRRly36ayeiNdT cDyhjCQ5sLREjMV3iT7krbvfhwm6guacSknrhAtOkMj086gY2oWI5TisETWrDD5Ne/bA 3wSlDyNnsUIHzgXbHhNl/c1wH8B7dmVCA1xoNRpBUivAmkP6SqW8ibSWPzTHCwc4EOKd 2sP3x1ANjDMiOvJcz5LYYnvG9YCSMzTH4v57RYpF/ewBd7f5zwIIokH615zhi0FwpDiW hSuAoCzqffIdP95Pd1xhd/lft0vagt/VuHtNGBxkH25SHI7huQtMrWriUQFWFTg3xZxj V2KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708913518; x=1709518318; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8BQy2O07iLsz6YZD2mgMW04keWh7UGAAqvrOVUTq8dQ=; b=w8dyzEGQ0ZN3lk5cdiXAr+V9MIxKVeGdseIHGP335y1Qfe8YPYoyJ+aroO/fO9ShLi GaFON3/VJO4qJGrQ4BROdTtc/No0N9F4/ge8MtkNLSfn+mN2HBGZGhj7a4nC7JObzYEJ nQQLGqYVXY2gFXf9vdEp0A1Pu7M3PCKomqSqyjSsuJ8lPoIS4H2ZuutMsdtkbehBnPCg deO/TSJcz+NAQuCZD08pcPcc+t9mntOKTF3147VQI7wCogzvLYxMnupPkhpWoXsveOkK okrxGsCOKLuaLa8neI/FJRHkZQkK9QWn4SgF879aHwj3fYgzAl9NbRdyyBEPayMaIHrq vNaQ== X-Forwarded-Encrypted: i=1; AJvYcCUBBHKTSmkeIe1sc2lxoPCcmIZnNHWtKR2OQGayvfgsCC0MWoSpBwae4fhE20p6XBljOJ9F04l0Ik07UOp/GnC4VVewSXKr8BN1X4fnXA== X-Gm-Message-State: AOJu0YyNzFQUWQxyRUEsQn5Q0MDioS6Nt2IeI1ILxPlj8yL7x7psW7sR nG5DdA6SboO2BTyTP0HfGFiCy8iZk9nhqeUsHL0CW5V2s9u+zpvTGiV1l8ce1xQ= X-Google-Smtp-Source: AGHT+IFawCODV1VCo7L3g3kioC9sZjOP6VRMdcF82Hh6gpNDYc7414/pT2EB4GCKsNR83qdVOVTKPA== X-Received: by 2002:a19:f710:0:b0:512:bd51:a0ea with SMTP id z16-20020a19f710000000b00512bd51a0eamr3244161lfe.9.1708913518339; Sun, 25 Feb 2024 18:11:58 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id m11-20020a056512358b00b00512e39ce472sm676176lfr.175.2024.02.25.18.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:11:57 -0800 (PST) From: Dmitry Baryshkov Date: Mon, 26 Feb 2024 04:11:48 +0200 Subject: [PATCH RFC 12/12] drm/msm: sync shipped headers database Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fd-xml-shipped-v1-12-86bb6c3346d2@linaro.org> References: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> In-Reply-To: <20240226-fd-xml-shipped-v1-0-86bb6c3346d2@linaro.org> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=53863; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=iXYEC/Hu6Y70avkJJ58r9RdgX7w7yDEljwl8/py31iU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl2/NixABQWRMHA8JtweG4OeWyRCJU2wpqtR/DL YWTcoAqntWJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdvzYgAKCRCLPIo+Aiko 1WZhB/kBSw6NMypVQA68SysBsrOKUmgADxdGXXApTRJiWOAzhA2HQXC1dHXJjITSRq+qNWgPqq6 4Z/rXxV8mwLlOGGeUE79yTJxyYcxi/5Sj5g3kE/SjjXWn3rZ5rFW7SWugRVAk/8YGYjD0Lr6gbS RsLE/htkqf3x8O3mjRaRRKm+9HqDrOLGoDcE4lMiHYj77g+NOVQoB3tQO1v0Q0HKtnSe3r5NDec eaXg6nAFPHVygkKwOJIvnlFJNHpvYSKXp/qBelj+3ip2/sJtbYdYRadnNI4XVbkyPBsOrdx9YVg R5QoQdKz/igEwHGHKvGFRuhJVQVv9kC6o650c/jWPClIdwq5 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/registers/dsi.xml.h_shipped | 38 ++++--- .../drm/msm/registers/dsi_phy_10nm.xml.h_shipped | 37 ++++--- .../drm/msm/registers/dsi_phy_14nm.xml.h_shipped | 37 ++++--- .../drm/msm/registers/dsi_phy_20nm.xml.h_shipped | 37 ++++--- .../drm/msm/registers/dsi_phy_28nm.xml.h_shipped | 37 ++++--- .../msm/registers/dsi_phy_28nm_8960.xml.h_shipped | 37 ++++--- .../drm/msm/registers/dsi_phy_7nm.xml.h_shipped | 37 ++++--- drivers/gpu/drm/msm/registers/hdmi.xml.h_shipped | 111 +++++++++++++++++---- drivers/gpu/drm/msm/registers/mdp4.xml.h_shipped | 37 ++++--- drivers/gpu/drm/msm/registers/mdp5.xml.h_shipped | 39 ++++---- .../gpu/drm/msm/registers/mdp_common.xml.h_shipped | 45 +++++---- drivers/gpu/drm/msm/registers/sfpb.xml.h_shipped | 35 +++---- 12 files changed, 284 insertions(+), 243 deletions(-) diff --git a/drivers/gpu/drm/msm/registers/dsi.xml.h_shipped b/drivers/gpu/drm/msm/registers/dsi.xml.h_shipped index 2a7d980e12c3..d02fefe0d7ad 100644 --- a/drivers/gpu/drm/msm/registers/dsi.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/dsi.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) + +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin) @@ -231,6 +228,7 @@ static inline uint32_t DSI_VID_CFG0_TRAFFIC_MODE(enum dsi_traffic_mode val) #define DSI_VID_CFG0_HSA_POWER_STOP 0x00010000 #define DSI_VID_CFG0_HBP_POWER_STOP 0x00100000 #define DSI_VID_CFG0_HFP_POWER_STOP 0x01000000 +#define DSI_VID_CFG0_DATABUS_WIDEN 0x02000000 #define DSI_VID_CFG0_PULSE_MODE_HSA_HE 0x10000000 #define REG_DSI_VID_CFG1 0x0000001c diff --git a/drivers/gpu/drm/msm/registers/dsi_phy_10nm.xml.h_shipped b/drivers/gpu/drm/msm/registers/dsi_phy_10nm.xml.h_shipped index a2ae8777e59e..9f44c08ea817 100644 --- a/drivers/gpu/drm/msm/registers/dsi_phy_10nm.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/dsi_phy_10nm.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) + +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin) diff --git a/drivers/gpu/drm/msm/registers/dsi_phy_14nm.xml.h_shipped b/drivers/gpu/drm/msm/registers/dsi_phy_14nm.xml.h_shipped index 24e2fdc0cde1..815358cba482 100644 --- a/drivers/gpu/drm/msm/registers/dsi_phy_14nm.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/dsi_phy_14nm.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) + +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin) diff --git a/drivers/gpu/drm/msm/registers/dsi_phy_20nm.xml.h_shipped b/drivers/gpu/drm/msm/registers/dsi_phy_20nm.xml.h_shipped index 6352541f37e9..40e69010a326 100644 --- a/drivers/gpu/drm/msm/registers/dsi_phy_20nm.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/dsi_phy_20nm.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) + +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin) diff --git a/drivers/gpu/drm/msm/registers/dsi_phy_28nm.xml.h_shipped b/drivers/gpu/drm/msm/registers/dsi_phy_28nm.xml.h_shipped index 178bd4fd7893..2094565ccea9 100644 --- a/drivers/gpu/drm/msm/registers/dsi_phy_28nm.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/dsi_phy_28nm.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) + +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin) diff --git a/drivers/gpu/drm/msm/registers/dsi_phy_28nm_8960.xml.h_shipped b/drivers/gpu/drm/msm/registers/dsi_phy_28nm_8960.xml.h_shipped index 5f900bb53519..88840ef51547 100644 --- a/drivers/gpu/drm/msm/registers/dsi_phy_28nm_8960.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/dsi_phy_28nm_8960.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) + +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin) diff --git a/drivers/gpu/drm/msm/registers/dsi_phy_7nm.xml.h_shipped b/drivers/gpu/drm/msm/registers/dsi_phy_7nm.xml.h_shipped index 584cbd0205ef..c1de09a23842 100644 --- a/drivers/gpu/drm/msm/registers/dsi_phy_7nm.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/dsi_phy_7nm.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) + +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin) diff --git a/drivers/gpu/drm/msm/registers/hdmi.xml.h_shipped b/drivers/gpu/drm/msm/registers/hdmi.xml.h_shipped index 973b460486a5..e69962a522a3 100644 --- a/drivers/gpu/drm/msm/registers/hdmi.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/hdmi.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) + +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin) @@ -76,6 +73,13 @@ enum hdmi_acr_cts { ACR_48 = 3, }; +enum hdmi_cec_tx_status { + CEC_TX_OK = 0, + CEC_TX_NACK = 1, + CEC_TX_ARB_LOSS = 2, + CEC_TX_MAX_RETRIES = 3, +}; + #define REG_HDMI_CTRL 0x00000000 #define HDMI_CTRL_ENABLE 0x00000001 #define HDMI_CTRL_HDMI 0x00000002 @@ -476,22 +480,87 @@ static inline uint32_t HDMI_DDC_REF_REFTIMER(uint32_t val) #define REG_HDMI_HDCP_SW_LOWER_AKSV 0x00000288 #define REG_HDMI_CEC_CTRL 0x0000028c +#define HDMI_CEC_CTRL_ENABLE 0x00000001 +#define HDMI_CEC_CTRL_SEND_TRIGGER 0x00000002 +#define HDMI_CEC_CTRL_FRAME_SIZE__MASK 0x000001f0 +#define HDMI_CEC_CTRL_FRAME_SIZE__SHIFT 4 +static inline uint32_t HDMI_CEC_CTRL_FRAME_SIZE(uint32_t val) +{ + return ((val) << HDMI_CEC_CTRL_FRAME_SIZE__SHIFT) & HDMI_CEC_CTRL_FRAME_SIZE__MASK; +} +#define HDMI_CEC_CTRL_LINE_OE 0x00000200 #define REG_HDMI_CEC_WR_DATA 0x00000290 +#define HDMI_CEC_WR_DATA_BROADCAST 0x00000001 +#define HDMI_CEC_WR_DATA_DATA__MASK 0x0000ff00 +#define HDMI_CEC_WR_DATA_DATA__SHIFT 8 +static inline uint32_t HDMI_CEC_WR_DATA_DATA(uint32_t val) +{ + return ((val) << HDMI_CEC_WR_DATA_DATA__SHIFT) & HDMI_CEC_WR_DATA_DATA__MASK; +} -#define REG_HDMI_CEC_CEC_RETRANSMIT 0x00000294 +#define REG_HDMI_CEC_RETRANSMIT 0x00000294 +#define HDMI_CEC_RETRANSMIT_ENABLE 0x00000001 +#define HDMI_CEC_RETRANSMIT_COUNT__MASK 0x000000fe +#define HDMI_CEC_RETRANSMIT_COUNT__SHIFT 1 +static inline uint32_t HDMI_CEC_RETRANSMIT_COUNT(uint32_t val) +{ + return ((val) << HDMI_CEC_RETRANSMIT_COUNT__SHIFT) & HDMI_CEC_RETRANSMIT_COUNT__MASK; +} #define REG_HDMI_CEC_STATUS 0x00000298 +#define HDMI_CEC_STATUS_BUSY 0x00000001 +#define HDMI_CEC_STATUS_TX_FRAME_DONE 0x00000008 +#define HDMI_CEC_STATUS_TX_STATUS__MASK 0x000000f0 +#define HDMI_CEC_STATUS_TX_STATUS__SHIFT 4 +static inline uint32_t HDMI_CEC_STATUS_TX_STATUS(enum hdmi_cec_tx_status val) +{ + return ((val) << HDMI_CEC_STATUS_TX_STATUS__SHIFT) & HDMI_CEC_STATUS_TX_STATUS__MASK; +} #define REG_HDMI_CEC_INT 0x0000029c +#define HDMI_CEC_INT_TX_DONE 0x00000001 +#define HDMI_CEC_INT_TX_DONE_MASK 0x00000002 +#define HDMI_CEC_INT_TX_ERROR 0x00000004 +#define HDMI_CEC_INT_TX_ERROR_MASK 0x00000008 +#define HDMI_CEC_INT_MONITOR 0x00000010 +#define HDMI_CEC_INT_MONITOR_MASK 0x00000020 +#define HDMI_CEC_INT_RX_DONE 0x00000040 +#define HDMI_CEC_INT_RX_DONE_MASK 0x00000080 #define REG_HDMI_CEC_ADDR 0x000002a0 #define REG_HDMI_CEC_TIME 0x000002a4 +#define HDMI_CEC_TIME_ENABLE 0x00000001 +#define HDMI_CEC_TIME_SIGNAL_FREE_TIME__MASK 0x0000ff80 +#define HDMI_CEC_TIME_SIGNAL_FREE_TIME__SHIFT 7 +static inline uint32_t HDMI_CEC_TIME_SIGNAL_FREE_TIME(uint32_t val) +{ + return ((val) << HDMI_CEC_TIME_SIGNAL_FREE_TIME__SHIFT) & HDMI_CEC_TIME_SIGNAL_FREE_TIME__MASK; +} #define REG_HDMI_CEC_REFTIMER 0x000002a8 +#define HDMI_CEC_REFTIMER_REFTIMER__MASK 0x0000ffff +#define HDMI_CEC_REFTIMER_REFTIMER__SHIFT 0 +static inline uint32_t HDMI_CEC_REFTIMER_REFTIMER(uint32_t val) +{ + return ((val) << HDMI_CEC_REFTIMER_REFTIMER__SHIFT) & HDMI_CEC_REFTIMER_REFTIMER__MASK; +} +#define HDMI_CEC_REFTIMER_ENABLE 0x00010000 #define REG_HDMI_CEC_RD_DATA 0x000002ac +#define HDMI_CEC_RD_DATA_DATA__MASK 0x000000ff +#define HDMI_CEC_RD_DATA_DATA__SHIFT 0 +static inline uint32_t HDMI_CEC_RD_DATA_DATA(uint32_t val) +{ + return ((val) << HDMI_CEC_RD_DATA_DATA__SHIFT) & HDMI_CEC_RD_DATA_DATA__MASK; +} +#define HDMI_CEC_RD_DATA_SIZE__MASK 0x00001f00 +#define HDMI_CEC_RD_DATA_SIZE__SHIFT 8 +static inline uint32_t HDMI_CEC_RD_DATA_SIZE(uint32_t val) +{ + return ((val) << HDMI_CEC_RD_DATA_SIZE__SHIFT) & HDMI_CEC_RD_DATA_SIZE__MASK; +} #define REG_HDMI_CEC_RD_FILTER 0x000002b0 diff --git a/drivers/gpu/drm/msm/registers/mdp4.xml.h_shipped b/drivers/gpu/drm/msm/registers/mdp4.xml.h_shipped index cc8fde450884..3b00b63e1d5a 100644 --- a/drivers/gpu/drm/msm/registers/mdp4.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/mdp4.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) + +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin) diff --git a/drivers/gpu/drm/msm/registers/mdp5.xml.h_shipped b/drivers/gpu/drm/msm/registers/mdp5.xml.h_shipped index 270e11c904bd..ef5b63962e6a 100644 --- a/drivers/gpu/drm/msm/registers/mdp5.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/mdp5.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) + +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin) @@ -1402,13 +1399,11 @@ static inline uint32_t REG_MDP5_PP_FBC_LOSSY_MODE(uint32_t i0) { return 0x000000 static inline uint32_t __offset_WB(uint32_t idx) { switch (idx) { -#if 0 /* TEMPORARY until patch that adds wb.base[] is merged */ case 0: return (mdp5_cfg->wb.base[0]); case 1: return (mdp5_cfg->wb.base[1]); case 2: return (mdp5_cfg->wb.base[2]); case 3: return (mdp5_cfg->wb.base[3]); case 4: return (mdp5_cfg->wb.base[4]); -#endif default: return INVALID_IDX(idx); } } diff --git a/drivers/gpu/drm/msm/registers/mdp_common.xml.h_shipped b/drivers/gpu/drm/msm/registers/mdp_common.xml.h_shipped index 4dd8d7db2862..4540d88bf219 100644 --- a/drivers/gpu/drm/msm/registers/mdp_common.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/mdp_common.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) - -Copyright (C) 2013-2022 by the following authors: +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) + +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin) @@ -94,7 +91,7 @@ enum mdp_component_type { }; enum mdp_bpc { - BPC1 = 0, + BPC4 = 0, BPC5 = 1, BPC6 = 2, BPC8 = 3, @@ -107,5 +104,11 @@ enum mdp_bpc_alpha { BPC8A = 3, }; +enum mdp_fetch_mode { + MDP_FETCH_LINEAR = 0, + MDP_FETCH_TILE = 1, + MDP_FETCH_UBWC = 2, +}; + #endif /* MDP_COMMON_XML */ diff --git a/drivers/gpu/drm/msm/registers/sfpb.xml.h_shipped b/drivers/gpu/drm/msm/registers/sfpb.xml.h_shipped index 344a1a1620cd..0dd784b276c5 100644 --- a/drivers/gpu/drm/msm/registers/sfpb.xml.h_shipped +++ b/drivers/gpu/drm/msm/registers/sfpb.xml.h_shipped @@ -8,26 +8,23 @@ http://github.com/freedreno/envytools/ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: -- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56) -- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42) +- msm.xml ( 802 bytes, from 2024-02-26 02:06:53) +- freedreno_copyright.xml ( 1572 bytes, from 2024-02-26 02:05:48) +- mdp4.xml ( 20908 bytes, from 2024-02-26 02:05:48) +- mdp_common.xml ( 3056 bytes, from 2024-02-26 02:05:48) +- mdp5.xml ( 37457 bytes, from 2024-02-26 02:05:48) +- dsi.xml ( 18864 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm_8960.xml ( 4935 bytes, from 2024-02-26 02:05:48) +- dsi_phy_28nm.xml ( 7004 bytes, from 2024-02-26 02:05:48) +- dsi_phy_20nm.xml ( 3712 bytes, from 2024-02-26 02:05:48) +- dsi_phy_14nm.xml ( 5381 bytes, from 2024-02-26 02:05:48) +- dsi_phy_10nm.xml ( 4499 bytes, from 2024-02-26 02:05:48) +- dsi_phy_7nm.xml ( 11007 bytes, from 2024-02-26 02:05:48) +- sfpb.xml ( 602 bytes, from 2024-02-26 02:05:48) +- hdmi.xml ( 44030 bytes, from 2024-02-26 02:05:48) +- edp.xml ( 10416 bytes, from 2024-02-26 02:05:48) -Copyright (C) 2013-2022 by the following authors: +Copyright (C) 2013-2024 by the following authors: - Rob Clark (robclark) - Ilia Mirkin (imirkin)