Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lenovo IdeaTab - display port/ports definition missing #85

Closed
okias opened this issue Sep 29, 2021 · 8 comments
Closed

Lenovo IdeaTab - display port/ports definition missing #85

okias opened this issue Sep 29, 2021 · 8 comments

Comments

@okias
Copy link
Contributor

okias commented Sep 29, 2021

we need to have port or ports defined for tegra30-lenovo-ideatab-a2109a.dts, can you look at it @KaiJan57 ?

/home/runner/work/linux/linux/arch/arm/boot/dts/tegra30-lenovo-ideatab-a2109a.dt.yaml: display-panel: 'oneOf' conditional failed, one must be fixed:
	'port' is a required property
	'ports' is a required property
	From schema: /home/runner/work/linux/linux/Documentation/devicetree/bindings/display/panel/lvds.yaml
@KaiJan57
Copy link
Contributor

Well, I can tell for sure that it worked without specifying the ports property before it was mandatory. Maybe a simple port: true would do? I cannot test it right now though, because I currently have no access to the device.

@okias
Copy link
Contributor Author

okias commented Sep 29, 2021

I believe it working as it should, but the driver missing some required data.

EDIT: even original documentation says that port (or ports) is required node

-Required nodes:
-
-- panel-timing: See panel-common.txt.
-- ports: See panel-common.txt. These bindings require a single port subnode
-  corresponding to the panel LVDS input.
- ```

@KaiJan57
Copy link
Contributor

Might be true, but note that I could'nt see any error messages in kernel logs concerning this issue… I don't know whether it is incompleteness of data or whether panel-lvds is not the right compatible? From the documentation I have read about this device, it's not fully clear to me.

@okias
Copy link
Contributor Author

okias commented Sep 29, 2021

make dtbs_check which verify validity of DTS files reported this 😉 Note: When we reach 0 warnings, I plan to enable it in CI as mandatory (so introducing new warnings block CI and merging).

@KaiJan57
Copy link
Contributor

I see. I'll give a few ideas a try as soon as I find the time and get back to the tablet.

@digetx
Copy link
Member

digetx commented Sep 29, 2021

IdeaTab uses legacy nvidia,panel binding. Ideally we need to add a bridge node, but we don't know what bridge uses IdeaTab. Seems adding a dummy port shouldn't hurt since legacy panel still will be used.

@okias
Copy link
Contributor Author

okias commented Sep 30, 2021

since this is currently last dtbs_check warning, I'm adding dummy port for now with comment.

@okias
Copy link
Contributor Author

okias commented Sep 30, 2021

should be closed by #88

@okias okias closed this as completed Sep 30, 2021
okias pushed a commit to okias/linux that referenced this issue Jan 7, 2024
commit 745f17a upstream.

We got a WARNING in ext4_add_complete_io:
==================================================================
 WARNING: at fs/ext4/page-io.c:231 ext4_put_io_end_defer+0x182/0x250
 CPU: 10 PID: 77 Comm: ksoftirqd/10 Tainted: 6.3.0-rc2 grate-driver#85
 RIP: 0010:ext4_put_io_end_defer+0x182/0x250 [ext4]
 [...]
 Call Trace:
  <TASK>
  ext4_end_bio+0xa8/0x240 [ext4]
  bio_endio+0x195/0x310
  blk_update_request+0x184/0x770
  scsi_end_request+0x2f/0x240
  scsi_io_completion+0x75/0x450
  scsi_finish_command+0xef/0x160
  scsi_complete+0xa3/0x180
  blk_complete_reqs+0x60/0x80
  blk_done_softirq+0x25/0x40
  __do_softirq+0x119/0x4c8
  run_ksoftirqd+0x42/0x70
  smpboot_thread_fn+0x136/0x3c0
  kthread+0x140/0x1a0
  ret_from_fork+0x2c/0x50
==================================================================

Above issue may happen as follows:

            cpu1                        cpu2
----------------------------|----------------------------
mount -o dioread_lock
ext4_writepages
 ext4_do_writepages
  *if (ext4_should_dioread_nolock(inode))*
    // rsv_blocks is not assigned here
                                 mount -o remount,dioread_nolock
  ext4_journal_start_with_reserve
   __ext4_journal_start
    __ext4_journal_start_sb
     jbd2__journal_start
      *if (rsv_blocks)*
        // h_rsv_handle is not initialized here
  mpage_map_and_submit_extent
    mpage_map_one_extent
      dioread_nolock = ext4_should_dioread_nolock(inode)
      if (dioread_nolock && (map->m_flags & EXT4_MAP_UNWRITTEN))
        mpd->io_submit.io_end->handle = handle->h_rsv_handle
        ext4_set_io_unwritten_flag
          io_end->flag |= EXT4_IO_END_UNWRITTEN
      // now io_end->handle is NULL but has EXT4_IO_END_UNWRITTEN flag

scsi_finish_command
 scsi_io_completion
  scsi_io_completion_action
   scsi_end_request
    blk_update_request
     req_bio_endio
      bio_endio
       bio->bi_end_io  > ext4_end_bio
        ext4_put_io_end_defer
	 ext4_add_complete_io
	  // trigger WARN_ON(!io_end->handle && sbi->s_journal);

The immediate cause of this problem is that ext4_should_dioread_nolock()
function returns inconsistent values in the ext4_do_writepages() and
mpage_map_one_extent(). There are four conditions in this function that
can be changed at mount time to cause this problem. These four conditions
can be divided into two categories:

    (1) journal_data and EXT4_EXTENTS_FL, which can be changed by ioctl
    (2) DELALLOC and DIOREAD_NOLOCK, which can be changed by remount

The two in the first category have been fixed by commit c8585c6
("ext4: fix races between changing inode journal mode and ext4_writepages")
and commit cb85f4d ("ext4: fix race between writepages and enabling
EXT4_EXTENTS_FL") respectively.

Two cases in the other category have not yet been fixed, and the above
issue is caused by this situation. We refer to the fix for the first
category, when applying options during remount, we grab s_writepages_rwsem
to avoid racing with writepages ops to trigger this problem.

Fixes: 6b523df ("ext4: use transaction reservation for extent conversion in ext4_end_io")
Cc: [email protected]
Signed-off-by: Baokun Li <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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

No branches or pull requests

3 participants