Age | Commit message (Collapse) | Author |
|
The printed message when a firmware version is wrong says nothing
usefull:
atomisp-isp2 0000:00:03.0: Fw version check failed.
atomisp-isp2: probe of 0000:00:03.0 failed with error -22
Print the expected and the received firmware version instead.
In order to do that, the firmware functions will need at least
a struct device pointer, so pass it.
While writing this patch, it was noticed that some of the
abstraction layers of this driver have functions that are never
called, but use this interface. Get rid of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
As the atomisp driver should already be handling the ISP
PCI ID, there's no sense on keeping the dummy driver enabled
in tis case.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
With the changes, this function is now undefined if built
for ISP2400. So, move its implementation to the file which
calls it.
Reported-by: Francescodario Cuzzocrea <francescodario.cuzzocrea@mail.polimi.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Some recent changes at V4L2 core changed the way querycap is handled.
Due to that, this warning is generated:
WARNING: CPU: 1 PID: 503 at drivers/media/v4l2-core/v4l2-dev.c:885 __video_register_device+0x93e/0x1120 [videodev]
as introduced by this commit:
commit 3c1350501c21db8e3b1a38d9e97db29694305c3b
Author: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Date: Tue Jul 23 04:21:25 2019 -0400
media: v4l2-dev/ioctl: require non-zero device_caps, verify sane querycap results
Now that all V4L2 drivers set device_caps in struct video_device, we can add
a check for this to ensure all future drivers fill this in.
The fix is simple: we just need to initialize dev_caps before
registering the V4L2 dev.
While here, solve other problems at VIDIOC_QUERYCAP ioctl.
Reported-by: Patrik Gfeller <patrik.gfeller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
It doesn't make senst to update a request that was not
created. So, instead of using cpu_latency_qos_update_request(),
let's use, instead cpu_latency_qos_add_request() at device
probing code.
This should fix this issue:
[ 9.691775] cpu_latency_qos_update_request called for unknown object
[ 9.695279] WARNING: CPU: 3 PID: 523 at kernel/power/qos.c:296 cpu_latency_qos_update_request+0x3a/0xb0
[ 9.698826] Modules linked in: snd_soc_acpi_intel_match snd_rawmidi snd_soc_acpi snd_soc_rl6231 snd_soc_core ath mac80211 snd_compress snd_hdmi_lpe_audio ac97_bus hid_sensor_accel_3d snd_pcm_dmaengine hid_sensor_gyro_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common processor_thermal_device industrialio cfg80211 snd_pcm snd_seq intel_rapl_common atomisp(C+) libarc4 intel_soc_dts_iosf cros_ec_ishtp intel_xhci_usb_role_switch mei_txe cros_ec videobuf_vmalloc mei roles atomisp_ov2680(C) videobuf_core snd_seq_device snd_timer spi_pxa2xx_platform videodev snd mc dw_dmac intel_hid dw_dmac_core 8250_dw soundcore int3406_thermal int3400_thermal intel_int0002_vgpio acpi_pad acpi_thermal_rel soc_button_array int3403_thermal int340x_thermal_zone mac_hid sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_sensor_custom hid_sensor_hub intel_ishtp_loader intel_ishtp_hid crct10dif_pclmul crc32_pclmul ghash_clmulni_intel i915 mmc_block i2c_algo_bit
[ 9.698885] aesni_intel crypto_simd drm_kms_helper cryptd syscopyarea sysfillrect glue_helper sysimgblt fb_sys_fops cec intel_ish_ipc drm lpc_ich intel_ishtp hid_asus intel_soc_pmic_chtdc_ti asus_wmi i2c_hid sparse_keymap sdhci_acpi wmi video sdhci hid_generic usbhid hid
[ 9.736699] CPU: 3 PID: 523 Comm: systemd-udevd Tainted: G C 5.7.0-rc1+ #2
[ 9.741309] Hardware name: ASUSTeK COMPUTER INC. T101HA/T101HA, BIOS T101HA.305 01/24/2018
[ 9.745962] RIP: 0010:cpu_latency_qos_update_request+0x3a/0xb0
[ 9.750615] Code: 89 e5 41 55 41 54 41 89 f4 53 48 89 fb 48 81 7f 28 e0 7f c6 9e 74 1c 48 c7 c6 60 f3 65 9e 48 c7 c7 e8 a9 99 9e e8 b2 a6 f9 ff <0f> 0b 5b 41 5c 41 5d 5d c3 0f 1f 44 00 00 44 3b 23 74 ef 44 89 e2
[ 9.760065] RSP: 0018:ffffa865404f39c0 EFLAGS: 00010282
[ 9.764734] RAX: 0000000000000000 RBX: ffff9d2aefc84350 RCX: 0000000000000000
[ 9.769435] RDX: ffff9d2afbfa97c0 RSI: ffff9d2afbf99808 RDI: ffff9d2afbf99808
[ 9.774125] RBP: ffffa865404f39d8 R08: 0000000000000304 R09: 0000000000aaaaaa
[ 9.778804] R10: 0000000000000000 R11: 0000000000000001 R12: 00000000ffffffff
[ 9.783491] R13: ffff9d2afb4640b0 R14: ffffffffc07ecf20 R15: 0000000091000000
[ 9.788187] FS: 00007efe67ff8880(0000) GS:ffff9d2afbf80000(0000) knlGS:0000000000000000
[ 9.792864] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 9.797482] CR2: 00007ffc6424bdc8 CR3: 0000000178998000 CR4: 00000000001006e0
[ 9.802126] Call Trace:
[ 9.806775] atomisp_pci_probe.cold.19+0x15f/0x116f [atomisp]
[ 9.811441] local_pci_probe+0x47/0x80
[ 9.816085] pci_device_probe+0xff/0x1b0
[ 9.820706] really_probe+0x1c8/0x3e0
[ 9.825247] driver_probe_device+0xd9/0x120
[ 9.829769] device_driver_attach+0x58/0x60
[ 9.834294] __driver_attach+0x8f/0x150
[ 9.838782] ? device_driver_attach+0x60/0x60
[ 9.843205] ? device_driver_attach+0x60/0x60
[ 9.847634] bus_for_each_dev+0x79/0xc0
[ 9.852033] ? kmem_cache_alloc_trace+0x167/0x230
[ 9.856462] driver_attach+0x1e/0x20
Reported-by: Patrik Gfeller <patrik.gfeller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
There are currently two identical copies of some files, one
at css_2401_csi2p_system/ and another one at css_2401_system/.
Get rid of one of them, moving the remaining files to the
directory with the shortest name.
While here, do more renames, in order to get smaller path
names.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The Asus Transformer T101HA comes with a newer hardware
version. Add support to load firmware for it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
There are lots of places inside this driver checking for
ISP2400/ISP2401 verison. Get rid of most of those, while
keep building for both.
Most of stuff in this patch is trivial to solve.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Everything there is for ISP2401 only. So, we can trivially
solve all ifdefs at once.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Everything there is for ISP2401 only. So, we can trivially
solve all ifdefs at once.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Everything there is for ISP2400 only. So, we can trivially
solve all ifdefs at once
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Now that everything needed to build for ISP2401 is solved,
we can setup atomisp to build either for ISP2400 or ISP2401.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
With the current way, it will produce lots of errors because
the public header contains wrong definitions and the private
one has functions defined at the wrong order.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Probably due to some version conflicts while the atomisp code
were generated, some things don't build for ISP2401. So, use
the ISP2400 variant when available, or get rid of the
code that doesn't build.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
This driver has very long directories without a good
reason (IMHO). Let's drop two directories from such hierarchy,
in order to simplify things a little bit and make the dir
output a bit more readable.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Remove an uneeded define and Makefile.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The *system_*.h files contain ISP-specific definitions, and are
used everywhere.
While the best would be to get rid of those in favor of some
ISP-specific structs, a change like that would require lots
of changes.
So, instead, let's rename those files replacing them by new
ones with ISP ifdefs on it, in order to select between the
two different versions.
We shall later convert this to some abrstraction layer,
but this change should help to be able to build support for
either ISP2400 or ISP2401.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
This is not defined anywhere, so just get rid of the dead
source code.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
There are several defines on ISP-specific definition sets
that are unused, related to VMEM_BAMEM. Get rid of those.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
That's the last header file which had ifdefs for ISP2401.
The problem is that the conflicting dependencies were on another
file (sh_css_defs.h). Move the conflicting code to it, adding
a prefix which would describe what version the macro applies.
Then, ensure that binary.c will use the right version,
according with the hardware version.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Most of the remaining ifdefs check for ISP2401 are trivial.
Get rid of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Those files aren't used. So, just get rid of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The contents of this file is identical to ipu2_io_ls, except
for the bayer directory, with is only at ipu2_io_ls.
So, get rid of the duplicated code.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
This file is different than the anr1 version. So, let's name
it differently.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
There are two instances of those, one for isp2401 and another
one for isp2400, both with identical contents, except for
comments and an ifdef.
Get rid of one of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Some BIOSes seem to use different names for some regulators.
Use regulator_get_optional() for the first attempt, in order
to avoid using the dummy regulator and produce a warning, in
the case that the first attempt fails.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Those were extracted from an ACPI dump:
* Original Table Header:
* Signature "DSDT"
* Length 0x0001A0BD (106685)
* Revision 0x02
* Checksum 0x76
* OEM ID "_ASUS_"
* OEM Table ID "Notebook"
* OEM Revision 0x01072009 (17244169)
* Compiler ID "INTL"
* Compiler Version 0x20120913 (538052883)
*/
DefinitionBlock ("", "DSDT", 2, "_ASUS_", "Notebook", 0x01072009)
...
Local0 = Package (0x12)
{
"CamId",
"ov2680",
"CamType",
"1",
"CsiPort",
"0",
"CsiLanes",
"1",
"CsiFmt",
"15",
"CsiBayer",
"0",
"CamClk",
"1",
"Regulator1p8v",
"0",
"Regulator2p8v",
"0"
}
Note: the DMI_MATCH() line probably needs to be tweaked.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The last header (hive_isp_css_2401_irq_types_hrt.h) is also
almost identical, except by an if ISP2400 inside a comment
block.
Remove the duplication and keep just one file.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
While those headers are different, the different fields
aren't used at the driver. So, remove those different
unused fields, rename one define and use just one header
for all 3 different versions of the ISP.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Nothing here is really used by the driver. So, let's just
get rid of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Those files have identical contents, but are located at
different parts of the driver. As their contents are identical,
we can simply remove them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The isp_capture_defs.h contain several unused defines.
Get rid of some of them, making all 3 instances identical.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Those 4 header files aren't used anyware. So, send them to
the trash can.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
On several header files, the dependency for ISP2401 is
trivial: for example, it just adds new fields on structs or
declare new functions.
Get rid of those trivial cases.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Those vars aren't used anymore at this driver. Get rid of
them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
None of those SH_CSS_BINARY_ID_* symbols are used by this driver
anymore. So, get rid of all of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Get rid of all those ifdefs that were checking for ISP2401 inside
sh_css.c.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Don't hide those small functions behind ifdefs.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
There are no ia_css_set_system_mode() nor
ia_css_is_system_mode_suspend_or_resume() functions at the driver.
So, get rid of the code that would try to call it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
It doesn't make any sense to change the number of parameters
for this function depending on the ISP version.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The css_trace header for ISP2401 also builds on older versions, and
seems to be compatible with all versions. So, remove all ifdefs
in favor of the CSP2401 version.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
This patch addresses what it sounds to be a change at the
name of some ACPI registers on newer ACPI tables.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The CSS version returned by ISP2400 is different than the one
returned by ISP2401.
While we could return just one version for both, as this sounds
like just an informative string, for now, let's keep returning
different versions, as we don't know if this would affect
userspace.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
As namespaces aren't duplicated here, just remove the ifdefs.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Instead of packing parameters differently on ISP2400 and ISP2401,
use just one way of passing them for both.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The way atomisp_dfs_tables.h is defined, it ends by duplicating
all data structs there on both atomisp_v4l2.c and atomisp_cmd.c.
Change the logic in order to place the definitions only on a single
place.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
This header is really version-independent. So, just get rid
of the macros from it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
This function call has two parameters that are used only with
ISP2401, enclosed on some ugly ifdefs. Make the function independent,
passing NULL values for ISP2400.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Use the same struct for both ISP2400 and ISP2401.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
There are several #ifdefs checking for ISP version there. Some
of them are just two different ways to represent the same contants,
while 3 parameters are actually different, depending on the ISP
version.
Change the header in a way that it will be compatible with both
versions, and change dependent code to keep running, removing
ifdefs there only when possible.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|