IPUv3 prep for i.MX5/6 v4l2 staging drivers, v7
Subsystems (4)
v7 cover IPUv3 prep for i.MX5/6 v4l2 staging drivers, v7
Changes from v6:
- renamed include/video/imx-image-convert.h to imx-ipu-image-convert.h.
- changed MIN_W, MIN_H to absolute minimum allowed assuming conversions to/from planar pixel formats and with rotations (16x8).
- removed setting defaults if given 0 widths/heights in ipu_image_convert_adjust().
Steve Longerbeam (3):
gpu: ipu-v3: Add FSU channel linking support
gpu: ipu-v3: Add ipu_rot_mode_is_irt()
gpu: ipu-v3: Add queued image conversion support
drivers/gpu/ipu-v3/Makefile | 3 +- drivers/gpu/ipu-v3/ipu-common.c | 140 +++ drivers/gpu/ipu-v3/ipu-ic.c | 2 +- drivers/gpu/ipu-v3/ipu-image-convert.c | 1709 ++++++++++++++++++++++++++++++++ drivers/gpu/ipu-v3/ipu-prv.h | 32 + include/video/imx-ipu-image-convert.h | 207 ++++ include/video/imx-ipu-v3.h | 35 +- 7 files changed, 2119 insertions(+), 9 deletions(-) create mode 100644 drivers/gpu/ipu-v3/ipu-image-convert.c create mode 100644 include/video/imx-ipu-image-convert.h
Signature · 1 line
2.7.4
PATCH v7 1/3 gpu: ipu-v3: Add FSU channel linking support
Adds functions to link and unlink source channels to sink channels in the FSU:
int ipu_fsu_link(struct ipu_soc *ipu, int src_ch, int sink_ch); int ipu_fsu_unlink(struct ipu_soc *ipu, int src_ch, int sink_ch);
The channels numbers are usually IDMAC channels, but they can also be channels that do not transfer data to or from memory. The following convenience functions can be used in place of ipu_fsu_link/unlink() when both source and sink channels are IDMAC channels:
int ipu_idmac_link(struct ipuv3_channel *src, struct ipuv3_channel *sink); int ipu_idmac_unlink(struct ipuv3_channel *src, struct ipuv3_channel *sink);
So far the following links are supported:
IPUV3_CHANNEL_IC_PRP_ENC_MEM -> IPUV3_CHANNEL_MEM_ROT_ENC
PUV3_CHANNEL_IC_PRP_VF_MEM -> IPUV3_CHANNEL_MEM_ROT_VF IPUV3_CHANNEL_IC_PP_MEM -> IPUV3_CHANNEL_MEM_ROT_PP IPUV3_CHANNEL_CSI_DIRECT -> IPUV3_CHANNEL_CSI_VDI_PREV
More links can be added to the fsu_link_info[] array.
--- drivers/gpu/ipu-v3/ipu-common.c | 131 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/ipu-v3/ipu-prv.h | 27 +++++++++ include/video/imx-ipu-v3.h | 13 ++++ 3 files changed, 171 insertions(+)
drivers/gpu/ipu-v3/ipu-common.c +131 -0
@@ -730,6 +730,137 @@ void ipu_set_ic_src_mux(struct ipu_soc *ipu, int csi_id, bool vdi) }EXPORT_SYMBOL_GPL (ipu_set_ic_src_mux); + +/* Frame Synchronization Unit Channel Linking */ + +struct fsu_link_reg_info { +int chno; +u32 reg; +u32 mask; +u32 val; +}; + +struct fsu_link_info { +struct fsu_link_reg_info src; +struct fsu_link_reg_info sink; +}; + +static const struct fsu_link_info fsu_link_info[] = { + { + .src = {IPUV3_CHANNEL_IC_PRP_ENC_MEM ,IPU_FS_PROC_FLOW2 , +FS_PRP_ENC_DEST_SEL_MASK ,FS_PRP_ENC_DEST_SEL_IRT_ENC }, + .sink = {IPUV3_CHANNEL_MEM_ROT_ENC ,IPU_FS_PROC_FLOW1 , +FS_PRPENC_ROT_SRC_SEL_MASK ,FS_PRPENC_ROT_SRC_SEL_ENC }, + }, { + .src = {IPUV3_CHANNEL_IC_PRP_VF_MEM ,IPU_FS_PROC_FLOW2 , +FS_PRPVF_DEST_SEL_MASK ,FS_PRPVF_DEST_SEL_IRT_VF }, + .sink = {IPUV3_CHANNEL_MEM_ROT_VF ,IPU_FS_PROC_FLOW1 , +FS_PRPVF_ROT_SRC_SEL_MASK ,FS_PRPVF_ROT_SRC_SEL_VF }, + }, { + .src = {IPUV3_CHANNEL_IC_PP_MEM ,IPU_FS_PROC_FLOW2 , +FS_PP_DEST_SEL_MASK ,FS_PP_DEST_SEL_IRT_PP }, + .sink = {IPUV3_CHANNEL_MEM_ROT_PP ,IPU_FS_PROC_FLOW1 , +FS_PP_ROT_SRC_SEL_MASK ,FS_PP_ROT_SRC_SEL_PP }, + }, { + .src = {IPUV3_CHANNEL_CSI_DIRECT ,0 }, + .sink = {IPUV3_CHANNEL_CSI_VDI_PREV ,IPU_FS_PROC_FLOW1 , +FS_VDI_SRC_SEL_MASK ,FS_VDI_SRC_SEL_CSI_DIRECT }, + }, +}; + +static const struct fsu_link_info *find_fsu_link_info (int src,int sink) +{ +int i; + +for (i =0 ; i <ARRAY_SIZE (fsu_link_info); i++) { +if (src = fsu_link_info[i].src.chno && + sink = fsu_link_info[i].sink.chno) +return &fsu_link_info[i]; + } + +return NULL ; +} + +/* +* Links a source channel to a sink channel in the FSU. +*/ +int ipu_fsu_link (struct ipu_soc *ipu,int src_ch,int sink_ch) +{ +const struct fsu_link_info *link; +u32 src_reg, sink_reg; +unsigned long flags; + + link =find_fsu_link_info (src_ch, sink_ch); +if (!link) +return -EINVAL ; + +spin_lock_irqsave (&ipu->lock, flags); + +if (link->src.mask) { + src_reg =ipu_cm_read (ipu, link->src.reg); + src_reg &= ~link->src.mask; + src_reg |= link->src.val; +ipu_cm_write (ipu, src_reg, link->src.reg); + } + +if (link->sink.mask) { + sink_reg =ipu_cm_read (ipu, link->sink.reg); + sink_reg &= ~link->sink.mask; + sink_reg |= link->sink.val; +ipu_cm_write (ipu, sink_reg, link->sink.reg); + } + +spin_unlock_irqrestore (&ipu->lock, flags); +return 0 ; +} +EXPORT_SYMBOL_GPL (ipu_fsu_link); + +/* +* Unlinks source and sink channels in the FSU. +*/ +int ipu_fsu_unlink (struct ipu_soc *ipu,int src_ch,int sink_ch) +{ +const struct fsu_link_info *link; +u32 src_reg, sink_reg; +unsigned long flags; + + link =find_fsu_link_info (src_ch, sink_ch); +if (!link) +return -EINVAL ; + +spin_lock_irqsave (&ipu->lock, flags); + +if (link->src.mask) { + src_reg =ipu_cm_read (ipu, link->src.reg); + src_reg &= ~link->src.mask; +ipu_cm_write (ipu, src_reg, link->src.reg); + } + +if (link->sink.mask) { + sink_reg =ipu_cm_read (ipu, link->sink.reg); + sink_reg &= ~link->sink.mask; +ipu_cm_write (ipu, sink_reg, link->sink.reg); + } + +spin_unlock_irqrestore (&ipu->lock, flags); +return 0 ; +} +EXPORT_SYMBOL_GPL (ipu_fsu_unlink); + +/* Link IDMAC channels in the FSU */ +int ipu_idmac_link (struct ipuv3_channel *src,struct ipuv3_channel *sink) +{ +return ipu_fsu_link (src->ipu, src->num, sink->num); +} +EXPORT_SYMBOL_GPL (ipu_idmac_link); + +/* Unlink IDMAC channels in the FSU */ +int ipu_idmac_unlink (struct ipuv3_channel *src,struct ipuv3_channel *sink) +{ +return ipu_fsu_unlink (src->ipu, src->num, sink->num); +} +EXPORT_SYMBOL_GPL (ipu_idmac_unlink); +struct ipu_devtype {const char *name;unsigned long cm_ofs;
drivers/gpu/ipu-v3/ipu-prv.h +27 -0
@@ -75,6 +75,33 @@ struct ipu_soc;#define IPU_INT_CTRL (n) IPU_CM_REG(0x003C + 4 * (n))#define IPU_INT_STAT (n) IPU_CM_REG(0x0200 + 4 * (n)) +/* FS_PROC_FLOW1 */ +#define FS_PRPENC_ROT_SRC_SEL_MASK (0xf << 0) +#define FS_PRPENC_ROT_SRC_SEL_ENC (0x7 << 0) +#define FS_PRPVF_ROT_SRC_SEL_MASK (0xf << 8) +#define FS_PRPVF_ROT_SRC_SEL_VF (0x8 << 8) +#define FS_PP_SRC_SEL_MASK (0xf << 12) +#define FS_PP_ROT_SRC_SEL_MASK (0xf << 16) +#define FS_PP_ROT_SRC_SEL_PP (0x5 << 16) +#define FS_VDI1_SRC_SEL_MASK (0x3 << 20) +#define FS_VDI3_SRC_SEL_MASK (0x3 << 20) +#define FS_PRP_SRC_SEL_MASK (0xf << 24) +#define FS_VDI_SRC_SEL_MASK (0x3 << 28) +#define FS_VDI_SRC_SEL_CSI_DIRECT (0x1 << 28) +#define FS_VDI_SRC_SEL_VDOA (0x2 << 28) + +/* FS_PROC_FLOW2 */ +#define FS_PRP_ENC_DEST_SEL_MASK (0xf << 0) +#define FS_PRP_ENC_DEST_SEL_IRT_ENC (0x1 << 0) +#define FS_PRPVF_DEST_SEL_MASK (0xf << 4) +#define FS_PRPVF_DEST_SEL_IRT_VF (0x1 << 4) +#define FS_PRPVF_ROT_DEST_SEL_MASK (0xf << 8) +#define FS_PP_DEST_SEL_MASK (0xf << 12) +#define FS_PP_DEST_SEL_IRT_PP (0x3 << 12) +#define FS_PP_ROT_DEST_SEL_MASK (0xf << 16) +#define FS_PRPENC_ROT_DEST_SEL_MASK (0xf << 20) +#define FS_PRP_DEST_SEL_MASK (0xf << 24) +#define IPU_DI0_COUNTER_RELEASE (1 << 24)#define IPU_DI1_COUNTER_RELEASE (1 << 25)
include/video/imx-ipu-v3.h +13 -0
@@ -97,6 +97,14 @@ enum ipu_channel_irq {#define IPUV3_CHANNEL_CSI2 2#define IPUV3_CHANNEL_CSI3 3#define IPUV3_CHANNEL_VDI_MEM_IC_VF 5 +/* +* NOTE: channels 6,7 are unused in the IPU and are not IDMAC channels, +* but the direct CSI->VDI linking is handled the same way as IDMAC +* channel linking in the FSU via the IPU_FS_PROC_FLOW registers, so +* these channel names are used to support the direct CSI->VDI link. +*/ +#define IPUV3_CHANNEL_CSI_DIRECT 6 +#define IPUV3_CHANNEL_CSI_VDI_PREV 7#define IPUV3_CHANNEL_MEM_VDI_PREV 8#define IPUV3_CHANNEL_MEM_VDI_CUR 9#define IPUV3_CHANNEL_MEM_VDI_NEXT 10
@@ -133,6 +141,7 @@ enum ipu_channel_irq {#define IPUV3_CHANNEL_ROT_PP_MEM 50#define IPUV3_CHANNEL_MEM_BG_SYNC_ALPHA 51#define IPUV3_CHANNEL_MEM_BG_ASYNC_ALPHA 52 +#define IPUV3_NUM_CHANNELS 64int ipu_map_irq (struct ipu_soc *ipu,int irq); int ipu_idmac_channel_irq(struct ipu_soc *ipu, struct ipuv3_channel *channel,
@@ -176,6 +185,10 @@ int ipu_idmac_get_current_buffer(struct ipuv3_channel *channel);bool ipu_idmac_buffer_is_ready (struct ipuv3_channel *channel,u32 buf_num);void ipu_idmac_select_buffer (struct ipuv3_channel *channel,u32 buf_num);void ipu_idmac_clear_buffer (struct ipuv3_channel *channel,u32 buf_num); +int ipu_fsu_link (struct ipu_soc *ipu,int src_ch,int sink_ch); +int ipu_fsu_unlink (struct ipu_soc *ipu,int src_ch,int sink_ch); +int ipu_idmac_link (struct ipuv3_channel *src,struct ipuv3_channel *sink); +int ipu_idmac_unlink (struct ipuv3_channel *src,struct ipuv3_channel *sink);/* * IPU Channel Parameter Memory (cpmem) functions
Signature · 1 line
2.7.4
PATCH v7 2/3 gpu: ipu-v3: Add ipu_rot_mode_is_irt()
In reply to Steve LongerbeamAdd a macro that returns boolean true if the given ipu_rotate_mode requires the use of the Image Rotator.
--- drivers/gpu/ipu-v3/ipu-ic.c | 2 +- include/video/imx-ipu-v3.h | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-)
drivers/gpu/ipu-v3/ipu-ic.c +1 -1
@@ -619,7 +619,7 @@ int ipu_ic_task_idma_init(struct ipu_ic *ic, struct ipuv3_channel *channel,ipu_ic_write (ic, ic_idmac_2,IC_IDMAC_2 );ipu_ic_write (ic, ic_idmac_3,IC_IDMAC_3 ); -if (rot >=IPU_ROTATE_90_RIGHT ) +if (ipu_rot_mode_is_irt (rot)) ic->rotation = true; unlock:
include/video/imx-ipu-v3.h +15 -7
@@ -63,17 +63,25 @@ enum ipu_csi_dest {/* * Enumeration of IPU rotation modes */ +#define IPU_ROT_BIT_VFLIP (1 << 0) +#define IPU_ROT_BIT_HFLIP (1 << 1) +#define IPU_ROT_BIT_90 (1 << 2) +enum ipu_rotate_mode {IPU_ROTATE_NONE =0 , -IPU_ROTATE_VERT_FLIP , -IPU_ROTATE_HORIZ_FLIP , -IPU_ROTATE_180 , -IPU_ROTATE_90_RIGHT , -IPU_ROTATE_90_RIGHT_VFLIP , -IPU_ROTATE_90_RIGHT_HFLIP , -IPU_ROTATE_90_LEFT , +IPU_ROTATE_VERT_FLIP =IPU_ROT_BIT_VFLIP , +IPU_ROTATE_HORIZ_FLIP =IPU_ROT_BIT_HFLIP , +IPU_ROTATE_180 = (IPU_ROT_BIT_VFLIP |IPU_ROT_BIT_HFLIP ), +IPU_ROTATE_90_RIGHT =IPU_ROT_BIT_90 , +IPU_ROTATE_90_RIGHT_VFLIP = (IPU_ROT_BIT_90 |IPU_ROT_BIT_VFLIP ), +IPU_ROTATE_90_RIGHT_HFLIP = (IPU_ROT_BIT_90 |IPU_ROT_BIT_HFLIP ), +IPU_ROTATE_90_LEFT = (IPU_ROT_BIT_90 | +IPU_ROT_BIT_VFLIP |IPU_ROT_BIT_HFLIP ), }; +/* 90-degree rotations require the IRT unit */ +#define ipu_rot_mode_is_irt (m) (((m) & IPU_ROT_BIT_90) != 0) +enum ipu_color_space {IPUV3_COLORSPACE_RGB ,IPUV3_COLORSPACE_YUV ,
Signature · 1 line
2.7.4
PATCH v7 3/3 gpu: ipu-v3: Add queued image conversion support
In reply to Steve LongerbeamThis patch implements image conversion support using the IC tasks, with tiling to support scaling to and from images up to 4096x4096. Image rotation is also supported. Image conversion requests are added to a run queue under the IC tasks.
The internal API is subsystem agnostic (no V4L2 dependency except for the use of V4L2 fourcc pixel formats).
Callers prepare for image conversion by calling ipu_image_convert_prepare(), which initializes the parameters of the conversion. The caller passes in the ipu and IC task to use for the conversion, the input and output image formats, a rotation mode, and a completion callback and completion context pointer:
struct ipu_image_converter_ctx * ipu_image_convert_prepare(struct ipu_soc *ipu, enum ipu_ic_task ic_task,
struct ipu_image *in, struct ipu_image *out, enum ipu_rotate_mode rot_mode, ipu_image_converter_cb_t complete, void *complete_context);
A new conversion context is created that is added to an IC task context queue. The caller is given the new conversion context, which can then be passed to the further APIs:
int ipu_image_convert_queue(struct ipu_image_converter_run *run);
This queues the given image conversion request run to a run queue, and starts the conversion immediately if the run queue is empty. Only the physaddr's of the input and output image buffers are needed, since the conversion context was created previously with ipu_image_convert_prepare(). When the conversion completes, the run pointer is returned to the completion callback.
void ipu_image_convert_abort(struct ipu_image_converter_ctx *ctx);
This will abort any active or pending conversions for this context. Any currently active or pending runs belonging to this context are returned via the completion callback with an error status.
void ipu_image_convert_unprepare(struct ipu_image_converter_ctx *ctx);
Unprepares the conversion context. Any active or pending runs will be aborted by calling ipu_image_convert_abort().
---
v7:
- renamed include/video/imx-image-convert.h to imx-ipu-image-convert.h.
- changed MIN_W, MIN_H to absolute minimum allowed assuming conversions to/from planar pixel formats and with rotations (16x8).
- removed defaults for 0 widths/heights in ipu_image_convert_adjust().
v6:
- fixed call to ipu_image_convert_adjust() in ipu_image_convert_verify().
v5:
- moved all the ipu_image_convert support to ipu-image-convert.c. Prototypes moved to include/video/imx-image-convert.h with comment headers.
- removed the IC_TASK_ENCODE channels from image_convert_dma_chan[] list. The encode task cannnot be used by the image converter, since this task has no memory source IDMAC channels (buffers come directly from CSI).
- renamed some structs and a few of the exported APIs: struct image_converter is renamed ipu_image_convert_chan, ipu_image_convert_run() is renamed ipu_image_convert_queue().
- the ipu_ic handle passed to ipu_image_convert_prepare() is replaced by the IPU handle and IC task that are requested for carrying out the conversion. The image converter acquires the ipu_ic handle internally, in get_ipu_resources() along with the other resources required.
- removed .name field in the supported pixel format list, and ipu_image_convert_enum_format() no longer takes a char* desc arg.
- y_depth in 'struct ipu_image_pixfmt' replaced with boolean planar (Y pixel depth is always 8 bits).
- removed dmabuf reallocation in alloc_dma_buf().
- added lockdep_assert_held() to functions that require the irqlock.
- added IC task number to dev_dbg() output.
- exported 'struct ipu_image_convert_run'. ipu_image_convert_queue() now takes a run pointer. Caller must dynamically allocate and fill the run with a conversion context handle and the input/output buffer dma addresses, and free the run object when it is returned in the completion callback.
- ipu_image_convert_adjust() is now a void.
v4:
- do away with struct ipu_ic_tile_off, and move tile offsets into struct ipu_ic_tile. This paves the way for possibly allowing for each tile to have different dimensions in the future.
v3: no changes
v2: no changes
--- drivers/gpu/ipu-v3/Makefile | 3 +- drivers/gpu/ipu-v3/ipu-common.c | 9 + drivers/gpu/ipu-v3/ipu-image-convert.c | 1709 ++++++++++++++++++++++++++++++++ drivers/gpu/ipu-v3/ipu-prv.h | 5 + include/video/imx-ipu-image-convert.h | 207 ++++ 5 files changed, 1932 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/ipu-v3/ipu-image-convert.c create mode 100644 include/video/imx-ipu-image-convert.h
drivers/gpu/ipu-v3/Makefile +2 -1
@@ -1,4 +1,5 @@ obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o imx-ipu-v3-objs := ipu-common.o ipu-cpmem.o ipu-csi.o ipu-dc.o ipu-di.o \ - ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-smfc.o + ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-image-convert.o \ + ipu-smfc.o
drivers/gpu/ipu-v3/ipu-common.c +9 -0
@@ -970,6 +970,12 @@ static int ipu_submodules_init(struct ipu_soc *ipu, goto err_ic; } + ret =ipu_image_convert_init (ipu, dev); +if (ret) { + unit ="image_convert" ; + goto err_image_convert; + } + ret =ipu_di_init (ipu, dev,0 , ipu_base + devtype->disp0_ofs,IPU_CONF_DI0_EN , ipu_clk);if (ret) {
@@ -1024,6 +1030,8 @@ err_dc: err_di_1:ipu_di_exit (ipu,0 ); err_di_0: +ipu_image_convert_exit (ipu); +err_image_convert:ipu_ic_exit (ipu); err_ic:ipu_csi_exit (ipu,1 );
@@ -1108,6 +1116,7 @@ static void ipu_submodules_exit(struct ipu_soc *ipu)ipu_dc_exit (ipu);ipu_di_exit (ipu,1 );ipu_di_exit (ipu,0 ); +ipu_image_convert_exit (ipu);ipu_ic_exit (ipu);ipu_csi_exit (ipu,1 );ipu_csi_exit (ipu,0 );
drivers/gpu/ipu-v3/ipu-image-convert.c new file +1705 -0
1,705 lines not on this page · raw message
drivers/gpu/ipu-v3/ipu-prv.h +5 -0
@@ -165,6 +165,7 @@ struct ipu_dc_priv;struct ipu_dmfc_priv ;struct ipu_di ;struct ipu_ic_priv ; +struct ipu_image_convert_priv ;struct ipu_smfc_priv ;struct ipu_devtype ;
@@ -197,6 +198,7 @@ struct ipu_soc {struct ipu_di *di_priv[2 ];struct ipu_csi *csi_priv[2 ];struct ipu_ic_priv *ic_priv; +struct ipu_image_convert_priv *image_convert_priv;struct ipu_smfc_priv *smfc_priv; };
@@ -227,6 +229,9 @@ int ipu_ic_init(struct ipu_soc *ipu, struct device *dev, unsigned long base, unsigned long tpmem_base);void ipu_ic_exit (struct ipu_soc *ipu); +int ipu_image_convert_init (struct ipu_soc *ipu,struct device *dev); +void ipu_image_convert_exit (struct ipu_soc *ipu); +int ipu_di_init (struct ipu_soc *ipu,struct device *dev,int id,unsigned long base,u32 module,struct clk *ipu_clk);void ipu_di_exit (struct ipu_soc *ipu,int id);
include/video/imx-ipu-image-convert.h new file +207 -0
207 lines not on this page · raw message
Signature · 1 line
2.7.4
Philipp Zabel
maintainerHi Steve,
Am Samstag, den 17.09.2016, 12:33 -0700 schrieb Steve Longerbeam:
Quoted 13 lines
Changes from v6:
- renamed
include/video/imx-image-convert.htoimx-ipu-image-convert.h.
- changedMIN_W,MIN_Hto absolute minimum allowed assuming conversions to/from planar pixel formats and with rotations (16x8).
- removed setting defaults if given 0 widths/heights inipu_image_convert_adjust().Steve Longerbeam (3):
gpu: ipu-v3: Add FSU channel linking support
gpu: ipu-v3: Addipu_rot_mode_is_irt()
gpu: ipu-v3: Add queued image conversion support
Quoted 10 lines
drivers/gpu/ipu-v3/Makefile | 3 +- drivers/gpu/ipu-v3/ipu-common.c | 140 +++ drivers/gpu/ipu-v3/ipu-ic.c | 2 +- drivers/gpu/ipu-v3/ipu-image-convert.c | 1709 ++++++++++++++++++++++++++++++++ drivers/gpu/ipu-v3/ipu-prv.h | 32 + include/video/imx-ipu-image-convert.h | 207 ++++ include/video/imx-ipu-v3.h | 35 +- 7 files changed, 2119 insertions(+), 9 deletions(-) create mode 100644 drivers/gpu/ipu-v3/ipu-image-convert.c create mode 100644 include/video/imx-ipu-image-convert.h
thanks, I have updated to v7 and sent a pull request:
https://lists.freedesktop.org/archives/dri-devel/2016-September/118572.html
regards
Philipp