Commit graph

12 commits

Author SHA1 Message Date
Jonathan Hamilton
9f577b1824 video: adf: Cleanup sw_sync timeline at adf_device_destroy
If a sw_sync timeline was created by ADF (for drivers that do not implement
ops->complete_fence) we should clean it up when the ADF device is
destroyed.

Change-Id: Idd90180fcae56a87111f7d12bdd80190756a6b80
Signed-off-by: Jonathan Hamilton <jonathan.hamilton@imgtec.com>
2016-02-16 13:53:23 -08:00
Alistair Strachan
5bd7300657 video: adf: use rb_erase in adf_obj_destroy.
Not calling rb_erase() can cause slab corruption, as the rb_first() call
after kfree() in adf_obj_destroy() can return the same node twice unless
it is erased.

This problem was reproduced by unloading a kernel module that used the
adf framework *after* a vsync event was registered. A crash would occur
in rb_first(). (Just loading and immediately unloading the module without
the vsync event worked correctly.)

Change-Id: I9fa7cb5d7519691e38a281439844aa193da13d1b
Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com>
Cc: Jonathan Hamilton <jonathan.hamilton@imgtec.com>
Cc: Greg Hackmann <ghackmann@google.com>
2016-02-16 13:53:21 -08:00
Greg Hackmann
69094222cf video: adf: add buffer padding quirk
Quirks specify common behaviors that vary slightly among devices, and
which ADF must account for.

The buffer padding quirk captures the way different devices fetch the
last scanline in a buffer: some devices fetch an entire line (including
padding to the pitch) while others only fetch up to the visible width.
ADF's buffer size validation now takes this quirk into account.

Change-Id: I828b13316e27621d8a9efd9d5fffa6ce12a525ff
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16 13:53:20 -08:00
Greg Hackmann
25b8f56daa video: adf: document adf_format_validate_yuv's origin
Change-Id: I929045a96a56bdb2c915be92b8ef11b560f3ab79
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16 13:53:20 -08:00
Alistair Strachan
0bb5d2b6b6 video: adf: export the adf_attachment_allow symbol to modules.
There are no in-tree users of adf_attachment_allow, but out-of-tree
modules want to use it. It looks like this function should be
EXPORT_SYMBOL.

Change-Id: Iad522dc5d32ac09fec6483bbc317db8ecae12e97
Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com>
2016-02-16 13:53:18 -08:00
Greg Hackmann
36a63d840c video: adf: make device node names less hierarchical
adf/foobar/device -> adf0
adf/foobar/interface1 -> adf-interface0.1
adf/foobar/overlay-engine1 -> adf-overlay-engine0.1

Change-Id: I7af7f84ce3f101ecb02f448070c200ff3e03f2ec
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16 13:53:14 -08:00
Greg Hackmann
3d46874e09 video: adf: expose adf_modeinfo_set_{name,vrefresh} to drivers
Change-Id: Id9f8b2184927a77b244ce0b33d619d6e44a0f17a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16 13:53:14 -08:00
Greg Hackmann
68af5acfba video: adf: set default interface dpms_state to OFF
Interfaces default to unplugged, so they should also default to off

Change-Id: I36500a54b11f354a0d7dd2c9924a79e0d9c6f855
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16 13:53:13 -08:00
Greg Hackmann
1f9e414c3a video: adf: add helpers for validating custom formats
Many custom formats look a lot like the standard ones, but with
different subsampling, bpp, etc.  Expose and document
adf_buffer_validate()'s main body, so drivers can reuse its logic when
validating these formats.

Change-Id: I1d06981c9e5aab26f3ab2956c08c679f2c823bcc
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16 13:53:12 -08:00
Greg Hackmann
e45fc30f3e video: adf: add informational flags to interfaces
Informational flags don't affect ADF directly but may be useful to
clients.  Currently used to indicate primary and external displays.

Change-Id: I343c7f0148da0869244c8e818350e9855525df85
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16 13:53:12 -08:00
Greg Hackmann
8bb154db8a video: adf: add supported formats to adf_overlay_engine_data
Change-Id: If2aa783b9ece60160f465bf697508fc58682e1bc
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16 13:53:11 -08:00
Greg Hackmann
066a50cee5 video: add atomic display framework
Change-Id: I693257e269a99012cd0dbb57576ac222869cf4c7
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16 13:53:09 -08:00