LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Steven Price <steven.price@arm.com>
To: Rob Herring <robh@kernel.org>, dri-devel@lists.freedesktop.org
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	linux-kernel@vger.kernel.org, David Airlie <airlied@linux.ie>,
	"Marty E . Plummer" <hanetzer@startmail.com>,
	Sean Paul <sean@poorly.run>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>
Subject: Re: [PATCH v3 3/3] drm/panfrost: Add initial panfrost driver
Date: Thu, 11 Apr 2019 15:12:18 +0100
Message-ID: <91804969-e3cc-9d39-3ca7-0b59bafd442b@arm.com> (raw)
In-Reply-To: <20190409205427.6943-4-robh@kernel.org>

On 09/04/2019 21:54, Rob Herring wrote:
> This adds the initial driver for panfrost which supports Arm Mali
> Midgard and Bifrost family of GPUs. Currently, only the T860 and
> T760 Midgard GPUs have been tested.
> 
> v2:
> - Add GPU reset on job hangs (Tomeu)
> - Add RuntimePM and devfreq support (Tomeu)
> - Fix T760 support (Tomeu)
> - Add a TODO file (Rob, Tomeu)
> - Support multiple in fences (Tomeu)
> - Drop support for shared fences (Tomeu)
> - Fill in MMU de-init (Rob)
> - Move register definitions back to single header (Rob)
> - Clean-up hardcoded job submit todos (Rob)
> - Implement feature setup based on features/issues (Rob)
> - Add remaining Midgard DT compatible strings (Rob)
> 
> v3:
> - Add support for reset lines (Neil)
> - Add a MAINTAINERS entry (Rob)
> - Call dma_set_mask_and_coherent (Rob)
> - Do MMU invalidate on map and unmap. Restructure to do a single
>   operation per map/unmap call. (Rob)
> - Add a missing explicit padding to struct drm_panfrost_create_bo (Rob)
> - Fix 0-day error: "panfrost_devfreq.c:151:9-16: ERROR: PTR_ERR applied after initialization to constant on line 150"
> - Drop HW_FEATURE_AARCH64_MMU conditional (Rob)
> - s/DRM_PANFROST_PARAM_GPU_ID/DRM_PANFROST_PARAM_GPU_PROD_ID/ (Rob)
> - Check drm_gem_shmem_prime_import_sg_table() error code (Rob)
> - Re-order power on sequence (Rob)
> - Move panfrost_acquire_object_fences() before scheduling job (Rob)
> - Add NULL checks on array pointers in job clean-up (Rob)
> - Rework devfreq (Tomeu)
> - Fix devfreq init with no regulator (Rob)
> - Various WS and comments clean-up (Rob)
> 
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Lyude Paul <lyude@redhat.com>
> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
> Reviewed-by: Eric Anholt <eric@anholt.net>
> Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---

This looks like it has addressed my comments, so:

Reviewed-by: Steven Price <steven.price@arm.com>


There's a couple of nits below if you do respin, but these shouldn't
block merging the driver.

[...]
> +static int panfrost_ioctl_submit(struct drm_device *dev, void *data,
> +		struct drm_file *file)
> +{
> +	struct panfrost_device *pfdev = dev->dev_private;
> +	struct drm_panfrost_submit *args = data;
> +	struct drm_syncobj *sync_out;
> +	struct panfrost_job *job;
> +	int ret = 0;
> +
> +	job = kcalloc(1, sizeof(*job), GFP_KERNEL);

Why not simply kzalloc()? I think you're going to want a new ioctl
if/when adding support for multiple job submissions in one ioctl.

[...]

> +static int panfrost_probe(struct platform_device *pdev)
> +{
> +	struct panfrost_device *pfdev;
> +	struct drm_device *ddev;
> +	int err;
> +
> +	pfdev = devm_kzalloc(&pdev->dev, sizeof(*pfdev), GFP_KERNEL);
> +	if (!pfdev)
> +		return -ENOMEM;
> +
> +	pfdev->pdev = pdev;
> +	pfdev->dev = &pdev->dev;
> +
> +	platform_set_drvdata(pdev, pfdev);
> +	dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40));

The hardware reports the correct mask, from kbase:

> 	err = dma_set_mask(kbdev->dev,
> 			DMA_BIT_MASK(kbdev->gpu_props.mmu.pa_bits));
> 	if (err)
> 		goto dma_set_mask_failed;
> 
> 	err = dma_set_coherent_mask(kbdev->dev,
> 			DMA_BIT_MASK(kbdev->gpu_props.mmu.pa_bits));
> 	if (err)
> 		goto dma_set_mask_failed;

Although I'm not sure if it has ever varied.

Thanks,

Steve

      parent reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 20:54 [PATCH v3 0/3] Initial Panfrost driver Rob Herring
2019-04-09 20:54 ` [PATCH v3 1/3] iommu: io-pgtable: Add ARM Mali midgard MMU page table format Rob Herring
2019-04-09 20:54 ` [PATCH v3 2/3] drm: Add a drm_gem_objects_lookup helper Rob Herring
2019-04-12 14:52   ` Tomeu Vizoso
2019-04-09 20:54 ` [PATCH v3 3/3] drm/panfrost: Add initial panfrost driver Rob Herring
2019-04-09 21:25   ` Eric Anholt
2019-04-09 21:27     ` Eric Anholt
2019-04-11 14:12   ` Steven Price [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91804969-e3cc-9d39-3ca7-0b59bafd442b@arm.com \
    --to=steven.price@arm.com \
    --cc=airlied@linux.ie \
    --cc=alyssa@rosenzweig.io \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hanetzer@startmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=narmstrong@baylibre.com \
    --cc=robh@kernel.org \
    --cc=sean@poorly.run \
    --cc=tomeu.vizoso@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git