215
215
216
216
#define DECLARE_PROP_ID_AS_UINT32 (prop_name , prop_var_name ) uint32_t prop_var_name;
217
217
218
- #define DRM_BLEND_ALPHA_OPAQUE 0xFFFF
219
-
220
218
enum drm_blend_mode {
221
219
kPremultiplied_DrmBlendMode ,
222
220
kCoverage_DrmBlendMode ,
@@ -502,6 +500,13 @@ struct drm_plane {
502
500
/// @brief Whether this plane has a mutable alpha property we can set.
503
501
bool has_alpha ;
504
502
503
+ /// @brief The minimum and maximum alpha values.
504
+ ///
505
+ /// Only valid if @ref has_alpha is true.
506
+ ///
507
+ /// This should be 0x0000..0xFFFF, but the xilinx driver uses different values.
508
+ uint16_t min_alpha , max_alpha ;
509
+
505
510
/// @brief Whether this plane has a mutable pixel blend mode we can set.
506
511
bool has_blend_mode ;
507
512
@@ -750,15 +755,15 @@ DECLARE_REF_OPS(kms_req_builder);
750
755
751
756
/**
752
757
* @brief Gets the @ref drmdev associated with this KMS request builder.
753
- *
758
+ *
754
759
* @param builder The KMS request builder.
755
760
* @returns The drmdev associated with this KMS request builder.
756
761
*/
757
762
struct drmdev * kms_req_builder_get_drmdev (struct kms_req_builder * builder );
758
763
759
764
/**
760
765
* @brief Gets the CRTC associated with this KMS request builder.
761
- *
766
+ *
762
767
* @param builder The KMS request builder.
763
768
* @returns The CRTC associated with this KMS request builder.
764
769
*/
@@ -768,7 +773,7 @@ struct drm_crtc *kms_req_builder_get_crtc(struct kms_req_builder *builder);
768
773
* @brief Adds a property to the KMS request that will set the given video mode
769
774
* on this CRTC on commit, regardless of whether the currently committed output
770
775
* mode is the same.
771
- *
776
+ *
772
777
* @param builder The KMS request builder.
773
778
* @param mode The output mode to set (on @ref kms_req_commit)
774
779
* @returns Zero if successful, positive errno-style error on failure.
@@ -779,7 +784,7 @@ int kms_req_builder_set_mode(struct kms_req_builder *builder, const drmModeModeI
779
784
* @brief Adds a property to the KMS request that will unset the configured
780
785
* output mode for this CRTC on commit, regardless of whether the currently
781
786
* committed output mdoe is already unset.
782
- *
787
+ *
783
788
* @param builder The KMS request builder.
784
789
* @returns Zero if successful, positive errno-style error on failure.
785
790
*/
@@ -788,7 +793,7 @@ int kms_req_builder_unset_mode(struct kms_req_builder *builder);
788
793
/**
789
794
* @brief Adds a property to the KMS request that will change the connector
790
795
* that this CRTC is displaying content on to @param connector_id.
791
- *
796
+ *
792
797
* @param builder The KMS request builder.
793
798
* @param connector_id The connector that this CRTC should display contents on.
794
799
* @returns Zero if successful, EINVAL if the @param connector_id is invalid.
@@ -799,11 +804,11 @@ int kms_req_builder_set_connector(struct kms_req_builder *builder, uint32_t conn
799
804
* @brief True if the next layer pushed using @ref kms_req_builder_push_fb_layer
800
805
* should be opaque, i.e. use a framebuffer which has a pixel format that has no
801
806
* alpha channel.
802
- *
807
+ *
803
808
* This is true for the bottom-most layer. There are some display controllers
804
809
* that don't support non-opaque pixel formats for the bottom-most (primary)
805
810
* plane. So ignoring this might lead to an EINVAL on commit.
806
- *
811
+ *
807
812
* @param builder The KMS request builder.
808
813
* @returns True if the next layer should preferably be opaque, false if there's
809
814
* no preference.
@@ -812,30 +817,30 @@ bool kms_req_builder_prefer_next_layer_opaque(struct kms_req_builder *builder);
812
817
813
818
/**
814
819
* @brief Adds a new framebuffer (display) layer on top of the last layer.
815
- *
820
+ *
816
821
* If this is the first layer, the framebuffer should cover the entire screen
817
822
* (CRTC).
818
- *
823
+ *
819
824
* To allow the use of explicit fencing, specify an in_fence_fd in @param layer
820
825
* and a @param deferred_release_callback.
821
- *
826
+ *
822
827
* If explicit fencing is supported:
823
828
* - the in_fence_fd should be a DRM syncobj fd that signals
824
829
* when the GPU has finished rendering to the framebuffer and is ready
825
830
* to be scanned out.
826
831
* - @param deferred_release_callback will be called
827
832
* with a DRM syncobj fd that is signaled once the framebuffer is no longer
828
833
* being displayed on screen (and can be rendered into again)
829
- *
834
+ *
830
835
* If explicit fencing is not supported:
831
836
* - the in_fence_fd in @param layer will be closed by this procedure.
832
837
* - @param deferred_release_callback will NOT be called and
833
838
* @param release_callback will be called instead.
834
- *
839
+ *
835
840
* Explicit fencing is supported: When atomic modesetting is being used and
836
841
* the driver supports it. (Driver has IN_FENCE_FD plane and OUT_FENCE_PTR crtc
837
842
* properties)
838
- *
843
+ *
839
844
* @param builder The KMS request builder.
840
845
* @param layer The exact details (src pos, output pos, rotation,
841
846
* framebuffer) of the layer that should be shown on
@@ -878,7 +883,7 @@ int kms_req_builder_push_fb_layer(
878
883
/**
879
884
* @brief Push a "fake" layer that just keeps one zpos free, incase something
880
885
* other than KMS wants to display contents there. (e.g. omxplayer)
881
- *
886
+ *
882
887
* @param builder The KMS request builder.
883
888
* @param zpos_out Filled with the zpos that won't be occupied by the request
884
889
* builder.
@@ -889,7 +894,7 @@ int kms_req_builder_push_zpos_placeholder_layer(struct kms_req_builder *builder,
889
894
/**
890
895
* @brief A KMS request (atomic or legacy modesetting) that can be committed to
891
896
* change the state of a single CRTC.
892
- *
897
+ *
893
898
* Only way to construct this is by building a KMS request using
894
899
* @ref kms_req_builder and then calling @ref kms_req_builder_build.
895
900
*/
@@ -900,7 +905,7 @@ DECLARE_REF_OPS(kms_req);
900
905
/**
901
906
* @brief Build the KMS request builder into an actual, immutable KMS request
902
907
* that can be committed. Internally this doesn't do much at all.
903
- *
908
+ *
904
909
* @param builder The KMS request builder that should be built.
905
910
* @returns KMS request that can be committed using @ref kms_req_commit_blocking
906
911
* or @ref kms_req_commit_nonblocking.
0 commit comments