Lines Matching +full:powervr +full:- +full:gpu

1 /* SPDX-License-Identifier: GPL-2.0-only OR MIT */
40 * struct pvr_gpu_id - Hardware GPU ID information for a PowerVR device
51 * struct pvr_fw_version - Firmware version information
60 * struct pvr_device - powervr-specific wrapper for &struct drm_device
71 /** @gpu_id: GPU ID detected at runtime. */
114 * This is the primary clock used by the entire GPU core.
154 * @params: Device-specific parameters.
162 /** @stream_musthave_quirks: Bit array of "must-have" quirks for stream commands. */
194 * @queues: Queue-related fields.
288 * GPU reset code will lock this for writing. Any code that submits commands to the firmware
290 * Once this has been successfully locked, &pvr_dev->lost _must_ be checked, and -%EIO must
306 * struct pvr_file - powervr-specific data to be assigned to &struct
318 * @pvr_dev: A reference to the powervr-specific wrapper for the
360 * PVR_HAS_FEATURE() - Tests whether a PowerVR device has a given feature
361 * @pvr_dev: [IN] Target PowerVR device.
371 #define PVR_HAS_FEATURE(pvr_dev, feature) ((pvr_dev)->features.has_##feature)
374 * PVR_FEATURE_VALUE() - Gets a PowerVR device feature value
375 * @pvr_dev: [IN] Target PowerVR device.
387 * * -%EINVAL if the named feature is not present in the hardware
392 int _ret = -EINVAL; \
393 if (_pvr_dev->features.has_##feature) { \
394 *(value_out) = _pvr_dev->features.feature; \
401 * PVR_HAS_QUIRK() - Tests whether a physical device has a given quirk
402 * @pvr_dev: [IN] Target PowerVR device.
412 #define PVR_HAS_QUIRK(pvr_dev, quirk) ((pvr_dev)->quirks.has_brn##quirk)
415 * PVR_HAS_ENHANCEMENT() - Tests whether a physical device has a given
417 * @pvr_dev: [IN] Target PowerVR device.
427 #define PVR_HAS_ENHANCEMENT(pvr_dev, enhancement) ((pvr_dev)->enhancements.has_ern##enhancement)
429 #define from_pvr_device(pvr_dev) (&(pvr_dev)->base)
433 #define from_pvr_file(pvr_file) ((pvr_file)->file)
435 #define to_pvr_file(file) ((file)->driver_priv)
438 * PVR_PACKED_BVNC() - Packs B, V, N and C values into a 64-bit unsigned integer
446 * +--------+--------+--------+-------+
450 * +--------+--------+--------+-------+
457 /* clang-format off */
463 /* clang-format on */
466 * pvr_gpu_id_to_packed_bvnc() - Packs B, V, N and C values into a 64-bit
468 * @gpu_id: GPU ID.
472 * +--------+--------+--------+-------+
476 * +--------+--------+--------+-------+
486 return PVR_PACKED_BVNC(gpu_id->b, gpu_id->v, gpu_id->n, gpu_id->c); in pvr_gpu_id_to_packed_bvnc()
492 gpu_id->b = (bvnc & GENMASK_ULL(63, 48)) >> 48; in packed_bvnc_to_pvr_gpu_id()
493 gpu_id->v = (bvnc & GENMASK_ULL(47, 32)) >> 32; in packed_bvnc_to_pvr_gpu_id()
494 gpu_id->n = (bvnc & GENMASK_ULL(31, 16)) >> 16; in packed_bvnc_to_pvr_gpu_id()
495 gpu_id->c = bvnc & GENMASK_ULL(15, 0); in packed_bvnc_to_pvr_gpu_id()
510 * PVR_CR_FIELD_GET() - Extract a single field from a PowerVR control register
519 * pvr_cr_read32() - Read a 32-bit register from a PowerVR device
520 * @pvr_dev: Target PowerVR device.
528 return ioread32(pvr_dev->regs + reg); in pvr_cr_read32()
532 * pvr_cr_read64() - Read a 64-bit register from a PowerVR device
533 * @pvr_dev: Target PowerVR device.
541 return ioread64(pvr_dev->regs + reg); in pvr_cr_read64()
545 * pvr_cr_write32() - Write to a 32-bit register in a PowerVR device
546 * @pvr_dev: Target PowerVR device.
553 iowrite32(val, pvr_dev->regs + reg); in pvr_cr_write32()
557 * pvr_cr_write64() - Write to a 64-bit register in a PowerVR device
558 * @pvr_dev: Target PowerVR device.
565 iowrite64(val, pvr_dev->regs + reg); in pvr_cr_write64()
569 * pvr_cr_poll_reg32() - Wait for a 32-bit register to match a given value by
571 * @pvr_dev: Target PowerVR device.
579 * * -%ETIMEDOUT on timeout.
587 return readl_poll_timeout(pvr_dev->regs + reg_addr, value, in pvr_cr_poll_reg32()
592 * pvr_cr_poll_reg64() - Wait for a 64-bit register to match a given value by
594 * @pvr_dev: Target PowerVR device.
602 * * -%ETIMEDOUT on timeout.
610 return readq_poll_timeout(pvr_dev->regs + reg_addr, value, in pvr_cr_poll_reg64()
615 * pvr_round_up_to_cacheline_size() - Round up a provided size to be cacheline
617 * @pvr_dev: Target PowerVR device.
650 * pvr_ioctl_union_padding_check() - Validate that the implicit padding between
654 * be 64-bit aligned.
656 * 64-bit aligned.
659 * member is zero relative to @union_offset. Must be 64-bit aligned.
675 * void pointer arithmetic is technically illegal - cast to a byte in pvr_ioctl_union_padding_check()
679 size_t padding_size = union_size - member_size; in pvr_ioctl_union_padding_check()
685 * PVR_STATIC_ASSERT_64BIT_ALIGNED() - Inline assertion for 64-bit alignment.
689 * 64-bit aligned address (i.e. a multiple of 8), compilation will fail.
696 static_assert(((static_expr_) & (sizeof(u64) - 1)) == 0); \
701 * PVR_IOCTL_UNION_PADDING_CHECK() - Validate that the implicit padding between
724 sizeof(__instance->union_)); \
726 sizeof(__instance->union_.member_)); \