I just skimmed the code of libdrm while I'm trying to understand the host1x driver. So below is what I found.
Mark On 12/13/2012 10:01 PM, Arto Meriläinen wrote:
From: Francis Hart fhart@nvidia.com
This patch introduces a simple 2d library on top of stream library.
Signed-off-by: Francis Hart fhart@nvidia.com
[...]
+void +g2fill_dispatch(const struct tegra_2d_g2fill *hw,
struct tegra_stream *stream)
+{
- ASSERT(hw);
- ASSERT(hw->is_valid);
- ASSERT(stream);
- tegra_stream_push_setclass(stream, NV_GRAPHICS_2D_CLASS_ID);
I think at the end of the "tegra_stream_begin", we already pushed a setclass opcode into the stream's active buffer. So why we need another one here?
- tegra_stream_push_words(stream,
&hw->block,
sizeof(hw->block) / sizeof(uint32_t),
1,
tegra_reloc(&hw->block.dstba,
hw->dst_handle,
hw->dst_offset));
+}
[...]
+#endif // TEGRA_2D_H