Skip to content

Conversation

@dbogdan
Copy link
Contributor

@dbogdan dbogdan commented Aug 10, 2018

This should be merged when the corresponding HDL changes will be also merged:
analogdevicesinc/hdl#106

dbogdan added 3 commits July 19, 2018 18:18
Since device_prep_interleaved_dma() is already implemented, the
DMA_INTERLEAVE capability should be set.

Signed-off-by: Dragos Bogdan <[email protected]>
The HDL graphics core can be interfaced with any VDMA (e.g., Analog
Devices AXI-DMAC DMA controller), not only with the Xilinx one.

Signed-off-by: Dragos Bogdan <[email protected]>
The Video DMA must support cyclic transfers. To make sure that the
transfer will be an interleaved cyclic one, pass the CYCLIC flag to
the DMA driver, so it can enable this option.

Signed-off-by: Dragos Bogdan <[email protected]>
desc->sg[0].y_len = 1;
}

if (chan->hw_cyclic && (flags & DMA_CYCLIC))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the chan->hw_cyclic. If the DMA does not support hardware cyclic mode it should fallback to software cyclic rather than ignoring the flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this.

adi,source-bus-type = <0>;
adi,destination-bus-width = <64>;
adi,destination-bus-type = <1>;
adi,length-width = <24>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the length-width property has been made optional and is no longer required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I knew this. :) Sorry.

An example when this mode can be enabled is where the controller
is used as a Video DMA.

Signed-off-by: Dragos Bogdan <[email protected]>
An example when these two bits should be enabled simultaneously is
where the controller is used as a Video DMA and the TLAST signal acts
as an "end of frame" signal.

Signed-off-by: Dragos Bogdan <[email protected]>
This change is required according to the HDL reference design's updates.

Signed-off-by: Dragos Bogdan <[email protected]>
Copy link

@lclausen-adi lclausen-adi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

vdma_config.park = 1;
vdma_config.coalesc = 0xff;
xilinx_vdma_channel_set_config(axi_hdmi_crtc->dma, &vdma_config);
if (!strncmp(axi_hdmi_crtc->dma->device->dev->driver->name, "xilinx-vdma", 11)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: the reference expansion here is a bit long; but I don't know of a better solution atm;

xlnx,datawidth = <0x40>;
xlnx,genlock-mode = <0x0>;
xlnx,include-dre = <0x0>;
interrupts = <0 59 0>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curios: the interrupt types have changed; is this is intended ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be 4. The ADI DMA interrupt is level-high triggered. But I think the IRQ controller pretty much ignores this anyway so we haven't really been paying attention to this in the past.

If you want a project for a slow afternoon go through all the existing devicetrees and fix the interrupt levels.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.
Maybe we'll mark this in an issue tracker and see when we do this.

@commodo
Copy link
Contributor

commodo commented Aug 20, 2018

Otherwise looks good

Copy link
Contributor

@commodo commodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Will merge this later today if no objections

@commodo commodo merged commit 8277a94 into master Aug 20, 2018
@commodo commodo deleted the dev_adi_vdma branch August 20, 2018 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants