* [chrome-os:chromeos-6.1 118/123] drivers/gpu/drm/mediatek/mtk_crtc.c:781:32: warning: cast to pointer from integer of different size
@ 2024-06-05 22:47 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-06-05 22:47 UTC (permalink / raw)
To: cros-kernel-buildreports, Guenter Roeck; +Cc: oe-kbuild-all
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-6.1
head: de0bcc86c8087469675cc88c772f57202abea3e2
commit: 05b8aa4867fdd9b34c94ba227f985a9284cef78d [118/123] BACKPORT: FROMLIST: drm/mediatek: Add secure flow support to mediatek-drm
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20240606/202406060650.AcaixmiP-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240606/202406060650.AcaixmiP-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406060650.AcaixmiP-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/string.h:293,
from include/linux/bitmap.h:11,
from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/mutex.h:17,
from include/linux/notifier.h:14,
from include/linux/clk.h:14,
from drivers/gpu/drm/mediatek/mtk_crtc.c:6:
drivers/gpu/drm/mediatek/mtk_crtc.c: In function 'mtk_crtc_update_config':
>> drivers/gpu/drm/mediatek/mtk_crtc.c:781:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
781 | memset((void *)sec_data->addr_metadatas, 0,
| ^
include/linux/fortify-string.h:435:44: note: in definition of macro '__fortify_memset_chk'
435 | fortify_memset_chk(__fortify_size, p_size, p_size_field), \
| ^~~~~~
include/linux/fortify-string.h:445:17: note: in expansion of macro '__struct_size'
445 | __struct_size(p), __member_size(p))
| ^~~~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_crtc.c:781:25: note: in expansion of macro 'memset'
781 | memset((void *)sec_data->addr_metadatas, 0,
| ^~~~~~
>> drivers/gpu/drm/mediatek/mtk_crtc.c:781:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
781 | memset((void *)sec_data->addr_metadatas, 0,
| ^
include/linux/fortify-string.h:435:52: note: in definition of macro '__fortify_memset_chk'
435 | fortify_memset_chk(__fortify_size, p_size, p_size_field), \
| ^~~~~~~~~~~~
include/linux/fortify-string.h:445:35: note: in expansion of macro '__member_size'
445 | __struct_size(p), __member_size(p))
| ^~~~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_crtc.c:781:25: note: in expansion of macro 'memset'
781 | memset((void *)sec_data->addr_metadatas, 0,
| ^~~~~~
>> drivers/gpu/drm/mediatek/mtk_crtc.c:781:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
781 | memset((void *)sec_data->addr_metadatas, 0,
| ^
include/linux/fortify-string.h:436:29: note: in definition of macro '__fortify_memset_chk'
436 | __underlying_memset(p, c, __fortify_size); \
| ^
drivers/gpu/drm/mediatek/mtk_crtc.c:781:25: note: in expansion of macro 'memset'
781 | memset((void *)sec_data->addr_metadatas, 0,
| ^~~~~~
vim +781 drivers/gpu/drm/mediatek/mtk_crtc.c
731
732 static void mtk_crtc_update_config(struct mtk_crtc *mtk_crtc, bool needs_vblank)
733 {
734 #if IS_REACHABLE(CONFIG_MTK_CMDQ)
735 struct cmdq_client cmdq_client;
736 struct cmdq_pkt *cmdq_handle;
737 #endif
738 struct drm_crtc *crtc = &mtk_crtc->base;
739 struct mtk_drm_private *priv = crtc->dev->dev_private;
740 unsigned int pending_planes = 0, pending_async_planes = 0;
741 int i;
742
743 mutex_lock(&mtk_crtc->hw_lock);
744 mtk_crtc->config_updating = true;
745 if (needs_vblank)
746 mtk_crtc->pending_needs_vblank = true;
747
748 for (i = 0; i < mtk_crtc->layer_nr; i++) {
749 struct drm_plane *plane = &mtk_crtc->planes[i];
750 struct mtk_plane_state *plane_state;
751
752 plane_state = to_mtk_plane_state(plane->state);
753 if (plane_state->pending.dirty) {
754 plane_state->pending.config = true;
755 plane_state->pending.dirty = false;
756 pending_planes |= BIT(i);
757 } else if (plane_state->pending.async_dirty) {
758 plane_state->pending.async_config = true;
759 plane_state->pending.async_dirty = false;
760 pending_async_planes |= BIT(i);
761 }
762 }
763 if (pending_planes)
764 mtk_crtc->pending_planes = true;
765 if (pending_async_planes)
766 mtk_crtc->pending_async_planes = true;
767
768 if (priv->data->shadow_register) {
769 mtk_mutex_acquire(mtk_crtc->mutex);
770 mtk_crtc_ddp_config(crtc, NULL);
771 mtk_mutex_release(mtk_crtc->mutex);
772 }
773 #if IS_REACHABLE(CONFIG_MTK_CMDQ)
774 if (mtk_crtc->sec_on) {
775 mbox_flush(mtk_crtc->sec_cmdq_client.chan, 0);
776 mtk_crtc->sec_cmdq_handle.cmd_buf_size = 0;
777
778 if (mtk_crtc->sec_cmdq_handle.sec_data) {
779 struct cmdq_sec_data *sec_data = mtk_crtc->sec_cmdq_handle.sec_data;
780
> 781 memset((void *)sec_data->addr_metadatas, 0,
782 sec_data->addr_metadata_cnt * sizeof(u64));
783 sec_data->addr_metadata_cnt = 0;
784 }
785
786 mtk_crtc_enable_secure_state(crtc);
787
788 cmdq_client = mtk_crtc->sec_cmdq_client;
789 cmdq_handle = &mtk_crtc->sec_cmdq_handle;
790 } else if (mtk_crtc->cmdq_client.chan) {
791 mbox_flush(mtk_crtc->cmdq_client.chan, 2000);
792 mtk_crtc->cmdq_handle.cmd_buf_size = 0;
793
794 cmdq_client = mtk_crtc->cmdq_client;
795 cmdq_handle = &mtk_crtc->cmdq_handle;
796 }
797
798 if (cmdq_client.chan) {
799 cmdq_pkt_clear_event(cmdq_handle, mtk_crtc->cmdq_event);
800 cmdq_pkt_wfe(cmdq_handle, mtk_crtc->cmdq_event, false);
801 mtk_crtc_ddp_config(crtc, cmdq_handle);
802 cmdq_pkt_finalize(cmdq_handle);
803 dma_sync_single_for_device(cmdq_client.chan->mbox->dev,
804 cmdq_handle->pa_base,
805 cmdq_handle->cmd_buf_size,
806 DMA_TO_DEVICE);
807 /*
808 * CMDQ command should execute in next 3 vblank.
809 * One vblank interrupt before send message (occasionally)
810 * and one vblank interrupt after cmdq done,
811 * so it's timeout after 3 vblank interrupt.
812 * If it fail to execute in next 3 vblank, timeout happen.
813 */
814 mtk_crtc->cmdq_vblank_cnt = 3;
815
816 mbox_send_message(cmdq_client.chan, cmdq_handle);
817 mbox_client_txdone(cmdq_client.chan, 0);
818 }
819 #endif
820 mtk_crtc->config_updating = false;
821 mutex_unlock(&mtk_crtc->hw_lock);
822 }
823
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-05 22:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05 22:47 [chrome-os:chromeos-6.1 118/123] drivers/gpu/drm/mediatek/mtk_crtc.c:781:32: warning: cast to pointer from integer of different size kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.